diff mbox

[08/10] drm/i915: check that we hold an RPM wakelock ref before we put it

Message ID 1450203038-5150-9-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Dec. 15, 2015, 6:10 p.m. UTC
v2-v3:
- unchanged
v4:
- keep the corresponding check in the get helper (Chris)

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Joonas Lahtinen Dec. 16, 2015, 11 a.m. UTC | #1
On ti, 2015-12-15 at 20:10 +0200, Imre Deak wrote:
> v2-v3:
> - unchanged
> v4:
> - keep the corresponding check in the get helper (Chris)

This is put helper you patched, so I think the above message is
incorrect.

Regards, Joonas

> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 29157fb..82c55a9 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -2282,6 +2282,7 @@ void intel_runtime_pm_put(struct
> drm_i915_private *dev_priv)
>  	struct drm_device *dev = dev_priv->dev;
>  	struct device *device = &dev->pdev->dev;
>  
> +	assert_rpm_wakelock_held(dev_priv);
>  	atomic_dec(&dev_priv->pm.wakeref_count);
>  
>  	pm_runtime_mark_last_busy(device);
Chris Wilson Dec. 16, 2015, 11:07 a.m. UTC | #2
On Wed, Dec 16, 2015 at 01:00:38PM +0200, Joonas Lahtinen wrote:
> On ti, 2015-12-15 at 20:10 +0200, Imre Deak wrote:
> > v2-v3:
> > - unchanged
> > v4:
> > - keep the corresponding check in the get helper (Chris)
> 
> This is put helper you patched, so I think the above message is
> incorrect.

It is referring to a chunk no longer in the patch. :)
-Chris
Imre Deak Dec. 16, 2015, 12:49 p.m. UTC | #3
On ke, 2015-12-16 at 11:07 +0000, Chris Wilson wrote:
> On Wed, Dec 16, 2015 at 01:00:38PM +0200, Joonas Lahtinen wrote:
> > On ti, 2015-12-15 at 20:10 +0200, Imre Deak wrote:
> > > v2-v3:
> > > - unchanged
> > > v4:
> > > - keep the corresponding check in the get helper (Chris)
> > 
> > This is put helper you patched, so I think the above message is
> > incorrect.
> 
> It is referring to a chunk no longer in the patch. :)

Yes, in v1 I removed an assert fromĀ intel_runtime_pm_get(), which was
reinstated in v4:
http://lists.freedesktop.org/archives/intel-gfx/2015-November/080048.html

> -Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 29157fb..82c55a9 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -2282,6 +2282,7 @@  void intel_runtime_pm_put(struct drm_i915_private *dev_priv)
 	struct drm_device *dev = dev_priv->dev;
 	struct device *device = &dev->pdev->dev;
 
+	assert_rpm_wakelock_held(dev_priv);
 	atomic_dec(&dev_priv->pm.wakeref_count);
 
 	pm_runtime_mark_last_busy(device);