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

2015-10-14 Thread Dave Gordon
On 13/10/15 12:36, Chris Wilson wrote: On Tue, Oct 13, 2015 at 01:29:56PM +0200, Daniel Vetter wrote: On Fri, Oct 09, 2015 at 06:23:50PM +0100, Chris Wilson wrote: On Fri, Oct 09, 2015 at 07:18:21PM +0200, Daniel Vetter wrote: On Fri, Oct 09, 2015 at 10:45:35AM +0100, Chris Wilson wrote: On F

Re: [Intel-gfx] [PATCH] drm/i915: track relative-constants-mode per-context not per-device

2015-10-19 Thread Dave Gordon
On 13/10/15 16:28, Daniel Vetter wrote: On Tue, Oct 13, 2015 at 02:20:05PM +0100, Dave Gordon wrote: 'relative_constants_mode' has always been tracked per-device, but this is wrong in execlists (or GuC) mode, as INSTPM is saved and restored with the logical context, and the per-con

Re: [Intel-gfx] [PATCH v6] drm/i915/guc: Add GuC css header parser

2015-10-21 Thread Dave Gordon
2) Add and correct GuC related topics in kernel/Doc Signed-off-by: Alex Dai --- Docbook looks OK now, and the code is the same as last version I reviewed, so ... Reviewed-by: Dave Gordon Documentation/DocBook/gpu.tmpl | 12 ++-- drivers/gpu/drm/i915/i915_debugfs.c| 6

Re: [Intel-gfx] [PATCH v2 7/8] drm/i915: Grab execlist spinlock to avoid post-reset concurrency issues.

2015-10-22 Thread Dave Gordon
spinlock functions. Signed-off-by: Tomas Elf --- drivers/gpu/drm/i915/i915_gem.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) LGTM. Reviewed-by: Dave Gordon diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e57061a

[Intel-gfx] [PATCH] drm/i915: don't track relative-constants-mode

2015-10-22 Thread Dave Gordon
ll fail to insert the instructions to reset INSTPM into the first context's ringbuffer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448 Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h| 2 -- drivers/gpu/drm/i915/i915_gem.c| 2 -- drive

Re: [Intel-gfx] [PATCH v2 7/8] drm/i915: Grab execlist spinlock to avoid post-reset concurrency issues.

2015-10-23 Thread Dave Gordon
On 23/10/15 12:02, Tomas Elf wrote: On 23/10/2015 09:59, Daniel Vetter wrote: On Fri, Oct 23, 2015 at 09:42:27AM +0100, Tvrtko Ursulin wrote: On 19/10/15 16:32, Tomas Elf wrote: Grab execlist lock when cleaning up execlist queues after GPU reset to avoid concurrency problems between the conte

Re: [Intel-gfx] [PATCH 2/2] drm/i915: shut up gen8+ SDE irq dmesg noise

2015-10-23 Thread Dave Gordon
On 23/10/15 10:14, Daniel Vetter wrote: On Fri, Oct 23, 2015 at 10:03:50AM +0100, Chris Wilson wrote: On Fri, Oct 23, 2015 at 10:56:12AM +0200, Daniel Vetter wrote: We get tons of cases where the master interrupt handler apparently set a bit, with the SDEIIR agreeing. No idea what's going on th

Re: [Intel-gfx] [PATCH] drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping

2015-10-23 Thread Dave Gordon
On 08/10/15 21:50, Wayne Boyer wrote: From: Chris Wilson A long time ago (before 3.14) we relied on a permanent pinning of the ifbdev to lock the fb in place inside the GGTT. However, the introduction of stealing the BIOS framebuffer and reusing its address in the GGTT for the fbdev has muddied

Re: [Intel-gfx] [PATCH] drm/i915/guc: Fix a false alert of memory leak when free LRC

2015-10-23 Thread Dave Gordon
On 21/10/15 19:27, yu@intel.com wrote: From: Alex Dai There is a memory leak warning message from i915_gem_context_clean when GuC submission is enabled. The reason is that gem_request (so the LRC associated with it) is freed early than moving the vma list to inactive. We are not seeing thi

[Intel-gfx] [PATCH 6/6] drm/i915: tidy up initialisation failure paths (GEM & LRC)

2015-12-21 Thread Dave Gordon
ation. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem.c | 5 - drivers/gpu/drm/i915/intel_lrc.c | 10 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 01b1eea..20777e4 100644 --- a/dr

[Intel-gfx] [PATCH 1/6] drm/i915: mark the global default (intel_)context as such

2015-12-21 Thread Dave Gordon
;default_pointer (still) being set up; to iterate over engines in reverse, as this is teardown code; and to reduce the nesting level so it's easier to read. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_context.c | 12 +++-

[Intel-gfx] [PATCH 4/6] drm/i915: abolish separate per-engine default_context pointers

2015-12-21 Thread Dave Gordon
but multiple pointers. From an idea by Chris Wilson. Signed-off-by: Dave Gordon Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/i915_drv.h| 2 ++ drivers/gpu/drm/i915/i915_gem.c| 5 +++-- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 2/6] drm/i915: simplify testing for the global default context

