Re: [Intel-gfx] [CI 17/25] drm/i915: Assign every HW context a unique ID

2016-04-28 Thread Dave Gordon
On 28/04/16 16:32, Chris Wilson wrote: On Thu, Apr 28, 2016 at 03:55:44PM +0100, Dave Gordon wrote: On 28/04/16 09:56, Chris Wilson wrote: The hardware tracks contexts and expects all live contexts (those active on the hardware) to have a unique identifier. This is used by the hardware to

Re: [Intel-gfx] [CI 22/25] drm/i915: Track the previous pinned context inside the request

2016-04-28 Thread Dave Gordon
On 28/04/16 09:56, Chris Wilson wrote: As the contexts are accessed by the hardware until the switch is completed to a new context, the hardware may still be writing to the context object after the breadcrumb is visible. We must not unpin/unbind/prune that object whilst still active and so we kee

Re: [Intel-gfx] ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: introduce & use i915_gem_object_mark_dirty()

2016-04-28 Thread Dave Gordon
On 28/04/16 18:48, Patchwork wrote: == Series Details == Series: series starting with [1/2] drm/i915: introduce & use i915_gem_object_mark_dirty() URL : https://patchwork.freedesktop.org/series/6491/ State : warning == Summary == Series 6491v1 Series without cover letter http://patchwork.fr

Re: [Intel-gfx] [PATCH 02/10] drm/i915: Fix ordering of sanitize ppgtt and sanitize execlists

2016-04-28 Thread Dave Gordon
On 28/04/16 17:24, Chris Wilson wrote: The i915.enable_ppgtt option depends upon the state of i915.enable_execlists option - so we need to sanitize execlists first. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_dma.c | 13 + drivers/gpu/drm/i915/i915_drv.h |

Re: [Intel-gfx] [PATCH v2 2/5] drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space, submit}()

2016-05-03 Thread Dave Gordon
On 29/04/16 16:08, Tvrtko Ursulin wrote: On 27/04/16 19:03, Dave Gordon wrote: The knowledge of how to derive the relevant client from the request should be localised within i915_guc_submission.c; the LRC code shouldn't have to know about the internal details of the GuC submission process

Re: [Intel-gfx] [PATCH 03/10] drm/i915: Fix gen8 semaphores id for legacy mode

2016-05-04 Thread Dave Gordon
On 29/04/2016 09:49, Chris Wilson wrote: On Fri, Apr 29, 2016 at 09:36:37AM +0100, Tvrtko Ursulin wrote: On 28/04/16 17:24, Chris Wilson wrote: With the introduction of a distinct engine->id vs the hardware id, we need to fix up the value we use for selecting the target engine when signaling a

Re: [Intel-gfx] [PATCH v3] drm/i915: resize the GuC WOPCM for rc6

2016-05-05 Thread Dave Gordon
izes the GuC WOPCM (specifically on BXT) so that the GuC and RC6 memory spaces do not overlap. Issue: https://jira01.devtools.intel.com/browse/VIZ-6638 Signed-off-by: Peter Antoine Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_guc_reg.h | 6 +++--- drivers/gpu/drm/i915/intel_guc_

Re: [Intel-gfx] [PATCH v3] drm/i915: resize the GuC WOPCM for rc6

2016-05-05 Thread Dave Gordon
On 05/05/2016 15:02, Antoine, Peter wrote: The attached version still does not explain that the WOPCM_TOP is to tell the GuC not to use that space. That's NOT what WOPCM_TOP means. The GuC is allowed to use the space up to the value stored in the GUC_WOPCM_SIZE register (as the comment above

Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: rework guc_add_workqueue_item()

2016-05-05 Thread Dave Gordon
On 29/04/2016 16:44, Tvrtko Ursulin wrote: On 27/04/16 19:03, Dave Gordon wrote: Mostly little optimisations; for instance, if the driver is correctly following the submission protocol, the "out of space" condition is impossible, so the previous runtime WARN_ON() is promoted to a

Re: [Intel-gfx] [PATCH v3] drm/i915: resize the GuC WOPCM for rc6

2016-05-06 Thread Dave Gordon
On 06/05/16 10:37, Nick Hoath wrote: On 05/05/2016 16:04, Dave Gordon wrote: On 05/05/2016 15:02, Antoine, Peter wrote: The attached version still does not explain that the WOPCM_TOP is to tell the GuC not to use that space. That's NOT what WOPCM_TOP means. The GuC is allowed to us

Re: [Intel-gfx] [PATCH] drm/i915: Small display interrupt handlers tidy

2016-05-06 Thread Dave Gordon
On 06/05/16 14:27, Tvrtko Ursulin wrote: On 06/05/16 12:27, Chris Wilson wrote: On Fri, May 06, 2016 at 12:07:04PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin I have noticed some of our interrupt handlers use both dev and dev_priv while they could get away with only dev_priv in the hug

Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: rework guc_add_workqueue_item()

