Re: [Intel-gfx] [PATCH v2] drm/i915: prevent out of range pt in the PDE macros (take 3)

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 10:43:48AM +0100, Chris Wilson wrote: > On Tue, Oct 06, 2015 at 10:38:22AM +0200, Daniel Vetter wrote: > > On Mon, Oct 05, 2015 at 05:59:50PM +0100, Michel Thierry wrote: > > > On 10/5/2015 5:36 PM, Dave Gordon wrote: > > > >On 02/10/15 14:16, Michel Thierry wrote: > > > >>W

Re: [Intel-gfx] [PATCH v6 7/8] drm/i915: BDW clock change support [regression]

2015-10-06 Thread Daniel Vetter
On Tue, Jun 16, 2015 at 04:07:40PM +0300, Jani Nikula wrote: > On Tue, 16 Jun 2015, Jani Nikula wrote: > > On Wed, 03 Jun 2015, Mika Kahola wrote: > >> From: Ville Syrjälä > >> > >> Add support for changing cdclk frequency during runtime on BDW. The > >> procedure is quite a bit different on BDW

Re: [Intel-gfx] [PATCH] fixup! drm/i915/skl: Eliminate usage of pipe_wm_parameters from SKL-style WM (v3) [regression]

2015-10-06 Thread Daniel Vetter
Another regression for Jairo to track. Also this one is bisected too (although not 100% confirmed). -Daniel On Fri, Oct 2, 2015 at 8:43 PM, Zanoni, Paulo R wrote: > Em Qui, 2015-10-01 às 16:03 -0700, Matt Roper escreveu: >> Cc: Paulo Zanoni >> Signed-off-by: Matt Roper >> --- >> Paulo, I'm not

Re: [Intel-gfx] [PATCH v2] drm/i915: prevent out of range pt in the PDE macros (take 3)

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 12:09:51PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 10:43:48AM +0100, Chris Wilson wrote: > > On Tue, Oct 06, 2015 at 10:38:22AM +0200, Daniel Vetter wrote: > > > On Mon, Oct 05, 2015 at 05:59:50PM +0100, Michel Thierry wrote: > > > > On 10/5/2015 5:36 PM, Dave

[Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Chris Wilson
Passing cliprects into the kernel for it to re-execute the batch buffer with different CMD_DRAWRECT died out long ago. As DRI1 support has been removed from the kernel, we can now simply reject any execbuf trying to use this "feature". To keep Daniel happy with the prospect of being able to reuse

[Intel-gfx] [PATCH 2/2] drm/i915: Drop i915_gem_obj_is_pinned() from set-cache-level

2015-10-06 Thread Chris Wilson
Since the remove of the pin-ioctl, we only care about not changing the cache level on buffers pinned to the hardware as indicated by obj->pin_display. So we can safely replace i915_gem_object_is_pinned() here with a plain obj->pin_display check. During rebinding, we will check sanity checks in case

[Intel-gfx] [PATCH v2] drm/i915: Make the link training test for same voltage smaller

2015-10-06 Thread Ander Conselvan de Oliveira
It makes it slightly easier to read. v2: Add missing word in patch title. (Ander) Signed-off-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_dp_link_training.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_link_tr

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Imre Deak
On ti, 2015-10-06 at 15:26 +0530, Kumar, Shobhit wrote: > On 10/05/2015 09:05 PM, Imre Deak wrote: > > On ma, 2015-10-05 at 20:52 +0530, Shobhit Kumar wrote: > >> Mostly reuse what is programmed by pre-os, but in case there is no > >> pre-os initialization, init the cdclk with the default value. >

[Intel-gfx] [PATCH 1/3] drm: Track drm_mm nodes with an interval tree

2015-10-06 Thread Chris Wilson
In addition to the last-in/first-out stack for accessing drm_mm nodes, we occasionally and in the future often want to find a drm_mm_node by an address. To do so efficiently we need to track the nodes in an interval tree - lookups for a particular address will then be O(lg(N)), where N is the numbe

[Intel-gfx] [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer

2015-10-06 Thread Chris Wilson
Userspace can pass in an offset that it presumes the object is located at. The kernel will then do its utmost to fit the object into that location. The assumption is that userspace is handling its own object locations (for example along with full-ppgtt) and that the kernel will rarely have to make

[Intel-gfx] [PATCH 2/3] drm/i915: Allow the user to pass a context to any ring

2015-10-06 Thread Chris Wilson
With full-ppgtt, we want the user to have full control over their memory layout, with a separate instance per context. Forcing them to use a shared memory layout for !RCS not only duplicates the amount of work we have to do, but also defeats the memory segregation on offer. Signed-off-by: Chris Wi

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Kumar, Shobhit
On 10/06/2015 04:11 PM, Imre Deak wrote: On ti, 2015-10-06 at 15:26 +0530, Kumar, Shobhit wrote: On 10/05/2015 09:05 PM, Imre Deak wrote: On ma, 2015-10-05 at 20:52 +0530, Shobhit Kumar wrote: Mostly reuse what is programmed by pre-os, but in case there is no pre-os initialization, init the cd

Re: [Intel-gfx] [PATCH 1/3] drm: Track drm_mm nodes with an interval tree

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 11:53:09AM +0100, Chris Wilson wrote: > In addition to the last-in/first-out stack for accessing drm_mm nodes, > we occasionally and in the future often want to find a drm_mm_node by an > address. To do so efficiently we need to track the nodes in an interval > tree - lookup

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar, Shobhit wrote: > On 10/06/2015 04:11 PM, Imre Deak wrote: > >On ti, 2015-10-06 at 15:26 +0530, Kumar, Shobhit wrote: > >>On 10/05/2015 09:05 PM, Imre Deak wrote: > >>>On ma, 2015-10-05 at 20:52 +0530, Shobhit Kumar wrote: > Mostly reuse what is p

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 11:39:55AM +0100, Chris Wilson wrote: > Passing cliprects into the kernel for it to re-execute the batch buffer > with different CMD_DRAWRECT died out long ago. As DRI1 support has been > removed from the kernel, we can now simply reject any execbuf trying to > use this "fea

Re: [Intel-gfx] [PATCH 1/3] drm: Track drm_mm nodes with an interval tree

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 01:11:56PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 11:53:09AM +0100, Chris Wilson wrote: > > In addition to the last-in/first-out stack for accessing drm_mm nodes, > > we occasionally and in the future often want to find a drm_mm_node by an > > address. To do s

Re: [Intel-gfx] [PATCH v2] drm/i915: prevent out of range pt in the PDE macros (take 3)

2015-10-06 Thread Dave Gordon
On 06/10/15 09:38, Daniel Vetter wrote: On Mon, Oct 05, 2015 at 05:59:50PM +0100, Michel Thierry wrote: On 10/5/2015 5:36 PM, Dave Gordon wrote: On 02/10/15 14:16, Michel Thierry wrote: We tried to fix this in commit fdc454c1484a ("drm/i915: Prevent out of range pt in gen6_for_each_pde"). But

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Drop i915_gem_obj_is_pinned() from set-cache-level

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 11:39:56AM +0100, Chris Wilson wrote: > Since the remove of the pin-ioctl, we only care about not changing the > cache level on buffers pinned to the hardware as indicated by > obj->pin_display. So we can safely replace i915_gem_object_is_pinned() > here with a plain obj->pi

[Intel-gfx] [PATCH 3/3] drm/i915: add helpers for platform specific revision id range checks

2015-10-06 Thread Jani Nikula
Revision checks are almost always accompanied by a platform check. (The exceptions are platform specific code.) Add helpers to check for a platform and a revision range: IS_SKL_REVID() and IS_BXT_REVID(). In most places this simplifies and clarifies the code. It will be obvious that revid macros ar

[Intel-gfx] [PATCH 2/3] drm/i915/bxt: add revision id for A1 stepping and use it

2015-10-06 Thread Jani Nikula
Prefer inclusive ranges for revision checks rather than "below B0". Per specs A2 is not used, so revid <= A1 matches revid < B0. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_gem.c| 2 +- drivers/gpu/drm/i915/i915_guc_submi

[Intel-gfx] [PATCH 1/3] drm/i915: remove parens around revision ids

2015-10-06 Thread Jani Nikula
Totally unnecessary. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 51eea2951c0f..a3b137715604 100644 --- a/drivers/g

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Drop i915_gem_obj_is_pinned() from set-cache-level

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 01:28:07PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 11:39:56AM +0100, Chris Wilson wrote: > > Since the remove of the pin-ioctl, we only care about not changing the > > cache level on buffers pinned to the hardware as indicated by > > obj->pin_display. So we can

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 01:19:52PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar, Shobhit wrote: > > On 10/06/2015 04:11 PM, Imre Deak wrote: > > >On ti, 2015-10-06 at 15:26 +0530, Kumar, Shobhit wrote: > > >>On 10/05/2015 09:05 PM, Imre Deak wrote: > > >>>On ma, 201

Re: [Intel-gfx] [PATCH v2] drm/i915: prevent out of range pt in the PDE macros (take 3)

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 12:21:05PM +0100, Dave Gordon wrote: > ... although I still think my version is (slightly) easier to read. > Or it could be improved even more by moving the increment of 'iter' > to the end, making it one line shorter and perhaps helping the > compiler a little :) > > #defi

Re: [Intel-gfx] [PATCH 1/3] drm: Track drm_mm nodes with an interval tree

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 12:19:43PM +0100, Chris Wilson wrote: > On Tue, Oct 06, 2015 at 01:11:56PM +0200, Daniel Vetter wrote: > > On Tue, Oct 06, 2015 at 11:53:09AM +0100, Chris Wilson wrote: > > > In addition to the last-in/first-out stack for accessing drm_mm nodes, > > > we occasionally and in

[Intel-gfx] [PATCH] drm/i915: Move the mb() following release-mmap into release-mmap

2015-10-06 Thread Chris Wilson
As paranoia, we want to ensure that the CPU's PTEs have been revoked for the object before we return from i915_gem_release_mmap(). This allows us to rely on there being no outstanding memory accesses and guarantees serialisation of the code against concurrent access just by calling i915_gem_release

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:34:47PM +0100, Chris Wilson wrote: > Whilst discussing possible ways to trigger an invalidate_range on a > userptr with an aliased GGTT mmapping (and so cause a struct_mutex > deadlock), the conclusion is that we can, and we must, prevent any > possible deadlock by avoidi

[Intel-gfx] [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma

2015-10-06 Thread Chris Wilson
Since commit 43566dedde54f9729113f5f9fde77d53e75e61e9 Author: Chris Wilson Date: Fri Jan 2 16:29:29 2015 +0530 drm/i915: Broaden application of set-domain(GTT) we allowed objects to be in the GTT domain, but unbound. Therefore removing the GTT cache domain when removing the GGTT vma is no

Re: [Intel-gfx] [PATCH] drm/i915: Allow userptr backchannel for passing around GTT mappings

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:36:05PM +0100, Chris Wilson wrote: > Once userptr becomes part of client API, it is almost a certainty that > eventually someone will try to create a new object from a mapping of > another client object, e.g. > > new = vaImport(vaMap(old, &size), size); > > (using a hyp

Re: [Intel-gfx] [PATCH v4] drm/i915: Clean up associated VMAs on context destruction

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 10:48:28AM +0100, Tvrtko Ursulin wrote: > > > On 06/10/15 10:34, Chris Wilson wrote: > >On Tue, Oct 06, 2015 at 11:28:49AM +0200, Daniel Vetter wrote: > >>On Tue, Oct 06, 2015 at 10:04:31AM +0100, Chris Wilson wrote: > >>>On Tue, Oct 06, 2015 at 10:58:01AM +0200, Daniel Ve

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 02:41:44PM +0300, Ville Syrjälä wrote: > On Tue, Oct 06, 2015 at 01:19:52PM +0200, Daniel Vetter wrote: > > On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar, Shobhit wrote: > > > On 10/06/2015 04:11 PM, Imre Deak wrote: > > > >On ti, 2015-10-06 at 15:26 +0530, Kumar, Shobhit

Re: [Intel-gfx] [PATCH] drm/i915: Allow userptr backchannel for passing around GTT mappings

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 02:12:31PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:36:05PM +0100, Chris Wilson wrote: > > Once userptr becomes part of client API, it is almost a certainty that > > eventually someone will try to create a new object from a mapping of > > another client objec

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Use a task to cancel the userptr on invalidate_range

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 02:04:19PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:34:47PM +0100, Chris Wilson wrote: > > Whilst discussing possible ways to trigger an invalidate_range on a > > userptr with an aliased GGTT mmapping (and so cause a struct_mutex > > deadlock), the conclusion

Re: [Intel-gfx] [PATCH 2/3] drm/i915/bxt: add revision id for A1 stepping and use it

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 02:41:15PM +0300, Jani Nikula wrote: > Prefer inclusive ranges for revision checks rather than "below B0". Per > specs A2 is not used, so revid <= A1 matches revid < B0. The w/a db would say UNTIL_B0 etc., so might be easier to check against it if we keep to the same conven

Re: [Intel-gfx] [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 01:02:22PM +0100, Chris Wilson wrote: > Since > > commit 43566dedde54f9729113f5f9fde77d53e75e61e9 > Author: Chris Wilson > Date: Fri Jan 2 16:29:29 2015 +0530 > > drm/i915: Broaden application of set-domain(GTT) > > we allowed objects to be in the GTT domain, but u

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Eliminate vmap overhead for cmd parser

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:57:10PM +0100, Chris Wilson wrote: > With a little complexity to handle cmds straddling page boundaries, we > can completely avoiding having to vmap the batch and the shadow batch > objects whilst running the command parser. > > On ivb i7-3720MQ: > > x11perf -dot before

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Kumar, Shobhit
On 10/06/2015 05:49 PM, Daniel Vetter wrote: On Tue, Oct 06, 2015 at 02:41:44PM +0300, Ville Syrjälä wrote: On Tue, Oct 06, 2015 at 01:19:52PM +0200, Daniel Vetter wrote: On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar, Shobhit wrote: On 10/06/2015 04:11 PM, Imre Deak wrote: On ti, 2015-10-06

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 01:21:25PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 11:39:55AM +0100, Chris Wilson wrote: > > Passing cliprects into the kernel for it to re-execute the batch buffer > > with different CMD_DRAWRECT died out long ago. As DRI1 support has been > > removed from the

Re: [Intel-gfx] [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 02:40:26PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 01:02:22PM +0100, Chris Wilson wrote: > > Since > > > > commit 43566dedde54f9729113f5f9fde77d53e75e61e9 > > Author: Chris Wilson > > Date: Fri Jan 2 16:29:29 2015 +0530 > > > > drm/i915: Broaden applic

Re: [Intel-gfx] [PATCH 1/5] drm/i915: shrinker_control->nr_to_scan is now unsigned long

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:18:25PM +0100, Chris Wilson wrote: > As the shrinker_control now passes us unsigned long targets, update our > shrinker functions to match. > > Signed-off-by: Chris Wilson Queued for -next, thanks for the patch. -Daniel > --- > drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH] drm/i915: Fix kerneldoc for i915_gem_shrink_all

2015-10-06 Thread Daniel Vetter
I've botched this, so let's fix it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c index f6ecbda2c604..674341708033

Re: [Intel-gfx] [PATCH 2/5] drm/i915: Add a tracepoint for the shrinker

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:18:26PM +0100, Chris Wilson wrote: > Often it is very useful to know why we suddenly purge vast tracts of > memory and surprisingly up until now we didn't even have a tracepoint > for when we shrink our memory. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH 3/5] drm/i915: During shrink_all we only need to idle the GPU

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:18:27PM +0100, Chris Wilson wrote: > We can forgo an evict-everything here as the shrinker operation itself > will unbind any vma as required. If we explicitly idle the GPU through a > switch to the default context, we not only create a request in an > illegal context (e.

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Avoid GPU stalls from kswapd

2015-10-06 Thread Daniel Vetter
On Thu, Oct 01, 2015 at 12:18:29PM +0100, Chris Wilson wrote: > Exclude active GPU pages from the purview of the background shrinker > (kswapd), as these cause uncontrollable GPU stalls. Given that the > shrinker is rerun until the freelists are satisfied, we should have > opportunity in subsequent

Re: [Intel-gfx] [PATCH 1/6] drm/i915: Eliminate vmap overhead for cmd parser

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 02:44:22PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:57:10PM +0100, Chris Wilson wrote: > > With a little complexity to handle cmds straddling page boundaries, we > > can completely avoiding having to vmap the batch and the shadow batch > > objects whilst runn

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 06:13:52PM +0530, Kumar, Shobhit wrote: > On 10/06/2015 05:49 PM, Daniel Vetter wrote: > >On Tue, Oct 06, 2015 at 02:41:44PM +0300, Ville Syrjälä wrote: > >>On Tue, Oct 06, 2015 at 01:19:52PM +0200, Daniel Vetter wrote: > >>>On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar, S

Re: [Intel-gfx] [PATCH] drm/i915: Stop discarding GTT cache-domain on unbind vma

2015-10-06 Thread Daniel Vetter
On Tue, Oct 06, 2015 at 01:46:25PM +0100, Chris Wilson wrote: > On Tue, Oct 06, 2015 at 02:40:26PM +0200, Daniel Vetter wrote: > > On Tue, Oct 06, 2015 at 01:02:22PM +0100, Chris Wilson wrote: > > > Since > > > > > > commit 43566dedde54f9729113f5f9fde77d53e75e61e9 > > > Author: Chris Wilson > > >

Re: [Intel-gfx] [PATCH 3/5] drm/i915: During shrink_all we only need to idle the GPU

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 03:00:49PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:18:27PM +0100, Chris Wilson wrote: > > We can forgo an evict-everything here as the shrinker operation itself > > will unbind any vma as required. If we explicitly idle the GPU through a > > switch to the de

Re: [Intel-gfx] [PATCH 2/5] drm/i915: Add a tracepoint for the shrinker

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 02:54:25PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:18:26PM +0100, Chris Wilson wrote: > > Often it is very useful to know why we suddenly purge vast tracts of > > memory and surprisingly up until now we didn't even have a tracepoint > > for when we shrink ou

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Avoid GPU stalls from kswapd

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 03:01:45PM +0200, Daniel Vetter wrote: > On Thu, Oct 01, 2015 at 12:18:29PM +0100, Chris Wilson wrote: > > Exclude active GPU pages from the purview of the background shrinker > > (kswapd), as these cause uncontrollable GPU stalls. Given that the > > shrinker is rerun until

[Intel-gfx] [PATCH i-g-t] kms_rotation_crc: Excercise page flips with 90 degree rotation

2015-10-06 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Do some page flipping on the rotated plane just to excercise that code path. Signed-off-by: Tvrtko Ursulin Cc: Sonika Jindal Cc: Arun R Murthy --- There are some, still unofficial, reports that page flipping with 90 degree rotation may be causing a vma->pin_count leak. B

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 06:13:52PM +0530, Kumar, Shobhit wrote: > On 10/06/2015 05:49 PM, Daniel Vetter wrote: > > On Tue, Oct 06, 2015 at 02:41:44PM +0300, Ville Syrjälä wrote: > >> On Tue, Oct 06, 2015 at 01:19:52PM +0200, Daniel Vetter wrote: > >>> On Tue, Oct 06, 2015 at 04:33:43PM +0530, Kumar

Re: [Intel-gfx] [PATCH] drm/i915/skl: Init cdclk in the driver rather than relying on pre-os

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 03:04:28PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 06:13:52PM +0530, Kumar, Shobhit wrote: > > On 10/06/2015 05:49 PM, Daniel Vetter wrote: > > >On Tue, Oct 06, 2015 at 02:41:44PM +0300, Ville Syrjälä wrote: > > >>On Tue, Oct 06, 2015 at 01:19:52PM +0200, Danie

Re: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Allow universal planes to position

2015-10-06 Thread Tvrtko Ursulin
On 10/04/15 10:07, Sonika Jindal wrote: Signed-off-by: Sonika Jindal Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_display.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c ind

Re: [Intel-gfx] [PATCH] drm/i915: Fix kerneldoc for i915_gem_shrink_all

2015-10-06 Thread Jani Nikula
On Tue, 06 Oct 2015, Daniel Vetter wrote: > I've botched this, so let's fix it. Ahah, where's the reference to regressing commit, huh?! HUH?! ;) Botched in commit eb0b44adc08c0be01a027eb009e9cdadc31e65a2 Author: Daniel Vetter Date: Wed Mar 18 14:47:59 2015 +0100 drm/i915: kerneldoc for

Re: [Intel-gfx] [PATCH 2/3] drm/i915/bxt: add revision id for A1 stepping and use it

2015-10-06 Thread Jani Nikula
On Tue, 06 Oct 2015, Ville Syrjälä wrote: > On Tue, Oct 06, 2015 at 02:41:15PM +0300, Jani Nikula wrote: >> Prefer inclusive ranges for revision checks rather than "below B0". Per >> specs A2 is not used, so revid <= A1 matches revid < B0. > > The w/a db would say UNTIL_B0 etc., so might be easier

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Allow the user to pass a context to any ring

2015-10-06 Thread Daniel, Thomas
> -Original Message- > From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of > Chris Wilson > Sent: Tuesday, October 6, 2015 11:53 AM > To: intel-gfx@lists.freedesktop.org > Subject: [Intel-gfx] [PATCH 2/3] drm/i915: Allow the user to pass a context to > any ring >

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer

2015-10-06 Thread Daniel, Thomas
> -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, October 6, 2015 11:53 AM > To: intel-gfx@lists.freedesktop.org > Cc: Chris Wilson; Daniel, Thomas > Subject: [PATCH 3/3] drm/i915: Add soft-pinning API for execbuffer > > Userspace can pass in an o

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Tvrtko Ursulin
On 06/10/15 11:39, Chris Wilson wrote: Passing cliprects into the kernel for it to re-execute the batch buffer with different CMD_DRAWRECT died out long ago. As DRI1 support has been removed from the kernel, we can now simply reject any execbuf trying to use this "feature". To keep Daniel happy

[Intel-gfx] [PATCH 04/12] drm/i915: Move workaround macros to i915_drv.h

2015-10-06 Thread Mika Kuoppala
The plan is to allow workaround list usage outside of intel_ringbuffer.c, mainly in intel_pm.c where we setup assortment of workaround registers as part of intel_init_clock_gating(). Move macros to i915_drv.h and export intel_wa_add(). Remove WA_WRITE macro as there are no users of it as of now.

[Intel-gfx] [PATCH 10/12] drm/i915/hsw: Use mmio workarounds in init clock gating

2015-10-06 Thread Mika Kuoppala
For workarounds written in haswells's init clock gating path, use mmio workaround list. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_pm.c | 35 +++ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/dri

[Intel-gfx] [PATCH 08/12] drm/i915: Use mmio workaround list for skl/bxt

2015-10-06 Thread Mika Kuoppala
Some registers are, naturally, lost in gpu reset/suspend cycle. And some registers, for example in display domain and are not subject to gpu reset so they retain their contents. As hang recovery triggers a reset, recoverable gpu hang can currently flush out essential workarounds and cause havoc la

[Intel-gfx] [PATCH 12/12] drm/i915/ivb: Simplify row chicken setup logic

2015-10-06 Thread Mika Kuoppala
We always write the ROW_CHICKEN2. Make this more clear by writing it unconditionally. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_pm.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm

[Intel-gfx] [PATCH 01/12] drm/i915: Prepare for multiple workaround lists

2015-10-06 Thread Mika Kuoppala
In preparation to have separate workaround lists for both LRI and MMIO written workarounds, parametrize the register addition and printing of wa lists. Cc: Arun Siluvery Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_debugfs.c | 39 + drivers/gpu/

[Intel-gfx] [PATCH 11/12] drm/i915/ivb: Use mmio workarounds in init clock gating

2015-10-06 Thread Mika Kuoppala
Use workarounds written in ivybridge's init clock gating path, use mmio workaround list to ensure proper setup after reset/resume. This way we don't lose _3DCHICKEN and GEN7_FF_THREAD_MODE register contents on reset/suspend. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_reg.h | 2

[Intel-gfx] [PATCH 07/12] drm/i915: Write mmio workarounds after gpu reset

2015-10-06 Thread Mika Kuoppala
From: Mika Kuoppala Rewrite everything in mmio workaround list right after gpu reset. This ensures that we start the reinitialization with proper mmio workarounds in place, before we start the rings. This commit just adds the mechanism, the list itself is still empty. Following commits will add

[Intel-gfx] [PATCH 09/12] drm/i915/bdw: Use mmio workarounds in init clock gating

2015-10-06 Thread Mika Kuoppala
For workarounds written in broadwell's init clock gating path, use mmio workaround list. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 59 - 2 files changed, 38 insertions(+), 24 deletions(-)

[Intel-gfx] [PATCH 03/12] drm/i915: Don't return inside WA_REG macro

2015-10-06 Thread Mika Kuoppala
It is considered a very bad practice to return inside a macro. Instead of returning, emit a warning. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/g

[Intel-gfx] [PATCH 02/12] drm/i915: Raise the amount of workarounds one list has

2015-10-06 Thread Mika Kuoppala
As we move towards of adding mmio register setup to use workaround list, raise the maximum amount of available registers in list. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b

[Intel-gfx] [PATCH 00/12] MMIO workaround list

2015-10-06 Thread Mika Kuoppala
Hi, This series was inspired by founding out: https://bugs.freedesktop.org/show_bug.cgi?id=92315 and that we still lose some of the workarounds after reset/suspend cycle. We did build a list for LRI emitted workarounds in past to combat this same issue and checked that contexts retain wa registers

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Dave Gordon
On 06/10/15 11:39, Chris Wilson wrote: Passing cliprects into the kernel for it to re-execute the batch buffer with different CMD_DRAWRECT died out long ago. As DRI1 support has been removed from the kernel, we can now simply reject any execbuf trying to use this "feature". To keep Daniel happy

Re: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Allow universal planes to position

2015-10-06 Thread Matt Roper
On Tue, Oct 06, 2015 at 02:32:47PM +0100, Tvrtko Ursulin wrote: > > On 10/04/15 10:07, Sonika Jindal wrote: > >Signed-off-by: Sonika Jindal > >Reviewed-by: Matt Roper > >--- > > drivers/gpu/drm/i915/intel_display.c |7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > >diff -

Re: [Intel-gfx] [PATCH] drm/i915: Convert hsw_compute_linetime_wm to use in-flight state

2015-10-06 Thread Jani Nikula
On Thu, 01 Oct 2015, Matt Roper wrote: > When watermark calculation was moved up to the atomic check phase, the > code was updated to calculate based on in-flight atomic state rather > than already-committed state. However the hsw_compute_linetime_wm() > didn't get updated and continued to pull v

Re: [Intel-gfx] [PATCH] drm/i915: Move the mb() following release-mmap into release-mmap

2015-10-06 Thread Tvrtko Ursulin
Hi, On 06/10/15 12:58, Chris Wilson wrote: As paranoia, we want to ensure that the CPU's PTEs have been revoked for the object before we return from i915_gem_release_mmap(). This allows us to rely on there being no outstanding memory accesses and guarantees serialisation of the code against con

Re: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Allow universal planes to position

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 07:29:54AM -0700, Matt Roper wrote: > On Tue, Oct 06, 2015 at 02:32:47PM +0100, Tvrtko Ursulin wrote: > > > > On 10/04/15 10:07, Sonika Jindal wrote: > > >Signed-off-by: Sonika Jindal > > >Reviewed-by: Matt Roper > > >--- > > > drivers/gpu/drm/i915/intel_display.c |7

[Intel-gfx] [PATCH 06/12] drm/i915: Introduce mmio workaround list

2015-10-06 Thread Mika Kuoppala
Introduce another workaround list for mmio write type of workarounds. No users yet. Cc: Arun Siluvery Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_debugfs.c | 14 +- drivers/gpu/drm/i915/i915_drv.h | 14 ++ 2 files changed, 19 insertions(+), 9 deletions

[Intel-gfx] [PATCH 05/12] drm/i915: Specify the wa list in WA_* macros

2015-10-06 Thread Mika Kuoppala
In order to prepare for different types of workaround lists, parametrize the list we are adding the workaround register. Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_drv.h | 20 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 65 + 2 fil

[Intel-gfx] [PATCH 0/4] lrc lifecycle cleanups

2015-10-06 Thread Nick Hoath
These changes are a result of the requests made in VIZ-4277. Make the lrc path more like the legacy submission path. Attach the CPU mappings to vma (un)bind, so that the shrinker also cleans those up. Pin the CPU mappings while context is busy (pending bbs), so that the mappings aren't released/mad

[Intel-gfx] [PATCH 2/4] drm/i915: Improve dynamic management/eviction of lrc backing objects

2015-10-06 Thread Nick Hoath
Shovel all context related objects through the active queue and obj management. - Added callback in vma_(un)bind to add CPU (un)mapping at same time if desired - Inserted LRC hw context & ringbuf to vma active list Issue: VIZ-4277 Signed-off-by: Nick Hoath --- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 3/4] drm/i915: Add the CPU mapping of the hw context to the pinned items.

2015-10-06 Thread Nick Hoath
Pin the hw ctx mapping so that it is not mapped/unmapped per bb when doing GuC submission. Issue: VIZ-4277 Cc: David Gordon Signed-off-by: Nick Hoath --- drivers/gpu/drm/i915/i915_debugfs.c | 14 -- drivers/gpu/drm/i915/i915_drv.h | 4 ++- drivers/gpu/drm/i915/intel_lrc.c| 56 +

[Intel-gfx] [PATCH 4/4] drm/i915: Only update ringbuf address when necessary

2015-10-06 Thread Nick Hoath
We now only need to update the address of the ringbuf object in the hw context when it is pinned, and the hw context is first CPU mapped Issue: VIZ-4277 Cc: David Gordon Signed-off-by: Nick Hoath --- drivers/gpu/drm/i915/intel_lrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[Intel-gfx] [PATCH 1/4] drm/i915: Unify execlist and legacy request life-cycles

2015-10-06 Thread Nick Hoath
There is a desire to simplify the i915 driver by reducing the number of different code paths introduced by the LRC / execlists support. As the execlists request is now part of the gem request it is possible and desirable to unify the request life-cycles for execlist and legacy requests. Added a c

Re: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Allow universal planes to position

2015-10-06 Thread Matt Roper
On Tue, Oct 06, 2015 at 05:42:42PM +0300, Ville Syrjälä wrote: > On Tue, Oct 06, 2015 at 07:29:54AM -0700, Matt Roper wrote: > > On Tue, Oct 06, 2015 at 02:32:47PM +0100, Tvrtko Ursulin wrote: > > > > > > On 10/04/15 10:07, Sonika Jindal wrote: > > > >Signed-off-by: Sonika Jindal > > > >Reviewed-

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 03:29:20PM +0100, Dave Gordon wrote: > On 06/10/15 11:39, Chris Wilson wrote: > >Passing cliprects into the kernel for it to re-execute the batch buffer > >with different CMD_DRAWRECT died out long ago. As DRI1 support has been > >removed from the kernel, we can now simply r

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Kill DRI1 cliprects

2015-10-06 Thread Chris Wilson
On Tue, Oct 06, 2015 at 03:19:36PM +0100, Tvrtko Ursulin wrote: > > On 06/10/15 11:39, Chris Wilson wrote: > >Passing cliprects into the kernel for it to re-execute the batch buffer > >with different CMD_DRAWRECT died out long ago. As DRI1 support has been > >removed from the kernel, we can now si

[Intel-gfx] [PATCH] drm/i915: Set mode->crtc_clock during hardware state readout

2015-10-06 Thread Matt Roper
intel_mode_from_pipe_config() fills in a mode structure from the CRTC state that was read out of the hardware, but does not set the .crtc_clock field (it only sets the .clock). This causes the subsequent call to drm_calc_timestamping_constants() to complain with messages like "*ERROR* crtc 21: Can

Re: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Allow universal planes to position

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 08:16:19AM -0700, Matt Roper wrote: > On Tue, Oct 06, 2015 at 05:42:42PM +0300, Ville Syrjälä wrote: > > On Tue, Oct 06, 2015 at 07:29:54AM -0700, Matt Roper wrote: > > > On Tue, Oct 06, 2015 at 02:32:47PM +0100, Tvrtko Ursulin wrote: > > > > > > > > On 10/04/15 10:07, Soni

Re: [Intel-gfx] [PATCH] drm/i915: Set mode->crtc_clock during hardware state readout

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 09:26:31AM -0700, Matt Roper wrote: > intel_mode_from_pipe_config() fills in a mode structure from the CRTC > state that was read out of the hardware, but does not set the > .crtc_clock field (it only sets the .clock). This causes the subsequent > call to drm_calc_timestamp

Re: [Intel-gfx] [PATCH 1/5] drm/i915/kbl: Add Kabylake PCI ID

2015-10-06 Thread Vivi, Rodrigo
On Tue, 2015-10-06 at 12:09 +0300, Jani Nikula wrote: > On Tue, 06 Oct 2015, Rodrigo Vivi wrote: > > From: Deepak S > > > > v2: separate out device info into different GT (Damien) > > v3: Add is_kabylake to the KBL gt3 structuer (Damien) > > Sort the platforms in older -> newer order (Damien

Re: [Intel-gfx] [PATCH 3/5] drm/i915/kbl: Kabylake A0 is based on Skylake H0.

2015-10-06 Thread Vivi, Rodrigo
On Tue, 2015-10-06 at 12:24 +0300, Jani Nikula wrote: > On Tue, 06 Oct 2015, Rodrigo Vivi wrote: > > Kabylake is gen 9.5 derivated from Skylake H0 stepping. > > > > So we don't need pre-production Skylake workaround and also > > firmware loading will use SKL H0 offsets. > > > > Signed-off-by: Ro

Re: [Intel-gfx] [PATCH 2/3] drm/i915/bxt: add revision id for A1 stepping and use it

2015-10-06 Thread Vivi, Rodrigo
On Tue, 2015-10-06 at 16:43 +0300, Jani Nikula wrote: > On Tue, 06 Oct 2015, Ville Syrjälä > wrote: > > On Tue, Oct 06, 2015 at 02:41:15PM +0300, Jani Nikula wrote: > > > Prefer inclusive ranges for revision checks rather than "below > > > B0". Per > > > specs A2 is not used, so revid <= A1 matc

Re: [Intel-gfx] [PATCH 1/1] drm/i915/bxt: Set time interval unit to 0.833us

2015-10-06 Thread Imre Deak
On pe, 2015-09-18 at 23:39 +0530, Sagar Arun Kamble wrote: > From: Akash Goel > > Signed-off-by: Ankitprasad Sharma > Signed-off-by: Akash Goel > Signed-off-by: Sagar Arun Kamble The comment about units in gen6_set_rps_thresholds() is outdated, so you could update that while at it. In any cas

Re: [Intel-gfx] [PATCH 2/3] drm/i915/bxt: add revision id for A1 stepping and use it

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 04:43:11PM +0300, Jani Nikula wrote: > On Tue, 06 Oct 2015, Ville Syrjälä wrote: > > On Tue, Oct 06, 2015 at 02:41:15PM +0300, Jani Nikula wrote: > >> Prefer inclusive ranges for revision checks rather than "below B0". Per > >> specs A2 is not used, so revid <= A1 matches r

Re: [Intel-gfx] [DMC_REDESIGN_V2 07/14] drm/i915/gen9: Simplify csr loading failure printing.

2015-10-06 Thread Marc Herbert
On 30/09/15 07:28, Imre Deak wrote: On ke, 2015-08-26 at 16:58 +0530, Animesh Manna wrote: -void i915_firmware_load_error_print(const char *fw_path, int err) -{ - DRM_ERROR("failed to load firmware %s (%d)\n", fw_path, err); - - /* -* If the reason is not known assume -ENOEN

Re: [Intel-gfx] [PATCH 1/5] drm/i915/kbl: Add Kabylake PCI ID

2015-10-06 Thread Ville Syrjälä
On Tue, Oct 06, 2015 at 12:09:17PM +0300, Jani Nikula wrote: > On Tue, 06 Oct 2015, Rodrigo Vivi wrote: > > From: Deepak S > > > > v2: separate out device info into different GT (Damien) > > v3: Add is_kabylake to the KBL gt3 structuer (Damien) > > Sort the platforms in older -> newer order (

Re: [Intel-gfx] [PATCH 3/5] drm/i915/kbl: Kabylake A0 is based on Skylake H0.

2015-10-06 Thread Rodrigo Vivi
cc'ing Ben to get his opinion... On Tue, Oct 6, 2015 at 10:43 AM Vivi, Rodrigo wrote: > On Tue, 2015-10-06 at 12:24 +0300, Jani Nikula wrote: > > On Tue, 06 Oct 2015, Rodrigo Vivi wrote: > > > Kabylake is gen 9.5 derivated from Skylake H0 stepping. > > > > > > So we don't need pre-production Sk

Re: [Intel-gfx] [PATCH 3/5] drm/i915/kbl: Kabylake A0 is based on Skylake H0.

2015-10-06 Thread Ben Widawsky
On Tue, Oct 06, 2015 at 08:51:13PM +, Rodrigo Vivi wrote: > cc'ing Ben to get his opinion... > Of course anything is possible wrt the delta of KBL features vs SKL. With the knowledge we have, we can make a pretty educated guess that there will be no changes, and with an equally high level of

[Intel-gfx] [PATCH] drm: Check fb against plane size rather than CRTC mode for pageflip

2015-10-06 Thread Matt Roper
The legacy pageflip ioctl calls drm_crtc_check_viewport() to determine whether the framebuffer being flipped is big enough to fill the display it is being flipped to. However some drivers support "windowing" of their primary planes (i.e., a primary plane that does not cover the entire CRTC dimensi

[Intel-gfx] [PATCH i-g-t] kms_universal_plane: Add gen9-specific test

2015-10-06 Thread Matt Roper
Gen9 adds some new capabilities not present on previous platforms (primary plane windowing, 90/270 rotation, etc.). Add a new subtest to check how these new features interact with the use of the universal plane API. For now we just check whether pageflips work as expected in a windowed setting.

[Intel-gfx] [PATCH] igt/kms_addfb_basic: New subtest to check for fb modifier and tiling mode mismatch

2015-10-06 Thread Vivek Kasireddy
This new subtest will validate a Y-tiled object's tiling mode against its associated fb modifier. Cc: Tvrtko Ursulin Signed-off-by: Vivek Kasireddy --- tests/kms_addfb_basic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c index d4

  1   2   >