2015-12-21 Thread Dave Gordon
ewritten to use it. This makes the logic more obvious, and usually saves at least one memory reference. Signed-off-by: Dave Gordon Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c | 8 +++- drivers/gpu/drm/i915/i915_gem.c | 8 ++-- drivers/gpu/drm/i915/inte

[Intel-gfx] improve handling of the driver's internal default context

2015-12-21 Thread Dave Gordon
A collection of patches to simplify the creation, use, and destruction of the driver's global default context. The first two simplify the many places where the code treats the global default context differently from any other context: [1/6] drm/i915: mark the global default (intel

[Intel-gfx] [PATCH 5/6] drm/i915: tidy up initialisation failure paths (legacy)

2015-12-21 Thread Dave Gordon
ister accesses from intel_cleanup_ring_buffer() (which calls intel_stop_ring_buffer(ring) which calls stop_ring()) down into stop_ring() itself), which is already doing low-level register accesses. Then, intel_cleanup_ring_buffer() no longer needs 'dev_priv'. Signed-off-

[Intel-gfx] [PATCH 3/6] drm/i915: simplify allocation of driver-internal requests

2015-12-21 Thread Dave Gordon
doing such request allocations and changes all such calls to use the new function. Signed-off-by: Dave Gordon Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 36 drivers/gpu/drm/i915/intel_display.c

Re: [Intel-gfx] [PATCH 1/6] drm/i915: mark the global default (intel_)context as such

2015-12-22 Thread Dave Gordon
On 22/12/15 09:08, Chris Wilson wrote: On Mon, Dec 21, 2015 at 04:04:40PM +, Dave Gordon wrote: Some of the LRC-specific context-destruction code has to special-case the global default context, bacause the HWSP is part of that context. At present it deduces it indirectly by checking for the

Re: [Intel-gfx] [PATCH 2/6] drm/i915: simplify testing for the global default context

2015-12-22 Thread Dave Gordon
On 22/12/15 09:05, Chris Wilson wrote: On Mon, Dec 21, 2015 at 04:04:41PM +, Dave Gordon wrote: There are quite a number of places where the driver tests whether a given context is or is not the global default context, usually by checking whether an engine's default_pointer points t

Re: [Intel-gfx] [PATCH 3/6] drm/i915: simplify allocation of driver-internal requests

2015-12-22 Thread Dave Gordon
On 22/12/15 09:08, Chris Wilson wrote: On Mon, Dec 21, 2015 at 04:04:42PM +, Dave Gordon wrote: There are a number of places where the driver needs a request, but isn't working on behalf of any specific user or in a specific context. For such requests, we associate them with the de

Re: [Intel-gfx] [PATCH v4] drm/i915/guc: Move GuC wq_check_space to alloc_request_extras

2015-12-23 Thread Dave Gordon
er to handle the error. v1: Move wq_reserve_space to ring_reserve_space v2: Move wq_reserve_space to alloc_request_extras (Chris Wilson) v3: The work queue head pointer is cached by driver now. So we can quickly return if space is available. s/reserve/check/g (Dave Gordon) v4: Update cached wq

[Intel-gfx] [PATCH v2, 3/4] drm/i915: simplify allocation of driver-internal requests

2015-12-23 Thread Dave Gordon
such calls to use the new function. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 39 +++- drivers/gpu/drm/i915/intel_display.c | 6 -- drivers/gpu/drm/i915/intel_over

[Intel-gfx] [PATCH v2, 1/4] drm/i915: remove intel_context::file_priv, add flag for default context

2015-12-23 Thread Dave Gordon
ntext pointer refers back to the context being operated on. In a subsequent patch, these backpointers will go away too :) Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem_context.c | 22 -- 2 files changed, 14 inser

[Intel-gfx] [PATCH v2, 2/4] drm/i915: simplify testing for the global default context

2015-12-23 Thread Dave Gordon
ts these can be rewritten to use it. This makes the logic more obvious, and usually saves at least one memory reference. In addition, with these uses eliminated, a future patch will be able to get rid of engine::default_context entirely. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH v2, 0/4] improve handling of the driver's default context

2015-12-23 Thread Dave Gordon
A reworking of the previous patchset, incorporating Daniel Vetter's point that we don't need intel_context::file_priv and Chris Wilson's wish to abolish engine::default_context. Patch 1/4 starts the process by eliminating file_priv, which was only used in one place. Patch 2/4 removes lots of refer

[Intel-gfx] [PATCH v2, 4/4] drm/i915: abolish separate per-engine default_context pointers

2015-12-23 Thread Dave Gordon
make refcounting more sensible too, as we now have a refcount of one for the one pointer, rather than a refcount of one but multiple pointers. From an idea by Chris Wilson. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h| 2 ++ drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 2/2] drm/i915: convert uses of for_each_ring() to for_each_engine()

2015-12-29 Thread Dave Gordon
Replace the for_each_ring() macro with for_each_engine() wherever the third (index) argument is (or can be made) unused. This often allows us to delete the associated local variable as well. Cc: Daniel Vetter Cc: Jani Nikula Cc: Chris Wilson Signed-off-by: Dave Gordon --- drivers/gpu/drm