2016-05-06 Thread Dave Gordon
On 06/05/16 09:55, Tvrtko Ursulin wrote: On 05/05/16 19:38, Dave Gordon wrote: On 29/04/2016 16:44, Tvrtko Ursulin wrote: On 27/04/16 19:03, Dave Gordon wrote: Mostly little optimisations; for instance, if the driver is correctly following the submission protocol, the "out of

Re: [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: don't spinwait if the GuC's workqueue is full

2016-05-06 Thread Dave Gordon
On 29/04/16 16:45, Tvrtko Ursulin wrote: One late comment: On 27/04/16 19:03, Dave Gordon wrote: Rather than wait to see whether more space becomes available in the GuC submission workqueue, we can just return -EAGAIN and let the caller try again in a little while. This gets rid of an

Re: [Intel-gfx] [PATCH v2 1/5] drm/i915/guc: add enable_guc_loading parameter

2016-05-06 Thread Dave Gordon
On 29/04/16 16:03, Tvrtko Ursulin wrote: Hi, On 27/04/16 19:03, Dave Gordon wrote: Split the function of "enable_guc_submission" into two separate options. The new one ("enable_guc_loading") controls only the *fetching and loading* of the GuC firmware image. The existing

Re: [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: don't spinwait if the GuC's workqueue is full

2016-05-06 Thread Dave Gordon
On 29/04/16 16:17, Tvrtko Ursulin wrote: On 27/04/16 19:03, Dave Gordon wrote: Rather than wait to see whether more space becomes available in the GuC submission workqueue, we can just return -EAGAIN and let the caller try again in a little while. This gets rid of an uninterruptable sleep in

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Introduce INTEL_GEN_RANGE macro

2016-05-06 Thread Dave Gordon
On 06/05/16 15:33, Chris Wilson wrote: On Fri, May 06, 2016 at 03:16:25PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin To be used for more efficient Gen range checking. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_fbc.c

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Do not use a bitfield for INTEL_INFO->num_pipes

2016-05-06 Thread Dave Gordon
:3; + u8 num_pipes; u8 num_sprites[I915_MAX_PIPES]; u8 gen; u16 gen_mask; On my build, this saves 322 bytes, which (since it eliminates just ONE three-byte instruction on each use), suggests it's used quite a lot! Reviewed-by: Dave Gordon

[Intel-gfx] [PATCH v3 2/6] drm/i915/guc: add enable_guc_loading parameter

2016-05-06 Thread Dave Gordon
2 REQUIRE must load/use the GuC, else leave the GPU wedged The new platform default (as coded here) will be to attempt to load the GuC iff the device has a GuC that requires firmware, but not yet to use it for submission. A later patch will change to enable it if appropriate. Signed-off-by:

[Intel-gfx] [PATCH v3 5/6] drm/i915/guc: rework guc_add_workqueue_item()

2016-05-06 Thread Dave Gordon
7;t happen" errors. With those changes, we can convert it to void, as suggested by Chris Wilson, and update the calling code appropriately. v3: Note that we're now putting the request seqno in the "fence_id" field of each GuC-work-item, in case it turns up somewhere

[Intel-gfx] [PATCH v3 6/6] drm/i915/guc: change default to using GuC submission if possible

2016-05-06 Thread Dave Gordon
y of these conditions are not met, the driver will fall back to using execlist mode. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c ind

[Intel-gfx] [PATCH v3 4/6] drm/i915/guc: don't spinwait if the GuC's workqueue is full

2016-05-06 Thread Dave Gordon
o see how often we find the WQ full. v3: Flag the likely() code path (Tvtrko Ursulin). Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c| 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 18 +++--- drivers/gpu/drm/i915/intel_guc.h | 8 --

[Intel-gfx] [PATCH v3 1/6] drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED

2016-05-06 Thread Dave Gordon
xists, not whether we're trying to use it for submission. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 10 -- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drive

[Intel-gfx] [PATCH v3 3/6] drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space, submit}()

2016-05-06 Thread Dave Gordon
hable from) the request. v3: GEM_BUG_ON() for bad GuC client (Tvrtko Ursulin). Add/update kerneldoc explaining check_space/submit protocol Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_guc_submission.c | 46 -- drivers/gpu/drm/i915/intel_guc.h

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dmabuf: Pin pages as we flush for CPU access

2016-05-06 Thread Dave Gordon
On 06/05/16 15:36, Chris Wilson wrote: As a precautionary defensive measure against changes to the core (where we stop changing domains when unbinding), we want to ensure that the pages are available when we want to start CPU access, otherwise we will not perform the requisite clflushes to make t

[Intel-gfx] [PATCH 1/3] Introduce & use new SG page iterators

2016-05-09 Thread Dave Gordon
page() are then converted to the new simpler macros. Signed-off-by: Dave Gordon Cc: Imre Deak Cc: linux-ker...@vger.kernel.org --- drivers/gpu/drm/i915/i915_cmd_parser.c | 8 drivers/gpu/drm/i915/i915_gem.c | 10 -- drivers/gpu/drm/i915/i915_gem_fence.c | 5 +++-- d

