[Intel-gfx] [PATCH v8 5/8] drm/i915/perf: lock powergating configuration to default when active

2018-05-29 Thread Lionel Landwerlin
etely unreasonable to hold on powergating for the same reason. v2: Leave RPCS programming in intel_lrc.c (Lionel) v3: Update for s/union intel_sseu/struct intel_sseu/ (Lionel) More to_intel_context() (Tvrtko) s/dev_priv/i915/ (Tvrtko) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm

[Intel-gfx] [PATCH v8 7/8] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-29 Thread Lionel Landwerlin
EPERM when dynamic sseu is disabled (Tvrtko) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_drv.h | 13

[Intel-gfx] [PATCH v8 0/8] drm/i915: per context slice/subslice powergating

2018-05-29 Thread Lionel Landwerlin
SSEU) configuration to userspace Lionel Landwerlin (5): drm/i915/perf: simplify configure all context function drm/i915/perf: reuse intel_lrc ctx regs macro drm/i915/perf: lock powergating configuration to default when active drm/i915: create context image vma in kernel context drm/i915: ad

[Intel-gfx] [PATCH v8 4/8] drm/i915/perf: reuse intel_lrc ctx regs macro

2018-05-29 Thread Lionel Landwerlin
Abstract the context image access a bit. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_perf.c | 34 +++- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v8 2/8] drm/i915: Record the sseu configuration per-context & engine

2018-05-29 Thread Lionel Landwerlin
sseu from union to struct (Tvrtko) Move context default sseu in existing loop (Chris) v6: s/intel_sseu_from_device_sseu/intel_device_default_sseu/ (Tvrtko) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 14 ++ drivers/gpu

[Intel-gfx] [PATCH v8 1/8] drm/i915: Program RPCS for Broadwell

2018-05-29 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v8 3/8] drm/i915/perf: simplify configure all context function

2018-05-29 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_per

Re: [Intel-gfx] [PATCH i-g-t] igt/gem_ctx_isolation: Test INSTPM back to gen6

2018-05-29 Thread Lionel Landwerlin
: Lionel Landwerlin Cc: Joonas Lahtinen Reviewed-by: Lionel Landwerlin --- tests/gem_ctx_isolation.c | 51 --- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/tests/gem_ctx_isolation.c b/tests/gem_ctx_isolation.c index 4968e3678..fe7d3490c

Re: [Intel-gfx] [PATCH 04/11] drm/i915/icl: WaEnableFloatBlendOptimization

2018-05-29 Thread Lionel Landwerlin
FYI, we're setting this in Mesa : https://cgit.freedesktop.org/mesa/mesa/tree/src/intel/vulkan/genX_state.c#n130 https://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/i965/brw_state_upload.c#n67 I don't think we realized this was a privileged register. Anuj: Maybe we can drop it? - Li