[Intel-gfx] [PATCH 1/2] drm/i915: introduce for_each_engine(), rework for_each_ring()

2015-12-29 Thread Dave Gordon
other source files. Cc: Daniel Vetter Cc: Jani Nikula Cc: Chris Wilson Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 32 drivers/gpu/drm/i915/intel_uncore.c | 5 ++--- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/driver

Re: [Intel-gfx] [PATCH 17/32] drm/i915: Remove the lazy_coherency parameter from request-completed?

2016-01-04 Thread Dave Gordon
On 14/12/15 15:11, Chris Wilson wrote: On Mon, Dec 14, 2015 at 02:59:30PM +, Tvrtko Ursulin wrote: Hi, On 11/12/15 11:33, Chris Wilson wrote: Now that we have split out the seqno-barrier from the engine->get_seqno() callback itself, we can move the users of the seqno-barrier to the requir

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Derive GEM requests from dma-fence

2016-01-04 Thread Dave Gordon
On 12/12/15 15:34, Chris Wilson wrote: dma-buf provides a generic fence class for interoperation between drivers. Internally we use the request structure as a fence, and so with only a little bit of interfacing we can rebase those requests on top of dma-buf fences. This will allow us, in the futu

Re: [Intel-gfx] [PATCH 17/32] drm/i915: Remove the lazy_coherency parameter from request-completed?

2016-01-04 Thread Dave Gordon
On 04/01/16 11:26, Chris Wilson wrote: On Mon, Jan 04, 2016 at 11:16:04AM +, Dave Gordon wrote: On 14/12/15 15:11, Chris Wilson wrote: On Mon, Dec 14, 2015 at 02:59:30PM +, Tvrtko Ursulin wrote: Hi, On 11/12/15 11:33, Chris Wilson wrote: Now that we have split out the seqno-barrier

Re: [Intel-gfx] [PATCH 17/32] drm/i915: Remove the lazy_coherency parameter from request-completed?

2016-01-04 Thread Dave Gordon
On 04/01/16 13:02, Dave Gordon wrote: On 04/01/16 11:26, Chris Wilson wrote: On Mon, Jan 04, 2016 at 11:16:04AM +, Dave Gordon wrote: On 14/12/15 15:11, Chris Wilson wrote: On Mon, Dec 14, 2015 at 02:59:30PM +, Tvrtko Ursulin wrote: Hi, On 11/12/15 11:33, Chris Wilson wrote: Now

Re: [Intel-gfx] [PATCH 1/2] drm/i915: introduce for_each_engine(), rework for_each_ring()

2016-01-04 Thread Dave Gordon
On 29/12/15 19:18, Chris Wilson wrote: On Tue, Dec 29, 2015 at 06:59:57PM +, Dave Gordon wrote: In the discussions around commit 373701b1 (Jani Nikula) drm: fix potential dangling else problems in for_each_ macros Daniel Vetter mooted the idea of a for_each_engine(ring, dev_priv) macro

Re: [Intel-gfx] [PATCH 07/32] drm/i915: Store the reset counter when constructing a request

2016-01-04 Thread Dave Gordon
On 16/12/15 10:19, Chris Wilson wrote: On Wed, Dec 16, 2015 at 10:44:19AM +0100, Daniel Vetter wrote: On Fri, Dec 11, 2015 at 11:33:03AM +, Chris Wilson wrote: As the request is only valid during the same global reset epoch, we can record the current reset_counter when constructing the requ

Re: [Intel-gfx] [PATCH 17/32] drm/i915: Remove the lazy_coherency parameter from request-completed?

2016-01-04 Thread Dave Gordon
On 04/01/16 14:20, Chris Wilson wrote: On Mon, Jan 04, 2016 at 02:09:53PM +, Dave Gordon wrote: On 04/01/16 13:02, Dave Gordon wrote: On 04/01/16 11:26, Chris Wilson wrote: On Mon, Jan 04, 2016 at 11:16:04AM +, Dave Gordon wrote: On 14/12/15 15:11, Chris Wilson wrote: On Mon, Dec 14

Re: [Intel-gfx] [PATCH v2, 2/4] drm/i915: simplify testing for the global default context

2016-01-04 Thread Dave Gordon
On 23/12/15 21:02, Chris Wilson wrote: On Wed, Dec 23, 2015 at 07:33:53PM +, Dave Gordon wrote: There are quite a number of places where the driver tests whether a given context is or is not the global default context, usually by checking whether an engine's default_pointer points t

Re: [Intel-gfx] [PATCH 07/32] drm/i915: Store the reset counter when constructing a request

2016-01-04 Thread Dave Gordon
On 04/01/16 16:10, Chris Wilson wrote: On Mon, Jan 04, 2016 at 03:58:21PM +, Dave Gordon wrote: On 16/12/15 10:19, Chris Wilson wrote: On Wed, Dec 16, 2015 at 10:44:19AM +0100, Daniel Vetter wrote: On Fri, Dec 11, 2015 at 11:33:03AM +, Chris Wilson wrote: @@ -1288,7 +1286,7 @@ int

Re: [Intel-gfx] [PATCH 18/32] drm/i915: Use HWS for seqno tracking everywhere

