[Intel-gfx] [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 14 09:09:10 UTC 2017


On Mon, Mar 13, 2017 at 05:26:06PM -0700, Michel Thierry wrote:
> At least in bxt (with decoupled mmio), it prevents a warning while
> capturing the reg state:
> 
>  [  ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
>  [  ] RPM wakelock ref not held during HW access
>  [  ] Call Trace:
>  [  ]  dump_stack+0x63/0x87
>  [  ]  __warn+0xd1/0xf0
>  [  ]  ? fwtable_write32+0x1a0/0x1a0 [i915]
>  [  ]  warn_slowpath_fmt+0x4f/0x60
>  [  ]  ? vprintk_default+0x29/0x50
>  [  ]  assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
>  [  ]  gen9_decoupled_read32+0x18a/0x1a0 [i915]
>  [  ]  ? fwtable_write32+0x1a0/0x1a0 [i915]
>  [  ]  i915_handle_error+0x1d0/0x260 [i915]
>  [  ]  ? __check_object_size+0x170/0x1aa
>  [  ]  i915_wedged_set+0x25/0x30 [i915]
> 
> These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
> barrier for controlling user mmap access"), before decoupled mmio was
> added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
> 
> Reported-by: Antonio Argenziano <antonio.argenziano at intel.com>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 9fcc4f1a86fc..89f211391ef9 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
>  	if (i915_reset_in_progress(&dev_priv->gpu_error))
>  		return -EAGAIN;
>  
> +	intel_runtime_pm_get(dev_priv);

They don't belong here. i915_handle_error is already taking rpm, it just
forgot a path.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list