Re: [Intel-gfx] [PATCH v6 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-25 Thread Lionel Landwerlin
On 24/05/18 11:39, Tvrtko Ursulin wrote: --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -981,7 +981,8 @@ int i915_gem_context_setparam_ioctl(struct drm_device *dev, void *data,   break;   }   -    if (!capable(C

Re: [Intel-gfx] [PATCH 2/3] drm/i915/trace: Remove engine out of the context sandwich

2018-05-25 Thread Lionel Landwerlin
On 25/05/18 11:28, Lionel Landwerlin wrote: On 25/05/18 09:26, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In the string tracepoint representation we ended up with the engine sandwiched between context hardware id and context fence id. Move the two pieces of context data together for

Re: [Intel-gfx] [PATCH 2/3] drm/i915/trace: Remove engine out of the context sandwich

2018-05-25 Thread Lionel Landwerlin
both fields remaing under the existing name and ordering. v2: * Do not consolidate the printk format, just reorder. (Lionel) Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Maybe there was misunderstanding on my previous comment. What I wanted to let you know is that the parser in igt

Re: [Intel-gfx] [PATCH 1/3] drm/i915/trace: Describe engines as class:instance pairs

2018-05-25 Thread Lionel Landwerlin
nce. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: svetlana.kukan...@intel.com Reviewed-by: Chris Wilson Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_trace.h | 107 ++ 1 file changed, 65 insertions(+), 42 deletions(-) d

Re: [Intel-gfx] [PATCH 1/2] drm/i915/trace: Describe engines as class:instance pairs

2018-05-24 Thread Lionel Landwerlin
On 24/05/18 17:07, Tvrtko Ursulin wrote: On 24/05/2018 16:53, Lionel Landwerlin wrote: On 24/05/18 16:04, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Instead of using the engine->id, use uabi_class:instance pairs in trace- points including engine info. This will be more readable, m

Re: [Intel-gfx] [PATCH v7 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-24 Thread Lionel Landwerlin
On 24/05/18 16:35, Tvrtko Ursulin wrote: On 24/05/2018 15:54, Lionel Landwerlin wrote: There are concerns about denial of service around the per context sseu configuration capability. In a previous commit introducing the capability we allowed it only for capable users. This changes adds a new

Re: [Intel-gfx] [PATCH 1/2] drm/i915/trace: Describe engines as class:instance pairs

2018-05-24 Thread Lionel Landwerlin
On 24/05/18 16:04, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Instead of using the engine->id, use uabi_class:instance pairs in trace- points including engine info. This will be more readable, more future proof and more stable for userspace consumption. Signed-off-by: Tvrtko Ursulin Cc: Chri

Re: [Intel-gfx] [PATCH 2/2] drm/i915/trace: Remove engine out of the context sandwich

2018-05-24 Thread Lionel Landwerlin
=hw_id:fence_context_id. Arg! Will need to update the tracepoint parser in igt :( Binary records are left as is, that is both fields remaing under the existing name and ordering. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_trace.h | 30

[Intel-gfx] [PATCH v7 6/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-24 Thread Lionel Landwerlin
freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_drv.h | 13 ++ drivers/gpu/drm/i915/i915_gem.c | 2 + drivers/gpu/dr

[Intel-gfx] [PATCH v7 5/7] drm/i915/perf: lock powergating configuration to default when active

2018-05-24 Thread Lionel Landwerlin
etely unreasonable to hold on powergating for the same reason. v2: Leave RPCS programming in intel_lrc.c (Lionel) v3: Update for s/union intel_sseu/struct intel_sseu/ (Lionel) More to_intel_context() (Tvrtko) s/dev_priv/i915/ (Tvrtko) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm

[Intel-gfx] [PATCH v7 1/7] drm/i915: Program RPCS for Broadwell

2018-05-24 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v7 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-24 Thread Lionel Landwerlin
sysfs entry (Tvrtko) Lock interruptible the device in sysfs (Tvrtko) Fix dropped error code in getting dynamic sseu value (Tvrtko) s/dev_priv/i915/ (Tvrtko) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 6 drivers/gpu/drm/i915/i915_gem_context.c | 47

[Intel-gfx] [PATCH v7 4/7] drm/i915/perf: reuse intel_lrc ctx regs macro

2018-05-24 Thread Lionel Landwerlin
Abstract the context image access a bit. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_perf.c | 34 +++- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v7 3/7] drm/i915/perf: simplify configure all context function

2018-05-24 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_per

[Intel-gfx] [PATCH v7 2/7] drm/i915: Record the sseu configuration per-context & engine

2018-05-24 Thread Lionel Landwerlin
sseu from union to struct (Tvrtko) Move context default sseu in existing loop (Chris) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_gem_context.c | 2 ++ drivers/gpu/drm/i915/i915_gem_context.h | 17 + drivers/gpu/drm/i915/i915_reque

[Intel-gfx] [PATCH v7 0/7] drm/i915: per context slice/subslice powergating

2018-05-24 Thread Lionel Landwerlin
implementation return EPERM when not allowed. Cheers, Chris Wilson (3): drm/i915: Program RPCS for Broadwell drm/i915: Record the sseu configuration per-context & engine drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin (4): drm/i915/perf: simplify configure

Re: [Intel-gfx] [PATCH v6 6/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-24 Thread Lionel Landwerlin
On 24/05/18 11:43, Tvrtko Ursulin wrote: + +    /* + * Mask of slices to enable for the context. Valid values are a subset + * of the bitmask value returned for I915_PARAM_SLICE_MASK. + */ +    __u8 slice_mask; + +    /* + * Mask of subslices to enable for the context. Val

Re: [Intel-gfx] [PATCH v6 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-24 Thread Lionel Landwerlin
On 24/05/18 11:39, Tvrtko Ursulin wrote: On 23/05/2018 18:33, Lionel Landwerlin wrote: On 23/05/18 16:30, Tvrtko Ursulin wrote: On 22/05/2018 19:00, Lionel Landwerlin wrote: There are concerns about denial of service around the per context sseu configuration capability. In a previous commit

Re: [Intel-gfx] [PATCH v6 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-23 Thread Lionel Landwerlin
On 23/05/18 16:30, Tvrtko Ursulin wrote: +{ +    struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev); +    int ret = i915_gem_contexts_get_allow_sseu(dev_priv); + +    return snprintf(buf, PAGE_SIZE, "%d\n", ret); Propagate ENODEV all the way by making i915_gem_contexts_get_allow_sse

Re: [Intel-gfx] [PATCH v6 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-23 Thread Lionel Landwerlin
On 23/05/18 16:30, Tvrtko Ursulin wrote: On 22/05/2018 19:00, Lionel Landwerlin wrote: There are concerns about denial of service around the per context sseu configuration capability. In a previous commit introducing the capability we allowed it only for capable users. This changes adds a new

Re: [Intel-gfx] [PATCH v6 6/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-23 Thread Lionel Landwerlin
On 23/05/18 16:13, Tvrtko Ursulin wrote: On 22/05/2018 19:00, Lionel Landwerlin wrote: From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case. To do so, we expose a context parameter to allow adjustment of the RPCS register stored within

Re: [Intel-gfx] [PATCH v6 4/7] drm/i915/perf: reuse intel_lrc ctx regs macro

2018-05-23 Thread Lionel Landwerlin
On 23/05/18 15:57, Tvrtko Ursulin wrote: On 22/05/2018 18:59, Lionel Landwerlin wrote: Abstract the context image access a bit. Signed-off-by: Lionel Landwerlin ---   drivers/gpu/drm/i915/i915_perf.c | 34 +++-   1 file changed, 16 insertions(+), 18 deletions

Re: [Intel-gfx] [PATCH v6 2/7] drm/i915: Record the sseu configuration per-context & engine

2018-05-23 Thread Lionel Landwerlin
On 23/05/18 15:54, Tvrtko Ursulin wrote: On 22/05/2018 18:59, Lionel Landwerlin wrote: From: Chris Wilson We want to expose the ability to reconfigure the slices, subslice and eu per context and per engine. To facilitate that, store the current configuration on the context for each engine

[Intel-gfx] [PATCH v6 2/7] drm/i915: Record the sseu configuration per-context & engine

2018-05-22 Thread Lionel Landwerlin
per context & engine (Chris) v3: introduce the i915_gem_context_sseu to store powergating programming, sseu_dev_info has grown quite a bit (Lionel) v4: rename i915_gem_sseu into intel_sseu (Chris) use to_intel_context() (Chris) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwe

[Intel-gfx] [PATCH v6 5/7] drm/i915/perf: lock powergating configuration to default when active

2018-05-22 Thread Lionel Landwerlin
etely unreasonable to hold on powergating for the same reason. v2: Leave RPCS programming in intel_lrc.c (Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 16 drivers/gpu/drm/i915/i915_perf.c | 24 +++- drivers/gpu/drm/i915/intel_lrc.c

[Intel-gfx] [PATCH v6 4/7] drm/i915/perf: reuse intel_lrc ctx regs macro

2018-05-22 Thread Lionel Landwerlin
Abstract the context image access a bit. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 34 +++- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index

[Intel-gfx] [PATCH v6 3/7] drm/i915/perf: simplify configure all context function

2018-05-22 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v6 1/7] drm/i915: Program RPCS for Broadwell

2018-05-22 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v6 0/7] drm/i915: per context slice/subslice powergating

2018-05-22 Thread Lionel Landwerlin
users. Cheers, Chris Wilson (3): drm/i915: Program RPCS for Broadwell drm/i915: Record the sseu configuration per-context & engine drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin (4): drm/i915/perf: simplify configure all context function drm/i915/perf: reuse

[Intel-gfx] [PATCH v6 7/7] drm/i915: add a sysfs entry to let users set sseu configs

2018-05-22 Thread Lionel Landwerlin
: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_gem_context.c | 52 - drivers/gpu/drm/i915/i915_sysfs.c | 30 ++ 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v6 6/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-22 Thread Lionel Landwerlin
ev_priv.gt.active_rings (Tvrtko) Disable RPCS configuration setting for non capable users (Lionel/Tvrtko) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Laht

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-22 Thread Lionel Landwerlin
On 22/05/18 17:11, Lionel Landwerlin wrote: On 21/05/18 17:00, Tvrtko Ursulin wrote: + +    /* Queue this switch after all other activity */ +    list_for_each_entry(timeline, &dev_priv->gt.timelines, link) { This can iterate over gt.active_rings for a shorter walk. See current s

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-22 Thread Lionel Landwerlin
On 21/05/18 17:00, Tvrtko Ursulin wrote: + +    /* Queue this switch after all other activity */ +    list_for_each_entry(timeline, &dev_priv->gt.timelines, link) { This can iterate over gt.active_rings for a shorter walk. See current state of engine_has_idle_kernel_context. For some reason

Re: [Intel-gfx] [PATCH] drm/i915/query: nospec expects no more than an unsigned long

2018-05-22 Thread Lionel Landwerlin
sizeof(_s) > sizeof(long) Reported-by: kbuild-...@01.org Fixes: 84b510e22da7 ("drm/i915/query: Protect tainted function pointer lookup") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin --- drivers/gpu/dr

Re: [Intel-gfx] [PATCH] drm/i915/query: nospec expects no more than an unsigned long

2018-05-22 Thread Lionel Landwerlin
sizeof(_s) > sizeof(long) Reported-by: kbuild-...@01.org Fixes: 84b510e22da7 ("drm/i915/query: Protect tainted function pointer lookup") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_query.c | 5 - 1

Re: [Intel-gfx] [PATCH] drm/i915/query: Protect tainted function pointer lookup

2018-05-21 Thread Lionel Landwerlin
: a446ae2c6e65 ("drm/i915: add query uAPI") Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Okay. Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_query.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-21 Thread Lionel Landwerlin
On 21/05/18 17:00, Tvrtko Ursulin wrote: On 21/05/2018 14:22, Lionel Landwerlin wrote: On 15/05/18 10:05, Tvrtko Ursulin wrote: On 14/05/2018 16:56, Lionel Landwerlin wrote: From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case. To

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-21 Thread Lionel Landwerlin
On 15/05/18 10:05, Tvrtko Ursulin wrote: On 14/05/2018 16:56, Lionel Landwerlin wrote: From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case. To do so, we expose a context parameter to allow adjustment of the RPCS register stored within

[Intel-gfx] [PATCH v3] drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits

2018-05-21 Thread Lionel Landwerlin
the kernel. v2: Bump the command parser revision (Chris) v3: Whitelist TEXTURE_PALETTE_LOAD_INSTRUCTION_DISABLE (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_cmd_parser.c | 13 - drivers/gpu/drm/i915/i915_reg.h| 5 + 2 files changed, 17

[Intel-gfx] [PATCH v2] drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits

2018-05-18 Thread Lionel Landwerlin
the kernel. v2: Bump the command parser revision (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_cmd_parser.c | 11 ++- drivers/gpu/drm/i915/i915_reg.h| 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH] drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits

2018-05-18 Thread Lionel Landwerlin
On 18/05/18 15:40, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-18 15:29:21) On 18/05/18 15:26, Lionel Landwerlin wrote: On Gen8+ this register is not priviledged and we want to use it in Mesa to implement a feature required by GPA called Null Hardware. The idea is to have the

Re: [Intel-gfx] [PATCH] drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits

2018-05-18 Thread Lionel Landwerlin
On 18/05/18 15:26, Lionel Landwerlin wrote: On Gen8+ this register is not priviledged and we want to use it in Mesa to implement a feature required by GPA called Null Hardware. The idea is to have the command parser turn 3DPRIMITIVE/GPGPU_WALKER into NOOPs. This patch just whitelists the bits

[Intel-gfx] [PATCH] drm/i915/cmdparser: Whitelist INSTPM instruction parsing disable bits

2018-05-18 Thread Lionel Landwerlin
the kernel. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_cmd_parser.c | 8 drivers/gpu/drm/i915/i915_reg.h| 3 +++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c index

Re: [Intel-gfx] [PATCH] drm/i915/oa: Check that OA is disabled before unpinning

2018-05-17 Thread Lionel Landwerlin
On 17/05/18 11:21, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-17 11:18:16) This should be sent to stable right? Yeah, my bad for not digging out the relevant Fixes: +cc Joonas for the next batch. -Chris I should have looked at it too. Was just in shock ;) For Haswell: Fixes

Re: [Intel-gfx] [PATCH] drm/i915/oa: Check that OA is disabled before unpinning

2018-05-17 Thread Lionel Landwerlin
. References: https://bugs.freedesktop.org/show_bug.cgi?id=106379 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_perf.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-16 Thread Lionel Landwerlin
On 16/05/18 16:40, Tvrtko Ursulin wrote: On 15/05/2018 10:05, Tvrtko Ursulin wrote: On 14/05/2018 16:56, Lionel Landwerlin wrote: From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case. To do so, we expose a context parameter to allow

Re: [Intel-gfx] [PATCH 1/2] drm/i915: split CNL platforms in GT1/2

2018-05-15 Thread Lionel Landwerlin
On 15/05/18 15:10, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-15 14:57:44) We don't actually need this information in i915 but we would like to get it in IGT and since the pciid headers are in sync.. Hmm, I don't see that we display the GT anywhere. I was thinking an imm

[Intel-gfx] [PATCH 2/2] drm/i915: classify all ICL as GT1

2018-05-15 Thread Lionel Landwerlin
Icelake has less of an emphasis on the GT number and is more classified as trio of slices-subslices-EUs numbers. Since all the current skus have only one slice, let's classify them as GT1 for now. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file chang

[Intel-gfx] [PATCH 1/2] drm/i915: split CNL platforms in GT1/2

2018-05-15 Thread Lionel Landwerlin
ned-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_pci.c | 11 +-- include/drm/i915_pciids.h | 18 ++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 4364922e935d..81

[Intel-gfx] [PATCH v5 3/7] drm/i915/perf: simplify configure all context function

2018-05-14 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v5 0/7] drm/i915: per context slice/subslice powergating

2018-05-14 Thread Lionel Landwerlin
well drm/i915: Record the sseu configuration per-context & engine drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin (4): drm/i915/perf: simplify configure all context function drm/i915/perf: reuse intel_lrc ctx regs macro drm/i915/perf: lock powergating configur

[Intel-gfx] [PATCH v5 7/7] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-14 Thread Lionel Landwerlin
sseu configuration against the device's capabilities (Lionel) v6: Change context powergating settings through MI_SDM on kernel context (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin

[Intel-gfx] [PATCH v5 2/7] drm/i915: Record the sseu configuration per-context & engine

2018-05-14 Thread Lionel Landwerlin
per context & engine (Chris) v3: introduce the i915_gem_context_sseu to store powergating programming, sseu_dev_info has grown quite a bit (Lionel) v4: rename i915_gem_sseu into intel_sseu (Chris) use to_intel_context() (Chris) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwe

[Intel-gfx] [PATCH v5 4/7] drm/i915/perf: reuse intel_lrc ctx regs macro

2018-05-14 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 34 +++- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 94466aeafd02..fc5b5d66abcd 100644 --- a/drivers

[Intel-gfx] [PATCH v5 5/7] drm/i915/perf: lock powergating configuration to default when active

2018-05-14 Thread Lionel Landwerlin
etely unreasonable to hold on powergating for the same reason. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 24 +++- drivers/gpu/drm/i915/i915_request.c| 2 ++ drivers/gpu/drm/i915/i915_request.h| 11 +++ drivers/gpu/drm

[Intel-gfx] [PATCH v5 1/7] drm/i915: Program RPCS for Broadwell

2018-05-14 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v5 6/7] drm/i915: count powergating transitions per engine

2018-05-14 Thread Lionel Landwerlin
This can be used to monitor the number of powergating transition changes for a particular workload. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ drivers/gpu/drm/i915/intel_lrc.c| 16 +++- drivers/gpu/drm/i915/intel_ringbuffer.h | 12

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 16:51, Chris Wilson wrote: But I can't even startup a gdm on that machine with drm-tip. So maybe there is some much more broken... Don't leave us in suspense... https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890614 Not our bug :) __

Re: [Intel-gfx] [PATCH] drm/i915/oa: Check that OA is disabled before unpinning

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 15:11, Lionel Landwerlin wrote: On 11/05/18 14:52, Chris Wilson wrote: Before we unpin the buffer used for OA reports and return it to the system, we need to be sure that the HW has finished writing into it. For lack of a better idea, poll OACONTROL to check it is switched off

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 16:51, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 16:43:02) On 11/05/18 15:18, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 15:14:13) My understanding of the virtual memory addressing from the GPU is limited... But how can the GPU poke at the kernel&#

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 15:18, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 15:14:13) My understanding of the virtual memory addressing from the GPU is limited... But how can the GPU poke at the kernel's allocated data? I thought we mapped into the GPU's address space only what is

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 15:34, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 15:28:24) On 11/05/18 15:18, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 15:14:13) My understanding of the virtual memory addressing from the GPU is limited... But how can the GPU poke at the kernel&#

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
On 11/05/18 15:18, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-11 15:14:13) My understanding of the virtual memory addressing from the GPU is limited... But how can the GPU poke at the kernel's allocated data? I thought we mapped into the GPU's address space only what is