2016-01-04 Thread Dave Gordon
On 11/12/15 11:33, Chris Wilson wrote: By using the same address for storing the HWS on every platform, we can remove the platform specific vfuncs and reduce the get-seqno routine to a single read of a cached memory location. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c

Re: [Intel-gfx] [PATCH v2 0/5] Add GuC ADS (Addition Data Structure)

2016-01-04 Thread Dave Gordon
- drivers/gpu/drm/i915/intel_guc_loader.c| 7 ++ drivers/gpu/drm/i915/intel_lrc.c | 4 +- drivers/gpu/drm/i915/intel_lrc.h | 1 + 7 files changed, 220 insertions(+), 3 deletions(-) For the whole series, Reviewed-by: Dave Gordon

[Intel-gfx] [PATCH] drm/i915: add kerneldoc for intel_lr_context_size()

2016-01-05 Thread Dave Gordon
This function was recently renamed & exposed, so now it gets documented Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/intel_lrc.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 8da67b3..366

Re: [Intel-gfx] [PATCH 14/32] drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+

2016-01-05 Thread Dave Gordon
On 11/12/15 11:33, Chris Wilson wrote: In order to ensure seqno/irq coherency, we current read a ring register. We are not sure quite how it works, only that is does. Experiments show that e.g. doing a clflush(seqno) instead is not sufficient, but we can remove the forcewake dance from the mmio a

Re: [Intel-gfx] [PATCH v2, 2/4] drm/i915: simplify testing for the global default context

2016-01-05 Thread Dave Gordon
On 05/01/16 10:06, Chris Wilson wrote: On Mon, Jan 04, 2016 at 01:38:26PM -0800, Jesse Barnes wrote: On 01/04/2016 11:39 AM, Chris Wilson wrote: This series is NAKed. Why? Because you want things in a different order? Or do you object to something in Dave's reply? The series was intended

[Intel-gfx] [PATCH v3 0/3] improve handling of the driver's internal (default) context

2016-01-07 Thread Dave Gordon
During startup, the driver creates a unique "intel_context" that will provide a home for orphan requests (i.e. those generated by the driver internally, not associated with user batchbuffers). However, one of the infelicities of the current code is that the driver keeps a per-engine pointer to the

[Intel-gfx] [PATCH v3 2/3] drm/i915: abolish separate per-ring default_context pointers

2016-01-07 Thread Dave Gordon
his make refcounting more sensible too, as we now have a refcount of one for the one pointer, rather than a refcount of one but multiple pointers. From an idea by Chris Wilson. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c| 4 ++-- drivers/gpu/drm/i915/i915_drv.h

Re: [Intel-gfx] ✗ failure: Fi.CI.BAT

2016-01-07 Thread Dave Gordon
On 07/01/16 14:36, Daniel Vetter wrote: On Thu, Jan 07, 2016 at 03:06:13PM +0200, Jani Nikula wrote: On Thu, 07 Jan 2016, Dave Gordon wrote: On 06/01/16 10:20, Patchwork wrote: == Summary == Built on 24b053acb16b4b3b021575e4ee30ffedd3ab2920 drm-intel-nightly: 2016y-01m-06d-08h-16m-11s UTC

Re: [Intel-gfx] [PATCH igt] core/sighelper: Interrupt everyone in the process group

2016-01-11 Thread Dave Gordon
On 11/01/16 09:06, Daniel Vetter wrote: On Mon, Jan 11, 2016 at 08:54:59AM +, Chris Wilson wrote: On Mon, Jan 11, 2016 at 08:57:33AM +0100, Daniel Vetter wrote: On Fri, Jan 08, 2016 at 08:44:29AM +, Chris Wilson wrote: Some stress tests create both the signal helper and a lot of compet

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests

2016-01-11 Thread Dave Gordon
On 07/01/16 16:56, Chris Wilson wrote: On Thu, Jan 07, 2016 at 12:34:39PM +, Dave Gordon wrote: On 07/01/16 11:58, Chris Wilson wrote: On Thu, Jan 07, 2016 at 10:20:50AM +, Dave Gordon wrote: There are a number of places where the driver needs a request, but isn't working on beha

Re: [Intel-gfx] [PATCH igt] core/sighelper: Interrupt everyone in the process group

2016-01-11 Thread Dave Gordon
On 11/01/16 12:34, Chris Wilson wrote: On Mon, Jan 11, 2016 at 12:25:07PM +, Dave Gordon wrote: On 11/01/16 09:06, Daniel Vetter wrote: On Mon, Jan 11, 2016 at 08:54:59AM +, Chris Wilson wrote: On Mon, Jan 11, 2016 at 08:57:33AM +0100, Daniel Vetter wrote: On Fri, Jan 08, 2016 at 08

Re: [Intel-gfx] [PATCH 017/190] drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+

2016-01-11 Thread Dave Gordon
On 11/01/16 09:16, Chris Wilson wrote: In order to ensure seqno/irq coherency, we current read a ring register. We are not sure quite how it works, only that is does. Experiments show that e.g. doing a clflush(seqno) instead is not sufficient, but we can remove the forcewake dance from the mmio a

