[Intel-gfx] [PATCH 09/10] drm/i915: Migrate stolen objects before hibernation

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson Ville reminded us that stolen memory is not preserved across hibernation, and a result of this was that context objects now being allocated from stolen were being corrupted on S4 and promptly hanging the GPU on resume. We want to utilise stolen for as much as possible (nothing

[Intel-gfx] [PATCH 10/10] drm/i915: Disable use of stolen area by User when Intel RST is present

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma The BIOS RapidStartTechnology may corrupt the stolen memory across S3 suspend due to unalarmed hibernation, in which case we will not be able to preserve the User data stored in the stolen region. Hence this patch tries to identify presence of the RST device on the ACPI b

[Intel-gfx] [PATCH 03/10] drm/i915: Use insert_page for pwrite_fast

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First, we try a nonblocking pin for the whole object (since that is fastest if reused), then failing that we try to grab one page in the mappable aperture. It also allows us to handle objects larger than th

[Intel-gfx] [PATCH v17 0/10] Support for creating/using Stolen memory backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch series adds support for creating/using Stolen memory backed objects. Despite being a unified memory architecture (UMA) some bits of memory are more equal than others. In particular we have the thorny issue of stolen memory, memory stolen from the system by the

[Intel-gfx] [PATCH 06/10] drm/i915: Propagating correct error codes to the userspace

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Propagating correct error codes to userspace by using ERR_PTR and PTR_ERR macros for stolen memory based object allocation. We generally return -ENOMEM to the user whenever there is a failure in object allocation. This patch helps user to identify the correct reason for t

[Intel-gfx] [PATCH 08/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover objects backed by stolen memory as well as other non-shmem backed objects. v2: Drop locks around slow_user

[Intel-gfx] [PATCH 04/10] drm/i915: Clearing buffer objects via CPU/GTT

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc for i915_gem_clear_object(), corre

[Intel-gfx] [PATCH 07/10] drm/i915: Add support for stealing purgable stolen pages

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson If we run out of stolen memory when trying to allocate an object, see if we can reap enough purgeable objects to free up enough contiguous free space for the allocation. This is in principle very much like evicting objects to free up enough contiguous space in the vma when bind

[Intel-gfx] [PATCH 02/10] drm/i915: Introduce i915_gem_object_get_dma_address()

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson This utility function is a companion to i915_gem_object_get_page() that uses the same cached iterator for the scatterlist to perform fast sequential lookup of the dma address associated with any page within the object. Signed-off-by: Chris Wilson Signed-off-by: Ankitprasad Sh

[Intel-gfx] [PATCH 01/10] drm/i915: Add support for mapping an object page by page

2016-02-18 Thread ankitprasad . r . sharma
From: Chris Wilson Introduced a new vm specfic callback insert_page() to program a single pte in ggtt or ppgtt. This allows us to map a single page in to the mappable aperture space. This can be iterated over to access the whole object by using space as meagre as page size. v2: Added low level r

[Intel-gfx] [PATCH 05/10] drm/i915: Support for creating Stolen memory backed objects

2016-02-18 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma Extend the drm_i915_gem_create structure to add support for creating Stolen memory backed objects. Added a new flag through which user can specify the preference to allocate the object from stolen memory, which if set, an attempt will be made to allocate the object from s

Re: [Intel-gfx] [PATCH 06/11] drm/i915: Framework for capturing command stream based OA reports

2016-02-18 Thread sourab gupta
On Wed, 2016-02-17 at 23:00 +0530, Robert Bragg wrote: > Hi Sourab, > > > As Sergio Martinez has started experimenting with this in gputop and > reported seeing lots of ENOSPC errors being reported when reading I > had a look into this and saw a few issues with how we check that > there's data av

Re: [Intel-gfx] [PATCH 08/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2016-02-18 Thread Ankitprasad Sharma
Hi, On Thu, 2016-02-11 at 11:40 +, Tvrtko Ursulin wrote: > > + > > + mutex_unlock(&dev->struct_mutex); > > + if (likely(!i915.prefault_disable)) { > > + ret = fault_in_multipages_writeable(user_data, remain); > > + if (ret) { > > + mutex_lock(&dev->str

Re: [Intel-gfx] [PATCH] drm/atomic: Allow for holes in connector state.

2016-02-18 Thread Dave Airlie
On 16 February 2016 at 21:37, Ville Syrjälä wrote: > On Mon, Feb 15, 2016 at 02:17:01PM +0100, Maarten Lankhorst wrote: >> Because we record connector_mask using 1 << drm_connector_index now >> the connector_mask should stay the same even when other connectors >> are removed. This was not the case

Re: [Intel-gfx] [PATCH 5/6] drm/i915: Implement color management on bdw/skl/bxt/kbl

2016-02-18 Thread Matt Roper
On Tue, Feb 09, 2016 at 12:19:17PM +, Lionel Landwerlin wrote: > Patch based on a previous series by Shashank Sharma. > > v2: Do not read GAMMA_MODE register to figure what mode we're in > > v3: Program PREC_PAL_GC_MAX to clamp pixel values > 1.0 > > Add documentation on how the Broadcas

[Intel-gfx] [PATCH] drm/i915: Before waiting for a vblank update drm frame counter.

2016-02-18 Thread Rodrigo Vivi
Whenever power wells are disabled like when entering DC5/DC6 all display registers are zeroed. DMC firmware restore them on DC5/DC6 exit. However frame counter register is read-only and DMC cannot restore. So we start facing some funny errors where drm was waiting for vblank 500 and hardware counte

Re: [Intel-gfx] [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't

2016-02-18 Thread Deucher, Alexander
> -Original Message- > From: daniel.vet...@ffwll.ch [mailto:daniel.vet...@ffwll.ch] On Behalf Of > Daniel Vetter > Sent: Thursday, February 18, 2016 6:11 PM > To: Lukas Wunner > Cc: dri-devel; platform-driver-...@vger.kernel.org; intel-gfx; Ben Skeggs; > Deucher, Alexander > Subject: Re: [P

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores

2016-02-18 Thread Runyan, Arthur J
>-Original Message- >From: Deak, Imre ... >The BSpec "Sequence to Allow DC5 or DC6" requires this only for BXT >(looks like a recent addition to work around something), but it doesn't >say it's needed for other platforms. The register description doesn't >make a difference though. > >Perhap

Re: [Intel-gfx] [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't

2016-02-18 Thread Daniel Vetter
On Thu, Feb 18, 2016 at 11:20 PM, Lukas Wunner wrote: > Hi, > > On Thu, Feb 18, 2016 at 10:39:05PM +0100, Daniel Vetter wrote: >> On Thu, Feb 18, 2016 at 9:34 PM, Lukas Wunner wrote: >> > >> >> Ok, makes sense. I still think adding the check to the client_register >> >> function would be good, ju

Re: [Intel-gfx] [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't

2016-02-18 Thread Lukas Wunner
Hi, On Thu, Feb 18, 2016 at 10:39:05PM +0100, Daniel Vetter wrote: > On Thu, Feb 18, 2016 at 9:34 PM, Lukas Wunner wrote: > > > >> Ok, makes sense. I still think adding the check to the client_register > >> function would be good, just as a safety measure. > > > > Hm, the idea of calling vga_swit

Re: [Intel-gfx] [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't

2016-02-18 Thread Daniel Vetter
On Thu, Feb 18, 2016 at 9:34 PM, Lukas Wunner wrote: > >> Ok, makes sense. I still think adding the check to the client_register >> function would be good, just as a safety measure. > > Hm, the idea of calling vga_switcheroo_client_probe_defer() twice > causes me pain in the stomach. It's surprisi

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: Add i915_gem_object_vmap to map GEM object to virtual space

2016-02-18 Thread Yu Dai
On 02/18/2016 01:05 PM, Chris Wilson wrote: On Thu, Feb 18, 2016 at 10:31:37AM -0800, yu@intel.com wrote: > From: Alex Dai > > There are several places inside driver where a GEM object is mapped to > kernel virtual space. The mapping is either done for the whole object > or certain page ra

Re: [Intel-gfx] [RFC i-g-t] tests/drv_hangman: test for acthd increasing through invalid VM space

2016-02-18 Thread Chris Wilson
On Thu, Feb 18, 2016 at 05:34:50PM +, daniele.ceraolospu...@intel.com wrote: > +static void ppgtt_walking(void) > +{ > + memset(&execbuf, 0, sizeof(execbuf)); > + execbuf.buffers_ptr = (uintptr_t)&gem_exec; > + execbuf.buffer_count = 1; > + execbuf.batch_len = 8; > + > + gem

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: Add i915_gem_object_vmap to map GEM object to virtual space

2016-02-18 Thread Chris Wilson
On Thu, Feb 18, 2016 at 10:31:37AM -0800, yu@intel.com wrote: > From: Alex Dai > > There are several places inside driver where a GEM object is mapped to > kernel virtual space. The mapping is either done for the whole object > or certain page range of it. > > This patch introduces a functio

Re: [Intel-gfx] [PATCH v4 7/8] drm/i915: Do not compute watermarks on a noop.

2016-02-18 Thread Zanoni, Paulo R
Em Qua, 2016-02-10 às 13:49 +0100, Maarten Lankhorst escreveu: > No atomic state should be included after all validation when nothing > has > changed. During modeset all active planes will be added to the state, > while disabled planes won't change their state. As someone who is also not super fam

Re: [Intel-gfx] [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't

2016-02-18 Thread Lukas Wunner
Hi, On Tue, Feb 16, 2016 at 05:08:40PM +0100, Daniel Vetter wrote: > On Tue, Feb 16, 2016 at 04:58:20PM +0100, Lukas Wunner wrote: > > On Sun, Feb 14, 2016 at 01:46:28PM +0100, Daniel Vetter wrote: > > > On Sun, Feb 14, 2016 at 1:10 PM, Lukas Wunner wrote: > > > > + * DRM drivers should invoke th

[Intel-gfx] [PATCH] drm/i915: Skip PIPESTAT reads from irq handler on VLV/CHV when power well is down

2016-02-18 Thread ville . syrjala
From: Ville Syrjälä PIPESTAT registers live in the display power well on VLV/CHV, so we shouldn't access them when things are powered down. Let's check whether the display interrupts are on or off before accessing the PIPESTAT registers. Another option would be to read the PIPESTAT registers onl

[Intel-gfx] [PULL] topic/drm-misc

2016-02-18 Thread Daniel Vetter
Hi Dave, Misc stuff all over: - more mode_fixup removal from Carlos, there's another final pile still left. - final bits of vgaswitcheroo from Lukas for apple gmux, we're still discussing an api cleanup patch to make it a bit more abuse-safe as a follow-up - dp aux interface for userspace fo

[Intel-gfx] [PATCH v2 1/2] drm/i915: Add i915_gem_object_vmap to map GEM object to virtual space

2016-02-18 Thread yu . dai
From: Alex Dai There are several places inside driver where a GEM object is mapped to kernel virtual space. The mapping is either done for the whole object or certain page range of it. This patch introduces a function i915_gem_object_vmap to do such job. v2: Use obj->pages->nents for iteration

[Intel-gfx] [PATCH v2 0/2] Add i915_gem_object_vmap

2016-02-18 Thread yu . dai
From: Alex Dai There are several places in driver that a GEM object is mapped to kernel virtual space. Now add a common function i915_gem_object_vmap to do the vmap work for such use case. Alex Dai (2): drm/i915: Add i915_gem_object_vmap to map GEM object to virtual space drm/i915/guc: Simpl

[Intel-gfx] [PATCH v2 2/2] drm/i915/guc: Simplify code by keeping vmap of guc_client object

2016-02-18 Thread yu . dai
From: Alex Dai GuC client object is always pinned during its life cycle. We cache the vmap of client object, which includes guc_process_desc, doorbell and work queue. By doing so, we can simplify the code where driver communicate with GuC. As a result, this patch removes the kmap_atomic in wq_ch

Re: [Intel-gfx] [PATCH 3/6] drm/i915: Remove the SPLL==270Mhz assumption from intel_fdi_link_freq()

2016-02-18 Thread Imre Deak
On ke, 2016-02-17 at 21:41 +0200, ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > Instead of assuming we've correctly set up SPLL to run at 270Mhz for > FDI, let's use the port_clock from pipe_config which should be what > we want. This would catch problems if someone misconfigures

Re: [Intel-gfx] [PATCH 2/6] drm/i915: Move the encoder vs. FDI dotclock check out from encoder .get_config()

2016-02-18 Thread Imre Deak
On ke, 2016-02-17 at 21:41 +0200, ville.syrj...@linux.intel.com wrote: > From: Ville Syrjälä > > Currently we check if the encoder's idea of dotclock agrees with what > we calculated based on the FDI parameters. We do this in the encoder > .get_config() hooks, which isn't so nice in case the BIOS

Re: [Intel-gfx] Fwd: [PATCH] drm/i915: Avoid vblank counter for gen9+

2016-02-18 Thread Imre Deak
On to, 2016-02-18 at 08:56 -0800, Rodrigo Vivi wrote: > Imre, Patrik, do you know if I'm missing something or what I'm doing > wrong with this power domain handler for vblanks to avoid DC states > when we need a reliable frame counter in place. The WARN is due to the spin_lock() in drm_vblank_enab

[Intel-gfx] [RFC i-g-t] tests/drv_hangman: test for acthd increasing through invalid VM space

2016-02-18 Thread daniele . ceraolospurio
From: Daniele Ceraolo Spurio The hangcheck logic will not flag an hang if acthd keeps increasing. However, if a malformed batch jumps to an invalid offset in the ppgtt it can potentially continue executing through the whole address space without triggering the hangcheck mechanism. This patch add

Re: [Intel-gfx] [PATCH v4 6/8] drm/i915: Nuke fbc members from intel_crtc->atomic, v2.

2016-02-18 Thread Zanoni, Paulo R
Em Seg, 2016-02-15 às 15:31 +0100, Maarten Lankhorst escreveu: > Op 12-02-16 om 14:56 schreef Zanoni, Paulo R: > > Em Qua, 2016-02-10 às 13:49 +0100, Maarten Lankhorst escreveu: > > > Factor out intel_fbc_supports_rotation > > ^ not anymore > > > > > > >  and use it in > > > pre_plane_update as w

Re: [Intel-gfx] [PATCH RESSEND FOR CI *AGAIN*] drm/i915/bxt: Remove DSP CLK_GATE programming for BXT

2016-02-18 Thread Jani Nikula
On Thu, 18 Feb 2016, Jani Nikula wrote: > From: Uma Shankar > > DSP CLK_GATE registers are specific to BYT and CHT. > Avoid programming the same for BXT platform. > > v2: Rebased on latest drm nightly branch. > > v3: Fixed Jani's review comments > > Signed-off-by: Uma Shankar > Signed-off-by: Ja

Re: [Intel-gfx] [PATCH v4 3/8] drm/i915: Kill off intel_crtc->atomic.wait_vblank, v4.

2016-02-18 Thread Zanoni, Paulo R
Em Qui, 2016-02-18 às 15:46 +0100, Maarten Lankhorst escreveu: > Op 18-02-16 om 15:14 schreef Zanoni, Paulo R: > > Em Qui, 2016-02-18 às 14:22 +0100, Maarten Lankhorst escreveu: > > > Op 17-02-16 om 22:20 schreef Zanoni, Paulo R: > > > > Em Qua, 2016-02-10 às 13:49 +0100, Maarten Lankhorst escreveu

[Intel-gfx] Fwd: [PATCH] drm/i915: Avoid vblank counter for gen9+

2016-02-18 Thread Rodrigo Vivi
Imre, Patrik, do you know if I'm missing something or what I'm doing wrong with this power domain handler for vblanks to avoid DC states when we need a reliable frame counter in place. Do you have better ideas? Thanks, Rodrigo. -- Forwarded message -- From: Rodrigo Vivi Date: We

[Intel-gfx] [maintainer-tools PATCH 2/8] dim: add list-branches subcommand to list nightly branches

2016-02-18 Thread Jani Nikula
Helper for bash completion. Where to get the information depends on user's dim configuration. Signed-off-by: Jani Nikula --- dim | 6 ++ 1 file changed, 6 insertions(+) diff --git a/dim b/dim index c004bc75ca06..33ef8288a291 100755 --- a/dim +++ b/dim @@ -972,6 +972,12 @@ function dim_pull_

[Intel-gfx] [maintainer-tools PATCH 4/8] completion: use the dim helpers to complete nightly and upstream branches

2016-02-18 Thread Jani Nikula
Use the user's configured directories and remotes via dim. Signed-off-by: Jani Nikula --- bash_completion | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bash_completion b/bash_completion index 6a3a88cc80f8..f89764e3947d 100644 --- a/bash_completion +++ b/bash_comple

[Intel-gfx] [maintainer-tools PATCH 6/8] dim: rename alias subcommand to list-aliases

2016-02-18 Thread Jani Nikula
Also drop leading tab and fix underscores in output. Helper for bash completion. Signed-off-by: Jani Nikula --- dim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dim b/dim index 2f6e6151a4b2..1addd6f6a0e9 100755 --- a/dim +++ b/dim @@ -1121,11 +1121,12 @@ function dim_

[Intel-gfx] [maintainer-tools PATCH 5/8] dim: add list-commands subcommand to list all subcommands

2016-02-18 Thread Jani Nikula
Helper for completion. Signed-off-by: Jani Nikula --- dim | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dim b/dim index 6fb496ea4192..2f6e6151a4b2 100755 --- a/dim +++ b/dim @@ -1115,6 +1115,12 @@ function assert_branch fi } +# Note: used by bash completio

[Intel-gfx] [maintainer-tools PATCH 3/8] dim: add list-upstreams subcommand to list upstream branches

2016-02-18 Thread Jani Nikula
Helper for bash completion. The result depends on user's dim configuration. Signed-off-by: Jani Nikula --- dim | 8 1 file changed, 8 insertions(+) diff --git a/dim b/dim index 33ef8288a291..6fb496ea4192 100755 --- a/dim +++ b/dim @@ -973,6 +973,14 @@ function dim_pull_request_next_fix

[Intel-gfx] [maintainer-tools PATCH 8/8] completion: complete aliases like the actual command

2016-02-18 Thread Jani Nikula
Map aliases to the actual commands. No need to know all the aliases. Signed-off-by: Jani Nikula --- bash_completion | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bash_completion b/bash_completion index 4a9d981709a0..9f659b4ebcce 100644 --- a/bash_complet

[Intel-gfx] [maintainer-tools PATCH 7/8] completion: use the dim helpers to complete subcommands and aliases

2016-02-18 Thread Jani Nikula
Autodiscover everything, including user's configured aliases. Signed-off-by: Jani Nikula --- bash_completion | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/bash_completion b/bash_completion index f89764e3947d..4a9d981709a0 100644 --- a/bash_completion +++ b/

[Intel-gfx] [maintainer-tools PATCH 1/8] completion: require bash completion package and use it

2016-02-18 Thread Jani Nikula
The bash completion package makes life a whole lot easier than using the builtin bash completion features. It's quite likely anyone using completion in bash already has it installed. Signed-off-by: Jani Nikula --- bash_completion | 62 - 1

[Intel-gfx] [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes

2016-02-18 Thread Mika Kuoppala
It has been observed that sometimes disabling the dc6 fails and dc6 state pops back up, brief moment after disabling. This has to be dmc save/restore timing issue or other bug in the way dc states are handled. Try to work around this issue as we don't have firmware fix yet available. Verify that t

Re: [Intel-gfx] [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes

2016-02-18 Thread Mika Kuoppala
Imre Deak writes: > On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote: >> It has been observed that sometimes disabling the dc6 fails >> and dc6 state pops back up, brief moment after disabling. This >> has to be dmc save/restore timing issue or other bug in the >> way dc states are handled.

Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen9: Write dc state debugmask bits only once

2016-02-18 Thread Imre Deak
On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote: > DMC debugmask bits should stick so no need to write them > everytime dc state is changed. > > v2: Write after firmware has been successfully loaded (Ville) > > Signed-off-by: Mika Kuoppala Reviewed-by: Imre Deak > --- >  drivers/gpu/drm

Re: [Intel-gfx] [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes

2016-02-18 Thread Imre Deak
On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote: > It has been observed that sometimes disabling the dc6 fails > and dc6 state pops back up, brief moment after disabling. This > has to be dmc save/restore timing issue or other bug in the > way dc states are handled. > > Try to work around th

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores

2016-02-18 Thread Imre Deak
On to, 2016-02-18 at 17:21 +0200, Mika Kuoppala wrote: > Cores need to be included into the debug mask. We don't exactly > know what it does but the spec says it must be enabled. So obey. > > Signed-off-by: Mika Kuoppala > --- >  drivers/gpu/drm/i915/i915_reg.h |  1 + >  drivers/gpu/drm/i

[Intel-gfx] [PATCH 4/4] drm/i915/gen9: Write dc state debugmask bits only once

2016-02-18 Thread Mika Kuoppala
DMC debugmask bits should stick so no need to write them everytime dc state is changed. v2: Write after firmware has been successfully loaded (Ville) Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_csr.c| 8 +--- drivers/gpu/drm/i915/intel_drv.h| 2 +- drivers/gp

[Intel-gfx] [PATCH 3/4] drm/i915/gen9: Extend dmc debug mask to include cores

2016-02-18 Thread Mika Kuoppala
Cores need to be included into the debug mask. We don't exactly know what it does but the spec says it must be enabled. So obey. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 14 -- 2 files changed, 9 insert

[Intel-gfx] [PATCH 1/4] drm/i915/gen9: Check for DC state mismatch

2016-02-18 Thread Mika Kuoppala
From: Patrik Jakobsson The DMC can incorrectly run off and allow DC states on it's own. We don't know the root-cause for this yet but this patch makes it more visible. Reviewed-by: Mika Kuoppala Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm

[Intel-gfx] [PATCH 2/4] drm/i915/gen9: Verify and enforce dc6 state writes

2016-02-18 Thread Mika Kuoppala
It has been observed that sometimes disabling the dc6 fails and dc6 state pops back up, brief moment after disabling. This has to be dmc save/restore timing issue or other bug in the way dc states are handled. Try to work around this issue as we don't have firmware fix yet available. Verify that t

[Intel-gfx] [PATCH 0/4] gen9 dmc state harderning

2016-02-18 Thread Mika Kuoppala
There have been problems on losing state sync between dmc and driver. I belive the interplay with racy hw access due to intel_display_power_is_enabled() with overlapping reprogramming of allowed dc states (DC_STATE_EN) made DMC very confused. Imre has now get rid of the troublesome intel_display_p

Re: [Intel-gfx] [PATCH v6 0/7] Convert requests to use struct fence

2016-02-18 Thread Chris Wilson
On Thu, Feb 18, 2016 at 02:24:03PM +, john.c.harri...@intel.com wrote: > From: John Harrison Does this pass igt? If so, which are the bug fixes for the current regressions from the request conversion? -Chris -- Chris Wilson, Intel Open Source Technology Centre __

Re: [Intel-gfx] [PATCH v6 3/7] drm/i915: Add per context timelines to fence object

2016-02-18 Thread Chris Wilson
On Thu, Feb 18, 2016 at 02:24:06PM +, john.c.harri...@intel.com wrote: > From: John Harrison > > The fence object used inside the request structure requires a sequence > number. Although this is not used by the i915 driver itself, it could > potentially be used by non-i915 code if the fence i

Re: [Intel-gfx] [PATCH v6 4/7] drm/i915: Delay the freeing of requests until retire time

2016-02-18 Thread Chris Wilson
On Thu, Feb 18, 2016 at 02:24:07PM +, john.c.harri...@intel.com wrote: > From: John Harrison As I said, and have shown in patches several months ago, just fix the underlying bug to remove the struct_mutex requirement for freeing the request. -Chris -- Chris Wilson, Intel Open Source Technol

Re: [Intel-gfx] [PATCH v4 3/8] drm/i915: Kill off intel_crtc->atomic.wait_vblank, v4.

2016-02-18 Thread Maarten Lankhorst
Op 18-02-16 om 15:14 schreef Zanoni, Paulo R: > Em Qui, 2016-02-18 às 14:22 +0100, Maarten Lankhorst escreveu: >> Op 17-02-16 om 22:20 schreef Zanoni, Paulo R: >>> Em Qua, 2016-02-10 às 13:49 +0100, Maarten Lankhorst escreveu: Currently we perform our own wait in post_plane_update, but th

[Intel-gfx] [PATCH v5 06/35] drm/i915: Start of GPU scheduler

2016-02-18 Thread John . C . Harrison
From: John Harrison Initial creation of scheduler source files. Note that this patch implements most of the scheduler functionality but does not hook it in to the driver yet. It also leaves the scheduler code in 'pass through' mode so that even when it is hooked in, it will not actually do very m

[Intel-gfx] [PATCH v6 6/7] drm/i915: Updated request structure tracing

2016-02-18 Thread John . C . Harrison
From: John Harrison Added the '_complete' trace event which occurs when a fence/request is signaled as complete. Also moved the notify event from the IRQ handler code to inside the notify function itself. v3: Added the current ring seqno to the notify trace point. v5: Line wrapping to keep the

[Intel-gfx] [PATCH v6 2/7] drm/i915: Removed now redudant parameter to i915_gem_request_completed()

2016-02-18 Thread John . C . Harrison
From: John Harrison The change to the implementation of i915_gem_request_completed() means that the lazy coherency flag is no longer used. This can now be removed to simplify the interface. v6: Updated to newer nigthly and resolved conflicts. For: VIZ-5190 Signed-off-by: John Harrison --- dri

[Intel-gfx] [PATCH v6 3/7] drm/i915: Add per context timelines to fence object

2016-02-18 Thread John . C . Harrison
From: John Harrison The fence object used inside the request structure requires a sequence number. Although this is not used by the i915 driver itself, it could potentially be used by non-i915 code if the fence is passed outside of the driver. This is the intention as it allows external kernel dr

[Intel-gfx] [PATCH v6 5/7] drm/i915: Interrupt driven fences

2016-02-18 Thread John . C . Harrison
From: John Harrison The intended usage model for struct fence is that the signalled status should be set on demand rather than polled. That is, there should not be a need for a 'signaled' function to be called everytime the status is queried. Instead, 'something' should be done to enable a signal

[Intel-gfx] [PATCH v6 1/7] drm/i915: Convert requests to use struct fence

2016-02-18 Thread John . C . Harrison
From: John Harrison There is a construct in the linux kernel called 'struct fence' that is intended to keep track of work that is executed on hardware. I.e. it solves the basic problem that the drivers 'struct drm_i915_gem_request' is trying to address. The request structure does quite a lot more

Re: [Intel-gfx] [PATCH v4 07/38] drm/i915: Start of GPU scheduler

2016-02-18 Thread John Harrison
On 20/01/2016 13:18, Joonas Lahtinen wrote: Hi, Comments below this pre text. Many of the comments are related to the indent and style of the code. That stuff is important to fix for future maintainability. In order for the future review to be more effective, I'd like to next see a v5 of the se

[Intel-gfx] [PATCH v6 0/7] Convert requests to use struct fence

2016-02-18 Thread John . C . Harrison
From: John Harrison There is a construct in the linux kernel called 'struct fence' that is intended to keep track of work that is executed on hardware. I.e. it solves the basic problem that the drivers 'struct drm_i915_gem_request' is trying to address. The request structure does quite a lot more

[Intel-gfx] [PATCH v6 4/7] drm/i915: Delay the freeing of requests until retire time

2016-02-18 Thread John . C . Harrison
From: John Harrison The request structure is reference counted. When the count reached zero, the request was immediately freed and all associated objects were unrefereced/unallocated. This meant that the driver mutex lock must be held at the point where the count reaches zero. This was fine while

[Intel-gfx] [PATCH v6 7/7] drm/i915: Cache last IRQ seqno to reduce IRQ overhead

2016-02-18 Thread John . C . Harrison
From: John Harrison The notify function can be called many times without the seqno changing. A large number of duplicates are to prevent races due to the requirement of not enabling interrupts until requested. However, when interrupts are enabled the IRQ handle can be called multiple times withou

[Intel-gfx] [PATCH v5 35/35] drm/i915: Allow scheduler to manage inter-ring object synchronisation

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler has always tracked batch buffer dependencies based on DRM object usage. This means that it will not submit a batch on one ring that has outstanding dependencies still executing on other rings. This is exactly the same synchronisation performed by i915_gem_object_

[Intel-gfx] [PATCH 01/20] igt/gem_ctx_param_basic: Updated to support scheduler priority interface

2016-02-18 Thread John . C . Harrison
From: John Harrison The GPU scheduler has added an execution priority level to the context object. There is an IOCTL interface to allow user apps/libraries to set this priority. This patch updates the context paramter IOCTL test to include the new interface. For: VIZ-1587 Signed-off-by: John Har

[Intel-gfx] [PATCH v5 34/35] drm/i915: Add support for retro-actively banning batch buffers

2016-02-18 Thread John . C . Harrison
From: John Harrison If a given context submits too many hanging batch buffers then it will be banned and no further batch buffers will be accepted for it. However, it is possible that a large number of buffers may already have been accepted and are sat in the scheduler waiting to be executed. Thi

[Intel-gfx] [PATCH v5 16/35] drm/i915: Hook scheduler node clean up into retire requests

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler keeps its own lock on various DRM objects in order to guarantee safe access long after the original execbuff IOCTL has completed. This is especially important when pre-emption is enabled as the batch buffer might need to be submitted to the hardware multiple time

[Intel-gfx] [PATCH v5 18/35] drm/i915: Added scheduler support to page fault handler

2016-02-18 Thread John . C . Harrison
From: John Harrison GPU page faults can now require scheduler operation in order to complete. For example, in order to free up sufficient memory to handle the fault the handler must wait for a batch buffer to complete that has not even been sent to the hardware yet. Thus EAGAIN no longer means a

[Intel-gfx] [PATCH v5 12/35] drm/i915: Added deferred work handler for scheduler

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler needs to do interrupt triggered work that is too complex to do in the interrupt handler. Thus it requires a deferred work handler to process such tasks asynchronously. v2: Updated to reduce mutex lock usage. The lock is now only held for the minimum time within

[Intel-gfx] [PATCH v5 26/35] drm/i915: Added debugfs interface to scheduler tuning parameters

2016-02-18 Thread John . C . Harrison
From: John Harrison There are various parameters within the scheduler which can be tuned to improve performance, reduce memory footprint, etc. This change adds support for altering these via debugfs. v2: Updated for priorities now being signed values. v5: Squashed priority bumping entries into

[Intel-gfx] [PATCH v5 30/35] drm/i915: Add scheduler support functions for TDR

2016-02-18 Thread John . C . Harrison
From: John Harrison The TDR code needs to know what the scheduler is up to in order to work out whether a ring is really hung or not. v4: Removed some unnecessary braces to keep the style checker happy. v5: Removed white space and added documentation. [Joonas Lahtinen] Also updated for new mod

[Intel-gfx] [PATCH v5 29/35] drm/i915: Added scheduler statistic reporting to debugfs

2016-02-18 Thread John . C . Harrison
From: John Harrison It is useful for know what the scheduler is doing for both debugging and performance analysis purposes. This change adds a bunch of counters and such that keep track of various scheduler operations (batches submitted, completed, flush requests, etc.). The data can then be read

[Intel-gfx] [PATCH v5 14/35] drm/i915: Keep the reserved space mechanism happy

2016-02-18 Thread John . C . Harrison
From: John Harrison Ring space is reserved when constructing a request to ensure that the subsequent 'add_request()' call cannot fail due to waiting for space on a busy or broken GPU. However, the scheduler jumps in to the middle of the execbuffer process between request creation and request subm

[Intel-gfx] [PATCH v5 25/35] drm/i915: Added scheduler queue throttling by DRM file handle

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler decouples the submission of batch buffers to the driver from their subsequent submission to the hardware. This means that an application which is continuously submitting buffers as fast as it can could potentialy flood the driver. To prevent this, the driver now

[Intel-gfx] [PATCH v5 22/35] drm/i915: Support for 'unflushed' ring idle

2016-02-18 Thread John . C . Harrison
From: John Harrison When the seqno wraps around zero, the entire GPU is forced to be idle for some reason (possibly only to work around issues with hardware semaphores but no-one seems too sure!). This causes a problem if the force idle occurs at an inopportune moment such as in the middle of sub

[Intel-gfx] [PATCH v5 33/35] drm/i915: Add scheduling priority to per-context parameters

2016-02-18 Thread John . C . Harrison
From: Dave Gordon Added an interface for user land applications/libraries/services to set their GPU scheduler priority. This extends the existing context parameter IOCTL interface to add a scheduler priority parameter. The range is +/-1023 with +ve numbers meaning higher priority. Only system pro

[Intel-gfx] [PATCH v5 19/35] drm/i915: Added scheduler flush calls to ring throttle and idle functions

2016-02-18 Thread John . C . Harrison
From: John Harrison When requesting that all GPU work is completed, it is now necessary to get the scheduler involved in order to flush out work that queued and not yet submitted. v2: Updated to add support for flushing the scheduler queue by time stamp rather than just doing a blanket flush. v

[Intel-gfx] [PATCH v5 20/35] drm/i915: Add scheduler hook to GPU reset

2016-02-18 Thread John . C . Harrison
From: John Harrison When the watchdog resets the GPU, all interrupts get disabled despite the reference count remaining. As the scheduler probably had interrupts enabled during the reset (it would have been waiting for the bad batch to complete), it must be poked to tell it that the interrupt has

[Intel-gfx] [PATCH v5 21/35] drm/i915: Added a module parameter to allow the scheduler to be disabled

2016-02-18 Thread John . C . Harrison
From: John Harrison It can be useful to be able to disable the GPU scheduler via a module parameter for debugging purposes. v5: Converted from a multi-feature 'overrides' mask to a single 'enable' boolean. Further features (e.g. pre-emption) will now be separate 'enable' booleans added later. [C

[Intel-gfx] [PATCH v5 17/35] drm/i915: Added scheduler support to __wait_request() calls

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler can cause batch buffers, and hence requests, to be submitted to the ring out of order and asynchronously to their submission to the driver. Thus at the point of waiting for the completion of a given request, it is not even guaranteed that the request has actually

[Intel-gfx] [PATCH v5 31/35] drm/i915: Scheduler state dump via debugfs

2016-02-18 Thread John . C . Harrison
From: John Harrison Added a facility for triggering the scheduler state dump via a debugfs entry. v2: New patch in series. For: VIZ-1587 Signed-off-by: John Harrison --- drivers/gpu/drm/i915/i915_debugfs.c | 33 + drivers/gpu/drm/i915/i915_scheduler.c | 9 ++

[Intel-gfx] [PATCH v5 32/35] drm/i915: Enable GPU scheduler by default

2016-02-18 Thread John . C . Harrison
From: John Harrison Now that all the scheduler patches have been applied, it is safe to enable. v5: Updated for new module parameter. For: VIZ-1587 Signed-off-by: John Harrison --- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[Intel-gfx] [PATCH v5 24/35] drm/i915: Added trace points to scheduler

2016-02-18 Thread John . C . Harrison
From: John Harrison Added trace points to the scheduler to track all the various events, node state transitions and other interesting things that occur. v2: Updated for new request completion tracking implementation. v3: Updated for changes to node kill code. v4: Wrapped some long lines to kee

[Intel-gfx] [PATCH v5 15/35] drm/i915: Added tracking/locking of batch buffer objects

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler needs to track interdependencies between batch buffers. These are calculated by analysing the object lists of the buffers and looking for commonality. The scheduler also needs to keep those buffers locked long after the initial IOCTL call has returned to user lan

[Intel-gfx] [PATCH v5 27/35] drm/i915: Added debug state dump facilities to scheduler

2016-02-18 Thread John . C . Harrison
From: John Harrison When debugging batch buffer submission issues, it is useful to be able to see what the current state of the scheduler is. This change adds functions for decoding the internal scheduler state and reporting it. v3: Updated a debug message with the new state_str() function. v4:

[Intel-gfx] [PATCH v5 23/35] drm/i915: Defer seqno allocation until actual hardware submission time

2016-02-18 Thread John . C . Harrison
From: John Harrison The seqno value is now only used for the final test for completion of a request. It is no longer used to track the request through the software stack. Thus it is no longer necessary to allocate the seqno immediately with the request. Instead, it can be done lazily and left unt

[Intel-gfx] [PATCH v5 28/35] drm/i915: Add early exit to execbuff_final() if insufficient ring space

2016-02-18 Thread John . C . Harrison
From: John Harrison One of the major purposes of the GPU scheduler is to avoid stalling the CPU when the GPU is busy and unable to accept more work. This change adds support to the ring submission code to allow a ring space check to be performed before attempting to submit a batch buffer to the h

[Intel-gfx] [PATCH v5 11/35] drm/i915: Added scheduler hook into i915_gem_request_notify()

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler needs to know when requests have completed so that it can keep its own internal state up to date and can submit new requests to the hardware from its queue. v2: Updated due to changes in request handling. The operation is now reversed from before. Rather than th

[Intel-gfx] [PATCH v5 08/35] drm/i915: Disable hardware semaphores when GPU scheduler is enabled

2016-02-18 Thread John . C . Harrison
From: John Harrison Hardware sempahores require seqno values to be continuously incrementing. However, the scheduler's reordering of batch buffers means that the seqno values going through the hardware could be out of order. Thus semaphores can not be used. On the other hand, the scheduler super

[Intel-gfx] [PATCH v5 13/35] drm/i915: Redirect execbuffer_final() via scheduler

2016-02-18 Thread John . C . Harrison
From: John Harrison Updated the execbuffer() code to pass the packaged up batch buffer information to the scheduler rather than calling execbuffer_final() directly. The scheduler queue() code is currently a stub which simply chains on to _final() immediately. For: VIZ-1587 Signed-off-by: John Ha

[Intel-gfx] [PATCH v5 05/35] drm/i915: Re-instate request->uniq because it is extremely useful

2016-02-18 Thread John . C . Harrison
From: John Harrison The seqno value cannot always be used when debugging issues via trace points. This is because it can be reset back to start, especially during TDR type tests. Also, when the scheduler arrives the seqno is only valid while a given request is executing on the hardware. While the

[Intel-gfx] [PATCH v5 10/35] drm/i915: Added scheduler hook when closing DRM file handles

2016-02-18 Thread John . C . Harrison
From: John Harrison The scheduler decouples the submission of batch buffers to the driver with submission of batch buffers to the hardware. Thus it is possible for an application to close its DRM file handle while there is still work outstanding. That means the scheduler needs to know about file

  1   2   >