[Intel-gfx] [PATCH 3/3] drm/i915: optimise i915_gem_object_map() for small objects

2016-05-09 Thread Dave Gordon
er (4 pages) or a context image (currently up to 22 pages). v5: change name of local array [Chris Wilson] Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) dif

[Intel-gfx] [PATCH 2/3] drm/i915: refactor i915_gem_object_pin_map()

2016-05-09 Thread Dave Gordon
t clearer and easier to modify. v2: Restructure loop-over-pages & error check (Chris Wilson) v3: Use new nicer SGL page-range iterator (Dave Gordon) Add page count to debug messages (Chris Wilson) Convert WARN_ON() to GEM_BUG_ON() Signed-off-by: Dave Gordon Cc: Tvrtko U

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Replace "INTEL_INFO->gen == x" checks with IS_GENx

2016-05-09 Thread Dave Gordon
On 06/05/16 14:43, Tvrtko Ursulin wrote: From: Tvrtko Ursulin This way optimization from a previous patch works even better. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/i915_dma.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Introduce INTEL_GEN_RANGE macro

2016-05-09 Thread Dave Gordon
On 09/05/16 13:32, Jani Nikula wrote: On Fri, 06 May 2016, Dave Gordon wrote: On 06/05/16 15:33, Chris Wilson wrote: On Fri, May 06, 2016 at 03:16:25PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin To be used for more efficient Gen range checking. Signed-off-by: Tvrtko Ursulin

[Intel-gfx] [PATCH v4 4/7] drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space, submit}()

2016-05-13 Thread Dave Gordon
hable from) the request. v2: GEM_BUG_ON() for bad GuC client (Tvrtko Ursulin). Add/update kerneldoc explaining check_space/submit protocol Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_guc_submission.c | 46 -- drivers/gp

[Intel-gfx] [PATCH v4 1/7] drm/i915/guc: rename loader entry points

2016-05-13 Thread Dave Gordon
The GuC initialisation code could do other things apart from loading firmware, so here we rename the three primary entry points to remove any specific reference to "ucode" (no functional changes, just renaming). Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_dma.c

Re: [Intel-gfx] [PATCH v2 1/5] drm/i915/guc: add enable_guc_loading parameter

