[Intel-gfx] [PATCH v3 5/7] drm/i915: sanitize the asserts in the RPM get/put helpers
Chris Wilson
chris at chris-wilson.co.uk
Thu Nov 12 15:06:46 PST 2015
On Thu, Nov 12, 2015 at 06:40:19PM +0200, Imre Deak wrote:
> There is no point in checking the refcount just after increasing it so
> remove the assert from the get helper. Otoh, we should check the
> refcount before decreasing it, so add it to the put helper.
>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 64da5af..db63b8a 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -2132,7 +2132,6 @@ void intel_runtime_pm_get(struct drm_i915_private *dev_priv)
> pm_runtime_get_sync(device);
>
> atomic_inc(&dev_priv->pm.wakelock_count);
> - assert_rpm_wakelock_held(dev_priv);
Otoh, assert_device_not_suspended() still makes sense here.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list