Re: [Intel-gfx] [PATCH] drm/i915/oa: Disable OA on Haswell

2018-05-11 Thread Lionel Landwerlin
hat the OA architecture is clobbering random memory. Disable it until this can be resolved. References: https://bugs.freedesktop.org/show_bug.cgi?id=106379 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jani Nikula Cc: sta...@vger.

Re: [Intel-gfx] [PATCH] drm/i915/oa: Check that OA is disabled before unpinning

2018-05-11 Thread Lionel Landwerlin
/show_bug.cgi?id=106379 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Sounds fair : Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v4 6/8] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-09 Thread Lionel Landwerlin
On 09/05/18 18:48, Lionel Landwerlin wrote: @@ -1953,10 +1992,26 @@ static int gen8_emit_bb_start(struct i915_request *rq, rq->ctx->ppgtt->pd_dirty_rings &= ~intel_engine_flag(rq->engine); } - cs = intel_ring_begin(rq, 6); + cs = intel_ring_begi

[Intel-gfx] [PATCH v4 1/8] drm/i915: Program RPCS for Broadwell

2018-05-09 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v4 0/8] drm/i915: per context slice/subslice powergating

2018-05-09 Thread Lionel Landwerlin
PCS (SSEU) configuration to userspace Lionel Landwerlin (5): drm/i915/perf: simplify configure all context function drm/i915: add new pipe control helper for mmio writes drm/i915: give engine to execlists cancel helper drm/i915: reprogram NOA muxes on context switch when using perf drm/i915: count po

