diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-11-02 11:14:01 -0700 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-11 23:51:41 +0100 |
commit | 4fc688ce79772496503d22263d61b071a8fb596e (patch) | |
tree | 00c15f894339869461ca039f8c749c7020c6f081 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 1a01ab3b2dc4394c46c4c3230805748f632f6f74 (diff) | |
download | lwn-4fc688ce79772496503d22263d61b071a8fb596e.tar.gz lwn-4fc688ce79772496503d22263d61b071a8fb596e.zip |
drm/i915: protect RPS/RC6 related accesses (including PCU) with a new mutex
This allows the power related code to run independently of the rest of
the pipeline, extending the resume and init time improvements into
userspace, which would otherwise have been blocked on the struct mutex
if we were doing PCU communication.
v2: Also convert the locking for the rps sysfs interface.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 8db7bb9899b9..c4339c2b1b57 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -564,6 +564,12 @@ struct intel_gen6_power_mgmt { u8 max_delay; struct delayed_work delayed_resume_work; + + /* + * Protects RPS/RC6 register access and PCU communication. + * Must be taken after struct_mutex if nested. + */ + struct mutex hw_lock; }; struct intel_ilk_power_mgmt { |