2016-05-13 Thread Dave Gordon
On 10/05/16 15:37, Tvrtko Ursulin wrote: On 06/05/16 17:39, Dave Gordon wrote: On 29/04/16 16:03, Tvrtko Ursulin wrote: [snip] +goto fail; +if (fw_path == NULL) +goto fail; +if (*fw_path == '\0') { +DRM_ERROR("No GuC firmware known for

[Intel-gfx] [PATCH v4 5/7] drm/i915/guc: don't spinwait if the GuC's workqueue is full

2016-05-13 Thread Dave Gordon
o see how often we find the WQ full. v2: Flag the likely() code path (Tvtrko Ursulin). v4: Add/update comments about failure counters (Tvtrko Ursulin). Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c| 1 + drivers/gpu/drm/i915/i915_guc_submission.c

[Intel-gfx] [PATCH v4 0/7] Enable GuC submission

2016-05-13 Thread Dave Gordon
default on suitable platforms [PATCH 7/7]. Dave Gordon (7): drm/i915/guc: rename loader entry points drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED drm/i915/guc: add enable_guc_loading parameter drm/i915/guc: pass request (not client) to i915_guc_{wq_check_space,submi

[Intel-gfx] [PATCH v4 6/7] drm/i915/guc: rework guc_add_workqueue_item()

2016-05-13 Thread Dave Gordon
seful (e.g. in a GuC log) [Tvrtko Ursulin]. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_guc_submission.c | 71 +++--- drivers/gpu/drm/i915/intel_guc.h | 2 +- drivers/gpu/drm/i915/intel_guc_fwif.h | 3 +- 3

[Intel-gfx] [PATCH v4 7/7] drm/i915/guc: change default to using GuC submission if possible

2016-05-13 Thread Dave Gordon
y of these conditions are not met, the driver will fall back to using execlist mode. Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gp

[Intel-gfx] [PATCH v4 2/7] drm/i915/guc: distinguish HAS_GUC() from HAS_GUC_UCODE/HAS_GUC_SCHED

2016-05-13 Thread Dave Gordon
or testing enable_guc_submission. v4: Added a couple more uses of the new macro. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 10 -- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 2 +

[Intel-gfx] [PATCH v4 3/7] drm/i915/guc: add enable_guc_loading parameter

2016-05-13 Thread Dave Gordon
some error-message levels, mostly ERROR->INFO, per review comments by Tvrtko Ursulin. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem.c| 1 - drivers/gpu/drm/i915/i915_guc_submission.c | 4 +- drivers/gpu/drm/i915/i915_params.c | 14 +++- driver

Re: [Intel-gfx] [PATCH RESEND 1/2] drm/i915: make device info bitfield flags bools

2016-05-16 Thread Dave Gordon
On 13/05/16 16:05, Tvrtko Ursulin wrote: On 13/05/16 15:47, Jani Nikula wrote: On Fri, 13 May 2016, Chris Wilson wrote: On Fri, May 13, 2016 at 03:25:05PM +0100, Tvrtko Ursulin wrote: On 13/05/16 15:04, Jani Nikula wrote: This is more robust for assignments and comparisons. Signed-off-by:

[Intel-gfx] [PATCH 1/3] drm/i915: refactor i915_gem_object_pin_map()

2016-05-16 Thread Dave Gordon
t clearer and easier to modify. v2: Restructure loop-over-pages & error check (Chris Wilson) v3: Add page count to debug messages (Chris Wilson) Convert WARN_ON() to GEM_BUG_ON() Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin Cc: Chris Wilson --- drivers/gpu/

[Intel-gfx] [PATCH 2/3] drm/i915: optimise i915_gem_object_map() for small objects

2016-05-16 Thread Dave Gordon
er (4 pages) or a context image (currently up to 22 pages). v5: change name of local array [Chris Wilson] Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) dif

[Intel-gfx] [PATCH 3/3] Introduce & use new lightweight SGL iterators

2016-05-16 Thread Dave Gordon
the DMA address of each page in turn; the other provides the 'struct page' pointer required by many memory management operations. Various uses of for_each_sg_page() are then converted to the new macros. Signed-off-by: Dave Gordon Cc: Chris Wilson Cc: linux-ker...@vger.kernel.org --- d

Re: [Intel-gfx] [PATCH v4 3/7] drm/i915/guc: add enable_guc_loading parameter

2016-05-16 Thread Dave Gordon
On 13/05/16 16:31, Tvrtko Ursulin wrote: On 13/05/16 15:36, Dave Gordon wrote: Split the function of "enable_guc_submission" into two separate options. The new one ("enable_guc_loading") controls only the *fetching and loading* of the GuC firmware image. The existing

[Intel-gfx] [PATCH v5 3/7] drm/i915/guc: add enable_guc_loading parameter

2016-05-16 Thread Dave Gordon
some error-message levels, mostly ERROR->INFO, per review comments by Tvrtko Ursulin. v5: Dropped one more error message, disabled GuC submission on hypothetical firmware-free devices [Tvrtko Ursulin]. Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915

[Intel-gfx] [PATCH v4 1/2] drm/i915: refactor i915_gem_object_pin_map()

2016-05-17 Thread Dave Gordon
t clearer and easier to modify. v2: Restructure loop-over-pages & error check [Chris Wilson] v3: Add page count to debug messages [Chris Wilson] Convert WARN_ON() to GEM_BUG_ON() v4: Drop the DEBUG messages [Tvrtko Ursulin] Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin Cc: Ch

[Intel-gfx] [PATCH v4 2/2] drm/i915: optimise i915_gem_object_map() for small objects

2016-05-17 Thread Dave Gordon
er (4 pages) or a context image (currently up to 22 pages). v2: change name of local array [Chris Wilson] Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --g

Re: [Intel-gfx] [PATCH 1/3] drm/i915: refactor i915_gem_object_pin_map()

2016-05-17 Thread Dave Gordon
On 17/05/16 10:22, Tvrtko Ursulin wrote: On 16/05/16 16:19, Dave Gordon wrote: The recently-added i915_gem_object_pin_map() can be further optimised for "small" objects. To facilitate this, and simplify the error paths before adding the new code, this patch pulls out the "mappi

Re: [Intel-gfx] ✗ Ro.CI.BAT: failure for series starting with [v4,1/2] drm/i915: refactor i915_gem_object_pin_map()

2016-05-17 Thread Dave Gordon
On 17/05/16 14:23, Patchwork wrote: == Series Details == Series: series starting with [v4,1/2] drm/i915: refactor i915_gem_object_pin_map() URL : https://patchwork.freedesktop.org/series/7292/ State : failure == Summary == Series 7292v1 Series without cover letter http://patchwork.freedeskt

[Intel-gfx] [PATCH v2] drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM

2016-05-17 Thread Dave Gordon
mming operations [Dave Gordon]. Issue: https://jira01.devtools.intel.com/browse/VIZ-6638 Signed-off-by: Peter Antoine Signed-off-by: Dave Gordon Reviewed-by: Nick Hoath Tested-by: Nick Hoath --- drivers/gpu/drm/i915/i915_guc_reg.h | 6 +++--- drivers/gpu/drm/i915/intel_guc_loader.c

Re: [Intel-gfx] ✗ Ro.CI.BAT: failure for drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM

2016-05-18 Thread Dave Gordon
On 17/05/16 17:03, Patchwork wrote: == Series Details == Series: drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM URL : https://patchwork.freedesktop.org/series/7300/ State : failure == Summary == Series 7300v1 drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM http://patchwork

[Intel-gfx] [PATCH v4 1/4] drm/i915: refactor i915_gem_object_pin_map()

2016-05-19 Thread Dave Gordon
t clearer and easier to modify. v2: Restructure loop-over-pages & error check [Chris Wilson] v3: Add page count to debug messages [Chris Wilson] Convert WARN_ON() to GEM_BUG_ON() v4: Drop the DEBUG messages [Tvrtko Ursulin] Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursul

[Intel-gfx] [PATCH v4 3/4] Introduce & use new lightweight SGL iterators

2016-05-19 Thread Dave Gordon
the DMA address of each page in turn; the other provides the 'struct page' pointer required by many memory management operations. Various uses of for_each_sg_page() are then converted to the new macros. Signed-off-by: Dave Gordon Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH v4 4/4] Try inlining sg_next()

2016-05-19 Thread Dave Gordon
Signed-off-by: Dave Gordon Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 01cde0f..53ff499 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v4 2/4] drm/i915: optimise i915_gem_object_map() for small objects

