diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-08 17:35:35 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-09 15:52:22 -0400 |
commit | c6a828d3269a5d0b9adda1438cf8d7cb2007ca71 (patch) | |
tree | 461339ff364393d241388e597a04fe07c911b7b6 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 22bcfc6a4b2288675a54b761ebcd85b9613ab9a6 (diff) |
drm/i915: move all rps state into dev_priv->rps
This way it's easier so see what belongs together, and what is used
by the ilk ips code. Also add some comments that explain the locking.
Note that (cur|min|max)_delay need to be duplicated, because
they're also used by the ips code.
v2: Missed one place that the dev_priv->ips change caught ...
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 26a2cf6da3a2..1614097f975a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -819,9 +819,21 @@ typedef struct drm_i915_private { | |||
819 | 819 | ||
820 | bool mchbar_need_disable; | 820 | bool mchbar_need_disable; |
821 | 821 | ||
822 | struct work_struct rps_work; | 822 | /* gen6+ rps state */ |
823 | spinlock_t rps_lock; | 823 | struct { |
824 | u32 pm_iir; | 824 | struct work_struct work; |
825 | u32 pm_iir; | ||
826 | /* lock - irqsave spinlock that protectects the work_struct and | ||
827 | * pm_iir. */ | ||
828 | spinlock_t lock; | ||
829 | |||
830 | /* The below variables an all the rps hw state are protected by | ||
831 | * dev->struct mutext. */ | ||
832 | u8 cur_delay; | ||
833 | u8 min_delay; | ||
834 | u8 max_delay; | ||
835 | } rps; | ||
836 | |||
825 | 837 | ||
826 | u8 cur_delay; | 838 | u8 cur_delay; |
827 | u8 min_delay; | 839 | u8 min_delay; |