Re: [Intel-gfx] [PATCH 102/190] drm/i915: Move the "per-ring" default_context to the device

2016-01-11 Thread Dave Gordon
On 11/01/16 10:44, Chris Wilson wrote: We have a false notion of a default_context allocated per engine, whereas actually it is a singular context reserved for kernel use. Remove it from the engines, and rename it thus. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c

Re: [Intel-gfx] [PATCH 019/190] drm/i915: Separate out the seqno-barrier from engine->get_seqno

2016-01-11 Thread Dave Gordon
| 39 drivers/gpu/drm/i915/intel_ringbuffer.c | 36 +++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ++-- 9 files changed, 53 insertions(+), 56 deletions(-) All looks OK, so Reviewed-by: Dave Gordon diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/g

Re: [Intel-gfx] [PATCH 020/190] drm/i915: Remove the lazy_coherency parameter from request-completed?

2016-01-11 Thread Dave Gordon
is the right place for the magic, but at least it's preferable to having a lazy_coherency parameter. So on the basis that the proper review criterion is "better than before, and creates no new problems", and not "fixes all known issues", then Reviewed-by: Dave Gor

Re: [Intel-gfx] [PATCH 04/13] drm/i915: Fail engine initialization if LRCA is incorrectly aligned

2016-01-11 Thread Dave Gordon
On 11/01/16 08:31, Daniel Vetter wrote: On Fri, Jan 08, 2016 at 11:29:43AM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin LRCA can change only when it goes from unpinned to pinned so it makes sense to check its alignment at that point rather than at every batch buffer submission. Furthermo

Re: [Intel-gfx] [PATCH 11/13] drm/i915: Cache ringbuffer GTT address

2016-01-11 Thread Dave Gordon
On 08/01/16 11:29, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Purpose is to avoid calling i915_gem_obj_ggtt_offset from the interrupt context without the big lock held. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/intel_lrc.c| 3 +-- drivers/gpu/drm/i915/intel_ringbuffer.

Re: [Intel-gfx] [PATCH 05/13] drm/i915: Cache LRCA in the context

2016-01-11 Thread Dave Gordon
On 11/01/16 08:38, Daniel Vetter wrote: On Fri, Jan 08, 2016 at 11:29:44AM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin We are not allowed to call i915_gem_obj_ggtt_offset from irq context without the big kernel lock held. LRCA lifetime is well defined so cache it so it can be looked up

Re: [Intel-gfx] [PATCH 021/190] drm/i915: Use HWS for seqno tracking everywhere

2016-01-11 Thread Dave Gordon
On 11/01/16 09:16, Chris Wilson wrote: By using the same address for storing the HWS on every platform, we can remove the platform specific vfuncs and reduce the get-seqno routine to a single read of a cached memory location. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c

Re: [Intel-gfx] [PATCH] drm/i915/guc: Fix a memory leak where guc->execbuf_client is not freed

2016-01-12 Thread Dave Gordon
On 06/01/16 20:53, yu@intel.com wrote: From: Alex Dai During driver unloading, the guc_client created for command submission needs to be released to avoid memory leak. Signed-off-by: Alex Dai --- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests

2016-01-12 Thread Dave Gordon
On 07/01/16 16:53, Chris Wilson wrote: On Thu, Jan 07, 2016 at 08:49:38AM -0800, Jesse Barnes wrote: On 01/07/2016 03:58 AM, Chris Wilson wrote: On Thu, Jan 07, 2016 at 10:20:50AM +, Dave Gordon wrote: There are a number of places where the driver needs a request, but isn't worki

Re: [Intel-gfx] [PATCH v4 00/38] GPU scheduler for i915 driver

2016-01-12 Thread Dave Gordon
On 12/01/2016 11:43, John Harrison wrote: On 12/01/2016 04:37, Tian, Kevin wrote: From: john.c.harri...@intel.com Sent: Tuesday, January 12, 2016 2:42 AM From: John Harrison Implemented a batch buffer submission scheduler for the i915 DRM driver. The general theory of operation is that whe

Re: [Intel-gfx] [PATCH v2 2/7] drm/i915: Do not call API requiring struct_mutex where it is not available

2016-01-12 Thread Dave Gordon
name. Signed-off-by: Tvrtko Ursulin Cc: Daniel Vetter Cc: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c | 15 ++-- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - drivers/gpu/drm/i915/intel_lrc.c

Re: [Intel-gfx] [PATCH 6/7] drm/i915: Only grab timestamps when needed

2016-01-12 Thread Dave Gordon
indirection through parameter bad. Reviewed-by: Dave Gordon ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v3 4/7] drm/i915: Cache LRC state page in the context

2016-01-12 Thread Dave Gordon
On 12/01/16 13:11, Chris Wilson wrote: On Tue, Jan 12, 2016 at 12:54:25PM +, Tvrtko Ursulin wrote: On 12/01/16 12:12, Chris Wilson wrote: On Tue, Jan 12, 2016 at 11:56:11AM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin LRC lifetime is well defined so we can cache the page pointing t

Re: [Intel-gfx] [PATCH 066/190] drm/i915: Simplify request_alloc by returning the allocated request