[Intel-gfx] [PATCH v4 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-09 Thread Lionel Landwerlin
es (Lionel) v6: Change context powergating settings through MI_SDM on kernel context (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Laht

[Intel-gfx] [PATCH v4 5/8] drm/i915: give engine to execlists cancel helper

2018-05-09 Thread Lionel Landwerlin
We would like to set a value on the associated engine in this helper in a following commit. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c| 10 +- drivers/gpu/drm/i915/intel_ringbuffer.h | 2

[Intel-gfx] [PATCH v4 7/8] drm/i915: count powergating transitions per engine

2018-05-09 Thread Lionel Landwerlin
This can be used to monitor the number of powergating transition changes for a particular workload. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ drivers/gpu/drm/i915/intel_lrc.c| 1 + drivers/gpu/drm/i915/intel_ringbuffer.h | 6 ++ 3 files

[Intel-gfx] [PATCH v4 3/8] drm/i915/perf: simplify configure all context function

2018-05-09 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

[Intel-gfx] [PATCH v4 2/8] drm/i915: Record the sseu configuration per-context & engine

2018-05-09 Thread Lionel Landwerlin
per context & engine (Chris) v3: introduce the i915_gem_context_sseu to store powergating programming, sseu_dev_info has grown quite a bit (Lionel) v4: rename i915_gem_sseu into intel_sseu (Chris) use to_intel_context() (Chris) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwe

[Intel-gfx] [PATCH v4 6/8] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-09 Thread Lionel Landwerlin
only (Chris) Program MI_BATCH_BUFFER_START into NOA reprogramming correctly (Chris) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c| 135 drivers/gpu/drm/i915/i915_request.c | 2 + drivers/gpu/drm/i915/i915_request.h | 11

[Intel-gfx] [PATCH v4 4/8] drm/i915: add new pipe control helper for mmio writes

2018-05-09 Thread Lionel Landwerlin
We'll use those helpers in the following commits. It's a good thing to have them around as they need to apply a particular workaround on Skylake. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_lrc.c| 34 + drivers/gpu/drm/i915/intel_ri

Re: [Intel-gfx] [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-09 Thread Lionel Landwerlin
On 08/05/18 21:56, Chris Wilson wrote: Quoting Tvrtko Ursulin (2018-05-03 18:18:43) On 25/04/2018 12:45, Lionel Landwerlin wrote: From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case. To do so, we expose a context parameter to allow

Re: [Intel-gfx] [PATCH v3 4/6] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-09 Thread Lionel Landwerlin
On 09/05/18 09:59, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-05-08 19:03:45) If some of the contexts submitting workloads to the GPU have been configured to shutdown slices/subslices, we might loose the NOA configurations written in the NOA muxes. We need to reprogram them when we

Re: [Intel-gfx] [PATCH v3 4/6] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-09 Thread Lionel Landwerlin
On 09/05/18 10:05, Chris Wilson wrote: Could there be any more pointer chasing? Thinking about more about how to make this part cleaner, could we not store the engine->noa_batch and then this all becomes vma = engine->noa_batch; if (vma) return; Locking! Missed it in the first pass, b

Re: [Intel-gfx] [PATCH v3 4/6] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-09 Thread Lionel Landwerlin
On 09/05/18 09:59, Chris Wilson wrote: + + *cs++ = MI_BATCH_BUFFER_START_GEN8 | MI_BATCH_SECOND_LEVEL; You are not a second level batch. You are calling from the ring to a global address of _0_. + *cs++ = 0; low 32bits = 0 + *cs++ = i915_ggtt_offset(stream->noa_reprogram_v

[Intel-gfx] [PATCH v3 4/6] drm/i915: reprogram NOA muxes on context switch when using perf

2018-05-08 Thread Lionel Landwerlin
detecting configuration changes (Chris/Lionel) Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_drv.h | 6 ++ drivers/gpu/drm/i915/i915_perf.c | 108 ++ drivers/gpu/drm/i915/i915_request.h | 6 ++ drivers/gpu/drm/i915/intel_gpu_commands.h

[Intel-gfx] [PATCH v3 1/6] drm/i915: Program RPCS for Broadwell

2018-05-08 Thread Lionel Landwerlin
want to opt out of the "always-enabled" setting. Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_lrc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gp

[Intel-gfx] [PATCH v3 0/6] drm/i915: per context slice/subslice powergating

2018-05-08 Thread Lionel Landwerlin
ration per-context & engine drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin (3): drm/i915/perf: simplify configure all context function drm/i915: reprogram NOA muxes on context switch when using perf drm/i915: count powergating transitions per engine driver

[Intel-gfx] [PATCH v3 6/6] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-08 Thread Lionel Landwerlin
ities (Lionel) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100899 Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin c: Dmitry Rogozhkin CC: Tvrtko Ursulin CC: Zhipeng Gong CC: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem_context.c | 94 - d

[Intel-gfx] [PATCH v3 5/6] drm/i915: count powergating transitions per engine

2018-05-08 Thread Lionel Landwerlin
This can be used to monitor the number of powergating transition changes for a particular workload. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/intel_lrc.c| 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + drivers/gpu/drm

[Intel-gfx] [PATCH v3 2/6] drm/i915: Record the sseu configuration per-context & engine

2018-05-08 Thread Lionel Landwerlin
per context & engine (Chris) v3: introduce the i915_gem_context_sseu to store powergating programming, sseu_dev_info has grown quite a bit (Lionel) Signed-off-by: Chris Wilson Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_gem.h | 13 + drivers/gpu

[Intel-gfx] [PATCH v3 3/6] drm/i915/perf: simplify configure all context function

2018-05-08 Thread Lionel Landwerlin
We don't need any special treatment on error so just return as soon as possible. Signed-off-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm

Re: [Intel-gfx] [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-04 Thread Lionel Landwerlin
On 03/05/18 18:18, Tvrtko Ursulin wrote:   +int intel_lr_context_set_sseu(struct i915_gem_context *ctx, +  struct intel_engine_cs *engine, +  struct i915_gem_context_sseu *sseu) +{ +    struct drm_i915_private *dev_priv = ctx->i915; +    struct intel_context *ce; +

Re: [Intel-gfx] [PATCH] drm/i915/execlists: Drop preemption arbitrations points along the ring

2018-05-03 Thread Lionel Landwerlin
breadcrumb; switching contexts at this point is futile so don't. Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Michel Thierry Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin --- Michał and Michel, please take a look and see if you can think o

Re: [Intel-gfx] [PATCH 1/8] drm/i915: expose helper mapping exec flag engine to intel_engine_cs

2018-05-03 Thread Lionel Landwerlin
On 03/05/18 19:00, Tvrtko Ursulin wrote: On 03/05/2018 18:31, Lionel Landwerlin wrote: On 03/05/18 18:12, Tvrtko Ursulin wrote: On 30/04/2018 15:37, Lionel Landwerlin wrote: On 25/04/18 12:50, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-04-25 12:45:14) This function will be used

Re: [Intel-gfx] [PATCH 1/8] drm/i915: expose helper mapping exec flag engine to intel_engine_cs

2018-05-03 Thread Lionel Landwerlin
On 03/05/18 18:12, Tvrtko Ursulin wrote: On 30/04/2018 15:37, Lionel Landwerlin wrote: On 25/04/18 12:50, Chris Wilson wrote: Quoting Lionel Landwerlin (2018-04-25 12:45:14) This function will be used later by the per (context,engine) power programming interface. No. This is not the

Re: [Intel-gfx] [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace

2018-05-03 Thread Lionel Landwerlin
On 03/05/18 17:04, Joonas Lahtinen wrote: Quoting Lionel Landwerlin (2018-04-26 13:22:30) On 26/04/18 11:00, Joonas Lahtinen wrote: Quoting Lionel Landwerlin (2018-04-25 14:45:21) From: Chris Wilson We want to allow userspace to reconfigure the subslice configuration for its own use case

<    6   7   8   9   10   11   12   13   14   15   >