diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-01-16 11:34:35 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-27 09:50:54 +0100 |
commit | 6daccb0b2a4c8c675395061cffbf77e9e5f31e7b (patch) | |
tree | c48001fa9f5922aa0d03d5512ad8dbd44e5afaf5 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | dc9fb09cae5b1355c1a9d8102e40b97b34332f31 (diff) | |
download | lwn-6daccb0b2a4c8c675395061cffbf77e9e5f31e7b.tar.gz lwn-6daccb0b2a4c8c675395061cffbf77e9e5f31e7b.zip |
drm/i915: Assert that runtime pm is active on user fw access
On user forcewake access, assert that runtime pm reference is held.
Fix and cleanup the callsites accordingly.
v2: Remove intel_runtime_pm_get() rebasehap (Deepak)
v3: use drivers own runtime state tracking as pm_runtime_active()
will return wrong results when we are in resume callchain (Mika)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7952f313dda2..ac517eb07c00 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -4339,6 +4339,7 @@ static int i915_forcewake_open(struct inode *inode, struct file *file) if (INTEL_INFO(dev)->gen < 6) return 0; + intel_runtime_pm_get(dev_priv); gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL); return 0; @@ -4353,6 +4354,7 @@ static int i915_forcewake_release(struct inode *inode, struct file *file) return 0; gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL); + intel_runtime_pm_put(dev_priv); return 0; } |