2016-01-12 Thread Dave Gordon
On 11/01/16 09:17, Chris Wilson wrote: If is simpler and leads to more readable code through the callstack if the allocation returns the allocated struct through the return value. The importance of this is that it no longer looks like we accidentally allocate requests as side-effect of calling c

Re: [Intel-gfx] [PATCH 055/190] drm/i915: Unify intel_logical_ring_emit and intel_ring_emit

2016-01-12 Thread Dave Gordon
On 11/01/16 09:17, Chris Wilson wrote: Both perform the same actions with more or less indirection, so just unify the code. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c| 2 +- drivers/gpu/drm/i915/i915_gem_context.c| 8 +- drivers/gpu/drm/i915/i915_gem

Re: [Intel-gfx] [PATCH 006/190] drm/i915: Add GEM debugging Kconfig option

2016-01-12 Thread Dave Gordon
On 11/01/16 09:16, Chris Wilson wrote: Currently there is a #define to enable extra BUG_ON for debugging requests and associated activities. I want to expand its use to cover all of GEM internals (so that we can saturate the code with asserts). We can add a Kconfig option to make it easier to ena

Re: [Intel-gfx] [PATCH 004/190] drm/i915: Fix some invalid requests cancellations

2016-01-12 Thread Dave Gordon
On 11/01/16 09:16, Chris Wilson wrote: As we add the VMA to the request early, it may be cancelled during execbuf reservation. This will leave the context object pointing to a dangling request; i915_wait_request() simply skips the wait and so we may unbind the object whilst it is still active.

Re: [Intel-gfx] [PATCH 053/190] drm/i915: Convert i915_semaphores_is_enabled over to early sanitize

2016-01-12 Thread Dave Gordon
+- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 20 +-- 8 files changed, 46 insertions(+), 43 deletions(-) LGTM. Reviewed-by: Dave Gordon [aside] The conditions below seem to exclude a lot of systems. It looks like semaphores can

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: tidy up a few leftovers

2016-01-13 Thread Dave Gordon
On 12/01/16 13:53, Daniel Vetter wrote: On Thu, Jan 07, 2016 at 10:20:52AM +, Dave Gordon wrote: There are a few bits of code which the transformations implemented by the previous patch reveal to be suboptimal, once the notion of a per- ring default context has gone away. So this tidies up

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests

2016-01-13 Thread Dave Gordon
On 12/01/16 14:27, Chris Wilson wrote: On Tue, Jan 12, 2016 at 01:56:48PM +, Chris Wilson wrote: But we were removing the engine->default_context as it complicated the rest of the code. I strongly prefer keeping the contexts explicit as context separation should be first and foremost in the

Re: [Intel-gfx] [PATCH] drm/i915: Expose exec parameter to force non IA-Coherent for Gen9+

2016-01-13 Thread Dave Gordon
On 13/01/16 12:53, Chris Wilson wrote: On Wed, Jan 13, 2016 at 11:44:39AM +0100, Artur Harasimiuk wrote: Starting from Gen9 we can use IA-Coherent caches. Coherence may be not required in certain cases and can be disabled in an easy way. To do this we can set HDC_FORCE_NON_COHERENT bit in HDC_CH

Re: [Intel-gfx] [PATCH v1] drm/i915/guc: Fix a memory leak where guc->execbuf_client is not freed

2016-01-13 Thread Dave Gordon
i915_guc_submission_fini and take struct_mutex lock before release GuC client. (Dave Gordon) You don't seem to have implemented all the points I mentioned? I think you want: drivers/gpu/drm/i915/intel_guc_loader.c: @@ -445,6 +445,7 @@ int intel_guc_ucode_load(struct drm_device

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests

2016-01-13 Thread Dave Gordon
On 13/01/16 13:41, Chris Wilson wrote: On Wed, Jan 13, 2016 at 01:27:51PM +, Dave Gordon wrote: On 12/01/16 14:27, Chris Wilson wrote: On Tue, Jan 12, 2016 at 01:56:48PM +, Chris Wilson wrote: But we were removing the engine->default_context as it complicated the rest of the code

Re: [Intel-gfx] [PATCH v1] drm/i915/guc: Fix a memory leak where guc->execbuf_client is not freed

2016-01-13 Thread Dave Gordon
On 13/01/16 18:17, Yu Dai wrote: On 01/13/2016 10:15 AM, Dave Gordon wrote: On 12/01/16 23:17, yu@intel.com wrote: > From: Alex Dai > > During driver unloading, the guc_client created for command submission > needs to be released to avoid memory leak. > > The struct_mute

Re: [Intel-gfx] [PATCH] drm/i915: Allow i915_gem_object_get_page() on userptr as well

2016-01-13 Thread Dave Gordon
instances of and references to the structure rather than the abstract type. But it doesn't actually do any harm, so with or without the redundant 'const' it gets: Reviewed-by: Dave Gordon ___ Intel-gfx mailing list Intel-gfx@lists.freed

Re: [Intel-gfx] [PATCH v2] drm/i915/guc: Fix a memory leak where guc->execbuf_client is not freed