2016-05-19 Thread Dave Gordon
er (4 pages) or a context image (currently up to 22 pages). v5: change name of local array [Chris Wilson] Signed-off-by: Dave Gordon Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/

Re: [Intel-gfx] [PATCH v4 10/25] drm/i915/slpc: Allocate/Release/Initialize SLPC shared data

2016-09-07 Thread Dave Gordon
On 07/09/16 14:52, kbuild test robot wrote: Hi Tom, [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on next-20160907] [cannot apply to v4.8-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.

Re: [Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-07 Thread Dave Gordon
On 06/09/16 21:36, Nicolas Iooss wrote: On 06/09/16 12:21, Dave Gordon wrote: On 04/09/16 19:58, Nicolas Iooss wrote: When building the kernel with clang and some warning flags, the compiler reports that the return value of dcs_get_backlight() may be uninitialized: drivers/gpu/drm/i915

[Intel-gfx] [PATCH v6] drm: two more (drm_)printk() wrapper macros (fixup)

2016-09-07 Thread Dave Gordon
t seems unlikely that they'll be as useful. v2: Fix whitespace, missing ## (Eric Engestrom) v3: Much simplified after underlying functions were reworked. v6: Fixup, effectively revert v2 and apply v3 Signed-off-by: Dave Gordon Reviewed-by: Eric Engestrom (v2, v3) Reviewed-b

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

2016-09-07 Thread Dave Gordon
On 26/08/16 20:55, Chris Wilson wrote: On Fri, Aug 26, 2016 at 08:46:25PM +0100, Dave Gordon wrote: @@ -1520,6 +1528,14 @@ static void eb_export_fence(struct drm_i915_gem_object *obj, if (ret) return ret; + if (instp_mode != I915_EXEC_CONSTANTS_REL_GENERAL

[Intel-gfx] [CI_RESEND v4 1/5] drm/i915/guc: symbolic names for GuC submission preferences

2016-09-07 Thread Dave Gordon
names for the values representing the DEFAULT, DISABLED, PREFERRED, and MANDATORY submission options that the user can select (-1, 0, 1, 2 respectively). This should produce identical code to the previous version! Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin Cc: Jani Nikula --- drivers/gp

[Intel-gfx] [CI_RESEND v4 3/5] drm/i915/guc: symbolic name for GuC log-level none

2016-09-07 Thread Dave Gordon
umeric value that is already used. This should produce identical code to the previous version! Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin Cc: Jani Nikula --- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_guc_fwif.h | 1 + drivers/gpu/drm/i915/intel_guc_loader.

[Intel-gfx] [CI_RESEND v4 0/5] drm/i915/guc: use symbolic names for module parameter values

2016-09-07 Thread Dave Gordon
added (3/4 Re-enable GuC loading & submission (4/4) Added cover letter v4: Additional final patch (5/5) to change treatment of unrecognised option values (ignore them rather than force them into range). [Jani Nikula] Dave Gordon (5): drm/i915/guc: symbolic names for GuC submis

[Intel-gfx] [CI_RESEND v4 2/5] drm/i915/guc: symbolic names for GuC firmare loading preferences

2016-09-07 Thread Dave Gordon
es for the values representing the DEFAULT, DISABLED, PREFERRED, and MANDATORY options that the user can select (-1, 0, 1, 2 respectively). This should produce identical code to the previous version! Signed-off-by: Dave Gordon Cc: Tvrtko Ursulin Cc: Jani Nikula --- drivers/gpu/drm/i915/i

[Intel-gfx] [CI_RESEND v4 5/5] drm/i915/guc: ignore unrecognised loading & submission options

2016-09-07 Thread Dave Gordon
we also have to report that we've ignored unknown values so that the administrator or developer knows the kernel command line wasn't sensible! Signed-off-by: Dave Gordon Cc: Jani Nikula --- drivers/gpu/drm/i915/intel_guc.h| 8 drivers/gpu/drm/i915/intel_guc_loa

[Intel-gfx] [CI_RESEND v4 4/5] drm/i915/guc: use symbolic names in setting defaults for module parameters

2016-09-07 Thread Dave Gordon
Of course, this also re-enables GuC loading and submission by default on suitable platforms, since it's Intel's Plan of Record that GuC submission shall be used where available. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_params.c | 10 +- 1 file changed, 5 insert

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/guc: use symbolic names for module parameter values (rev5)

2016-09-08 Thread Dave Gordon
On 08/09/16 08:52, Patchwork wrote: == Series Details == Series: drm/i915/guc: use symbolic names for module parameter values (rev5) URL : https://patchwork.freedesktop.org/series/10188/ State : failure == Summary == Series 10188v5 drm/i915/guc: use symbolic names for module parameter values

Re: [Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-08 Thread Dave Gordon
On 08/09/16 00:02, Nicolas Iooss wrote: On 07/09/16 18:03, Dave Gordon wrote: On 06/09/16 21:36, Nicolas Iooss wrote: On 06/09/16 12:21, Dave Gordon wrote: On 04/09/16 19:58, Nicolas Iooss wrote: When building the kernel with clang and some warning flags, the compiler reports that the return

Re: [Intel-gfx] [RFC] drm/i915: Emit to ringbuffer directly

2016-09-09 Thread Dave Gordon
On 09/09/16 09:32, Tvrtko Ursulin wrote: On 08/09/16 17:40, Chris Wilson wrote: On Thu, Sep 08, 2016 at 04:12:55PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin This removes the usage of intel_ring_emit in favour of directly writing to the ring buffer. I have the same patch! But I call

[Intel-gfx] [PATCH] drm/i915: introduce & use i915_gem_object_{set, clear, is}_dirty()

2016-09-09 Thread Dave Gordon
ris Wilson's preferred names for flag-related functions Inspired-by: http://www.spinics.net/lists/intel-gfx/msg92390.html Cc: Chris Wilson Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/i915_drv.h| 22 +-

[Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-09 Thread Dave Gordon
NFO(DEV)->gen + INTEL_GEN(DEV_PRIV) ...> } @dev_priv_local@ idexpression struct drm_device *DEV; identifier DEV_PRIV; expression E; @@ { ... ( struct drm_i915_private *DEV_PRIV; | struct drm_i915_private *DEV_PRIV = E; ) <... - INTEL_INFO(DEV)->gen + INTEL_GEN(

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-09 Thread Dave Gordon
On 09/09/16 22:58, Chris Wilson wrote: On Fri, Sep 09, 2016 at 10:37:46PM +0100, Dave Gordon wrote: More Coccinellery ... Wherever we find "INTEL_INFO(dev)->gen", and have a suitable "dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)", which is the pre

Re: [Intel-gfx] [PATCH v3] drm/i915: Emit to ringbuffer directly

2016-09-12 Thread Dave Gordon
nd an advance, or an advance and a begin (when writing to the ring is not allowed!). .Dave. * Rebase and tidy. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Dave Gordon --- drivers/gpu/drm/i915/i915_gem_context.c| 75 ++-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 37 +- drivers/gp

[Intel-gfx] [PATCH 2/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 2)

2016-09-12 Thread Dave Gordon
IS_CHERRYVIEW(dev))" and then manually to "if (INTEL_GEN(dev_priv) < 7 || IS_CHERRYVIEW(dev_priv))" Also in a few cases we can remove or move a local variable. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_gem_fence.c | 9 - drivers/gpu/drm/i915/i915_gem_stolen

[Intel-gfx] [PATCH 1/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-12 Thread Dave Gordon
NFO(DEV)->gen + INTEL_GEN(DEV_PRIV) ...> } @dev_priv_local@ idexpression struct drm_device *DEV; identifier DEV_PRIV; expression E; @@ { ... ( struct drm_i915_private *DEV_PRIV; | struct drm_i915_private *DEV_PRIV = E; ) <... - INTEL_INFO(DEV)->gen + INTEL_GEN(DEV_PRIV)

[Intel-gfx] [PATCH 3/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 3)

2016-09-12 Thread Dave Gordon
hange also lets us remove a local variable. This patch covers just intel_display.c, which gets its own patch because it's large, and is also a particularly heavy user of "INTEL_INFO()->gen"; about as many uses as the whole of the rest of the driver put together. Signed-off-by: Dave Gord

[Intel-gfx] [PATCH 0/3] drm/i915: use INTEL_GEN(dev_priv) wherever possible

2016-09-12 Thread Dave Gordon
als with those that needed a little manual tweaking, and patch 3 is just intel_display.c separated out 'cos it's huge. Dave Gordon (3): drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 2) d

[Intel-gfx] [PATCH 0/3] (Final) tidying up of GuC code

2016-09-12 Thread Dave Gordon
Mostly renaming the GuC functions to use a more consistent naming scheme, along with updating comments to clarify some of the code. Dave Gordon (3): drm/i915: clarify PMINTRMSK/pm_intr_keep usage drm/i915/guc: general tidying up (loader) drm/i915/guc: general tidying up (submission

[Intel-gfx] [PATCH 1/3] drm/i915: clarify PMINTRMSK/pm_intr_keep usage

2016-09-12 Thread Dave Gordon
No functional changes; just renaming a bit, tweaking a datatype, prettifying layout, and adding comments, in particular in the GuC setup code that touches this data. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 4

[Intel-gfx] [PATCH 3/3] drm/i915/guc: general tidying up (submission)

2016-09-12 Thread Dave Gordon
Renaming to more consistent scheme, and updating comments, mostly about i915_guc_wq_reserve(), aka i915_guc_wq_check_space(). Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_guc_submission.c | 63 +++--- drivers/gpu/drm/i915/intel_guc.h | 2

[Intel-gfx] [PATCH 2/3] drm/i915/guc: general tidying up (loader)

2016-09-12 Thread Dave Gordon
Renaming to more consistent scheme, delete unused definitions Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_guc_reg.h | 3 --- drivers/gpu/drm/i915/intel_guc_loader.c | 27 --- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu

[Intel-gfx] [PATCH] drm/i915: Only expand COND once in wait_for()

2016-09-14 Thread Dave Gordon
t it turned out that due to a missing iniitialiser, gcc had "gone wild trimming undefined code" :( This version acheives a rather more modest (but still worthwhile) gain of ~550 bytes. Signed-off-by: Dave Gordon Original-idea-by: Chris Wilson Cc: Chris Wilson Cc: Zanoni, Paulo R ---

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-14 Thread Dave Gordon
On 13/09/16 10:10, Jani Nikula wrote: On Sat, 10 Sep 2016, Dave Gordon wrote: Thanks, the other things I was thinking of fixing in the remaining files were generally things like if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev)) Is that a real or a made up example? IS_G33() would be red

Re: [Intel-gfx] [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

2016-09-14 Thread Dave Gordon
On 14/09/16 13:32, Dave Gordon wrote: On 13/09/16 10:10, Jani Nikula wrote: On Sat, 10 Sep 2016, Dave Gordon wrote: Thanks, the other things I was thinking of fixing in the remaining files were generally things like if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev)) Is that a real or

Re: [Intel-gfx] [PATCH] drm/i915: introduce & use i915_gem_object_{set, clear, is}_dirty()

2016-09-14 Thread Dave Gordon
On 12/09/16 16:48, Tvrtko Ursulin wrote: Hi, On 09/09/16 20:48, Dave Gordon wrote: This just hides the existing obj->dirty flag inside a trivial inline setter, to discourage non-GEM code from looking too closely. The flag is renamed to emphasise that it is private to the GEM mem

[Intel-gfx] [PATCH v3] drm/i915: introduce & use i915_gem_object_{set, clear, is}_dirty()

2016-09-14 Thread Dave Gordon
ris Wilson's preferred names for flag-related functions v3: Remove a couple of changes left over from a prototype version Inspired-by: http://www.spinics.net/lists/intel-gfx/msg92390.html Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c

Re: [Intel-gfx] [PATCH 3/3] drm/i915/guc: general tidying up (submission)

2016-09-14 Thread Dave Gordon
On 14/09/16 16:22, Tvrtko Ursulin wrote: On 12/09/2016 21:19, Dave Gordon wrote: Renaming to more consistent scheme, and updating comments, mostly about i915_guc_wq_reserve(), aka i915_guc_wq_check_space(). Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_guc_submission.c | 63

Re: [Intel-gfx] [PATCH 05/18] drm/i915: Move GEM activity tracking into a common struct reservation_object

2016-09-15 Thread Dave Gordon
On 14/09/16 18:35, Chris Wilson wrote: On Wed, Sep 14, 2016 at 12:44:04PM +0300, Joonas Lahtinen wrote: On ke, 2016-09-14 at 07:52 +0100, Chris Wilson wrote: -static inline bool -i915_gem_object_has_active_engine(const struct drm_i915_gem_object *obj, - int engin

Re: [Intel-gfx] [PATCH v2] dim: Avoid false positives with BUG detection

2016-03-19 Thread Dave Gordon
On 17/03/16 11:27, Jani Nikula wrote: On Thu, 17 Mar 2016, Tvrtko Ursulin wrote: [ text/plain ] On 11/03/16 15:31, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Makes sure that the diff line adding the BUG is not immediately preceded by the diff line removing the BUG. Or in other words, avoid

[Intel-gfx] [PATCH 0/7] Fixes and worarounds for GuC issues

2016-03-21 Thread Dave Gordon
failure Dave Gordon (6): drm/i915/guc: always reset GuC before loading firmware drm/i915/guc: add doorbell map to debugfs/i915_guc_info drm/i915/guc: move guc_ring_doorbell() nearer to callsite drm/i915/guc: refactor doorbell management code drm/i915/guc: (re)initialise doorbell h/w when

[Intel-gfx] [PATCH 2/7] drm/i915/guc: always reset GuC before loading firmware

2016-03-21 Thread Dave Gordon
es to the definition of the GUC_STATUS register, which is the key diagnostic indicator if the GuC load fails. Signed-off-by: Dave Gordon Cc: Arun Siluvery Cc: Alex Dai --- drivers/gpu/drm/i915/i915_guc_reg.h | 12 -- drivers/gpu/drm/i915/intel_guc_loader.c | 40 ---

[Intel-gfx] [PATCH 6/7] drm/i915/guc: (re)initialise doorbell h/w when enabling GuC submission

2016-03-21 Thread Dave Gordon
at all the doorbell hardware is left in a consistent state, no matter how it was programmed by the previously-running kernel and/or GuC firmware. Signed-off-by: Dave Gordon Cc: Arun Siluvery Cc: Alex Dai --- drivers/gpu/drm/i915/i915_guc_submission.c | 46 +- 1 file c

[Intel-gfx] [PATCH 1/7] drm/i915/guc: Reset GuC and retry on firmware load failure

2016-03-21 Thread Dave Gordon
eload mechanism proved helpful when we indeed hit fw load failure so it is better to include this to improve driver stability. This change implements the following WA, WaEnableuKernelHeaderValidFix:skl,bxt WaEnableGuCBootHashCheckNotSet:skl,bxt Signed-off-by: Arun Siluvery Signed-off-by: Dave Gordo

[Intel-gfx] [PATCH 7/7] drm/i915/guc: disable GuC submission earlier during GuC (re)load

2016-03-21 Thread Dave Gordon
eload fails, we don't recreate the client, so fallback to execlists mode (if active) won't leak the client object (previously, the now-unusable client would have been left allocated, and leaked if the driver were unloaded). Signed-off-by: Dave Gordon Cc: Arun Siluvery Cc: Alex Dai ---

[Intel-gfx] [PATCH 4/7] drm/i915/guc: move guc_ring_doorbell() nearer to callsite

2016-03-21 Thread Dave Gordon
e doorbell management code, this function is somewhat time-critical, so putting it near its caller may even yield a tiny performance improvement. Signed-off-by: Dave Gordon Cc: Arun Siluvery Cc: Alex Dai --- drivers/gpu/drm/i915/i915_guc_submission.c | 128 +++-- 1 file c

[Intel-gfx] [PATCH 5/7] drm/i915/guc: refactor doorbell management code

2016-03-21 Thread Dave Gordon
During a hibernate/resume cycle, the driver, the GuC, and the doorbell hardware can end up in inconsistent states. This patch refactors the driver's handling and tracking of doorbells, in preparation for a later one which will resolve the issue. Signed-off-by: Dave Gordon Cc: Arun Siluver

[Intel-gfx] [PATCH 3/7] drm/i915/guc: add doorbell map to debugfs/i915_guc_info

2016-03-21 Thread Dave Gordon
To properly verify the driver->doorbell->GuC functionality, validation needs to know how the driver has assigned the doorbell cache lines and registers, so make them visible through debugfs. Signed-off-by: Dave Gordon Cc: Arun Siluvery Cc: Alex Dai --- drivers/gpu/drm/i915/i915_debugfs

Re: [Intel-gfx] [PATCH 2/6] drm/i915: Allow passing any known pointer to for_each_engine()

2016-03-21 Thread Dave Gordon
On 18/03/16 21:16, Chris Wilson wrote: Rather than require the user to grab a drm_i915_private, allow them to pass anything that we know how to derive such a pointer user to_i915() Note this fixes a macro bug in for_each_engine_masked() which was not using its dev_priv__ parameter. Signed-off-b

Re: [Intel-gfx] [PATCH v2] drm/i915: Name the anonymous per-engine context struct

2016-03-21 Thread Dave Gordon
On 18/03/16 17:26, Tvrtko Ursulin wrote: From: Tvrtko Ursulin This anonymous struct was causing a good amount of overly verbose code. Also, if we name it and cache the pointer locally when there are multiple accesses to it, not only the code is more readable, but the compiler manages to generat

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Use to_i915() instead of guc_to_i915()

2016-03-22 Thread Dave Gordon
On 18/03/16 21:16, Chris Wilson wrote: The convenience of saving a few characters by using a consistent interface to obtain our drm_i915_private struct from intel_guc. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h| 4 +++- drivers/gpu/drm/i915/i915_guc_submissi

Re: [Intel-gfx] [PATCH v2] drm/i915: Name the anonymous per-engine context struct

2016-03-22 Thread Dave Gordon
On 22/03/16 09:28, Chris Wilson wrote: On Mon, Mar 21, 2016 at 03:23:57PM +, Dave Gordon wrote: On 18/03/16 17:26, Tvrtko Ursulin wrote: From: Tvrtko Ursulin This anonymous struct was causing a good amount of overly verbose code. Also, if we name it and cache the pointer locally when

[Intel-gfx] [PATCH v3 2/2] drm/i915: tidy up a few more references to engine[]

2016-03-22 Thread Dave Gordon
index operations. Signed-off-by: Dave Gordon --- drivers/gpu/drm/i915/i915_debugfs.c| 13 + drivers/gpu/drm/i915/i915_guc_submission.c | 17 + 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm

<    1   2   3   4   5   6   7   8   9   10   >