2016-01-13 Thread Dave Gordon
i915_guc_submission_fini and take struct_mutex lock before release GuC client. (Dave Gordon) v2: Add the locking for failure case in guc_fw_fetch. (Dave Gordon) Add i915_guc_submission_fini for failure case in intel_guc_ucode_load. Signed-off-by: Alex Dai LGTM. Reviewed-by: Dave Gordon diff --git

Re: [Intel-gfx] [PATCH] drm/i915: Codify our assumption that the Global GTT is <= 4GiB

2016-01-15 Thread Dave Gordon
graphics device = %lluM\n", gtt->base.total >> 20); LGTM. Reviewed-by: Dave Gordon ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 079/190] drm/i915: Reduce the pointer dance of i915_is_ggtt()

2016-01-15 Thread Dave Gordon
nce. Now why didn't I think of that? That looks like such a good idea, we should apply it in other CONTEXTs! Reviewed-by: Dave Gordon ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH v4 1/3] drm/i915: simplify allocation of driver-internal requests

2016-01-19 Thread Dave Gordon
mp;req); if (err) ... NEW: req = i915_gem_request_alloc(ring, NULL); if (IS_ERR(req)) ... v4: Rebased Signed-off-by: Dave Gordon Reviewed-by: Nick Hoath --- drivers/gpu/drm/i915/i915_drv.h| 6 ++-- drivers/gpu/drm/i915/i915_gem.c| 55 ++

[Intel-gfx] [PATCH v4 0/3] improve handling of the driver's default (kernel) context

2016-01-19 Thread Dave Gordon
During startup, the driver creates a unique "intel_context" that will provide a home for orphan requests (i.e. those generated by the driver internally, not associated with user batchbuffers). However, one of the infelicities of the current code is that the driver keeps a per-engine pointer to the

[Intel-gfx] [PATCH v4 2/3] drm/i915: abolish separate per-ring default_context pointers

2016-01-19 Thread Dave Gordon
he multiple (per-ring) pointers to the default context with a single pointer to the unique kernel context. v4: Rebased, remove underused local (Nick Hoath) Signed-off-by: Dave Gordon Reviewed-by: Nick Hoath Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c| 4 ++-- driv

[Intel-gfx] [PATCH v4 3/3] drm/i915: tidy up a few leftovers

2016-01-19 Thread Dave Gordon
less clearly a simple transformation. In particular, any change which alters the code block structure or indentation has been deferred into this separate patch, because such things tend to make diffs more difficult to read. v4: Rebased Signed-off-by: Dave Gordon Reviewed-by: Nick Hoath

Re: [Intel-gfx] ✗ Fi.CI.BAT: warning for improve handling of the driver's default (kernel) context

2016-01-20 Thread Dave Gordon
On 20/01/16 07:49, Patchwork wrote: == Summary == Built on 7d26528d30b0d8119c858115b6e5e22deb74ec71 drm-intel-nightly: 2016y-01m-19d-19h-38m-52s UTC integration manifest Test gem_storedw_loop: Subgroup basic-render: pass -> DMESG-WARN (bdw-nuci7) UNSTABLE http

[Intel-gfx] [PATCH 1/4] drm/i915: handle teardown of HWSP when context is freed

2016-01-21 Thread Dave Gordon
_page(), making sure that they both take the same argument (pointer to engine). They encapsulate all the details of the relationship between the default context and the status page, so the rest of the LRC code doesn't have to know about it. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/intel_

[Intel-gfx] A collection of cleanups

2016-01-21 Thread Dave Gordon
Also includes Nick Hoath's patch to swap context/engine teardown. In-Reply-To: ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 4/4] drm/i915: tidy up initialisation failure paths (GEM & LRC)

2016-01-21 Thread Dave Gordon
ation. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem.c | 5 - drivers/gpu/drm/i915/intel_lrc.c | 10 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 799a53a..041e0e1 100644 --- a/dr

[Intel-gfx] [PATCH 3/4] drm/i915: tidy up initialisation failure paths (legacy)

2016-01-21 Thread Dave Gordon
ister accesses from intel_cleanup_ring_buffer() (which calls intel_stop_ring_buffer(ring) which calls stop_ring()) down into stop_ring() itself), which is already doing low-level register accesses. Then, intel_cleanup_ring_buffer() no longer needs 'dev_priv'. Signed-off-

[Intel-gfx] [PATCH 2/4] drm/i915: Fix context/engine cleanup order

2016-01-21 Thread Dave Gordon
at it actually does (cleanup engines, not a ringbuffer), and fix an annoying whitespace issue. v2: Also make the fix in i915_load_modeset_init, not just in i915_driver_unload (Chris Wilson) v3: Had extra stuff in it. v4: Reverted extra stuff (so we're back to v2). Rebased and updated comme

Re: [Intel-gfx] A collection of cleanups

2016-01-21 Thread Dave Gordon
On 21/01/16 19:37, Dave Gordon wrote: Also includes Nick Hoath's patch to swap context/engine teardown. In-Reply-To: Hmm, editor/mailer seems to have dropped most of this summary :( Probably something to do with that IRT-line above ... what it was supposed to say was approximately

[Intel-gfx] [PATCH] Fix pointer tests in error-handling paths

2016-01-22 Thread Dave Gordon
tests need to be updated to accommodate this case. Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 1/4] drm/i915: handle teardown of HWSP when context is freed

2016-01-22 Thread Dave Gordon
On 22/01/16 10:28, Mika Kuoppala wrote: Dave Gordon writes: Existing code did a kunmap() on the wrong page, and didn't account for the fact that the HWSP and the default context are different offsets within the same GEM object. Just to note here that usually we try to split bug fixes

Re: [Intel-gfx] ✗ Fi.CI.BAT: warning for series starting with [1/4] drm/i915: handle teardown of HWSP when context is freed

2016-01-22 Thread Dave Gordon
On 22/01/16 07:42, Patchwork wrote: == Summary == Built on 8fe9e785ae04fa7c37f7935cff12d62e38054b60 drm-intel-nightly: 2016y-01m-21d-11h-02m-42s UTC integration manifest Test kms_pipe_crc_basic: Subgroup read-crc-pipe-a-frame-sequence: pass -> DMESG-WARN (ilk-hp

[Intel-gfx] [PATCH v2 5/6] drm/i915: HWSP should be unmapped earlier in LRC teardown sequence

2016-01-22 Thread Dave Gordon
as first implemented. v2: Split from "handle teardown of HWSP when context is freed". Signed-off-by: Dave Gordon Cc: Mika Kuoppala --- drivers/gpu/drm/i915/intel_lrc.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/int

[Intel-gfx] [PATCH v2 0/6] A collection of cleanups

2016-01-22 Thread Dave Gordon
Various things can go wrong during initialisation and teardown, but they usually don't, so the error-handling paths go largely untested. This collection of patches fixes some things I recently noticed. Some might lead to a kernel OOPS, but mostly they're leaks and other inconsistencies. Includes

[Intel-gfx] [PATCH v2 1/6] drm/i915: fix context/engine cleanup order

2016-01-22 Thread Dave Gordon
at it actually does (cleanup engines, not a ringbuffer), and fix an annoying whitespace issue. v2: Also make the fix in i915_load_modeset_init, not just in i915_driver_unload (Chris Wilson) v3: Had extra stuff in it. v4: Reverted extra stuff (so we're back to v2). Rebased and updated comme

[Intel-gfx] [PATCH v2 2/6] drm/i915: tidy up initialisation failure paths (GEM & LRC)

2016-01-22 Thread Dave Gordon
ation. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem.c | 5 - drivers/gpu/drm/i915/intel_lrc.c | 10 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 799a53a..041e0e1 100644 --- a/dr

[Intel-gfx] [PATCH v2 3/6] drm/i915: tidy up initialisation failure paths (legacy)

2016-01-22 Thread Dave Gordon
ister accesses from intel_cleanup_ring_buffer() (which calls intel_stop_ring_buffer(ring) which calls stop_ring()) down into stop_ring() itself), which is already doing low-level register accesses. Then, intel_cleanup_ring_buffer() no longer needs 'dev_priv'. Signed-off-

[Intel-gfx] [PATCH v2 6/6] drm/i915: consolidate LRC mode HWSP setup & teardown

2016-01-22 Thread Dave Gordon
ntext is freed". Signed-off-by: Dave Gordon Cc: Mika Kuoppala --- drivers/gpu/drm/i915/intel_lrc.c | 58 +++- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index c702fc2..8

[Intel-gfx] [PATCH v2 4/6] drm/i915: unmap the correct page in intel_logical_ring_cleanup()

2016-01-22 Thread Dave Gordon
andle teardown of HWSP when context is freed". Signed-off-by: Dave Gordon Cc: Mika Kuoppala --- drivers/gpu/drm/i915/intel_lrc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 282d66a

Re: [Intel-gfx] [PATCH v2 3/6] drm/i915: tidy up initialisation failure paths (legacy)

2016-01-25 Thread Dave Gordon
On 25/01/16 10:52, Chris Wilson wrote: On Fri, Jan 22, 2016 at 11:10:08PM +, Dave Gordon wrote: 1. Fix intel_cleanup_ring_buffer() to handle the error cleanup case where the ringbuffer has been allocated but map-and-pin failed. Unpin it iff it's previously been mapped-and-p

Re: [Intel-gfx] [PATCH v2 4/6] drm/i915: unmap the correct page in intel_logical_ring_cleanup()

2016-01-25 Thread Dave Gordon
On 25/01/16 10:54, Chris Wilson wrote: On Fri, Jan 22, 2016 at 11:10:09PM +, Dave Gordon wrote: The kunmap() call here didn't match the corresponding kmap(). The kmapping was changed with the introduction of the GuC-compatible layout of context objects and the introduction of "LRC

Re: [Intel-gfx] [PATCH v2 5/6] drm/i915: HWSP should be unmapped earlier in LRC teardown sequence

2016-01-25 Thread Dave Gordon
On 25/01/16 10:56, Chris Wilson wrote: On Fri, Jan 22, 2016 at 11:10:10PM +, Dave Gordon wrote: In LRC mode, the HWSP is part of the default context object, and therefore does not exist independently. Worse, it doesn't contribute to the refcount on the default context object e

<    3   4   5   6   7   8   9   10   11   12   >