aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-21 07:31:41 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-25 12:23:56 -0400
commitf047e395ddc9da6c307a10629a237502e627ed85 (patch)
tree36a445f1d0bdf1bf37321d55ebfda84475c34b1c /drivers/gpu/drm/i915/intel_pm.c
parenta7b9761d0a2ded58170ffb4d423ff3d7228103f4 (diff)
drm/i915: Avoid concurrent access when marking the device as idle/busy
As suggested by Daniel, rip out the independent timers for device and crtc busyness and integrate the manual powermanagement of the display engine into the GEM core and its request tracking. The benefits are that the code is a lot smaller, fewer moving parts and should fit more neatly into the overall activity tracking of the driver. v2: Complete overhaul and removal of the racy timers and workers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 94aabcaa3a67..85d1b1c57df2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3075,14 +3075,17 @@ EXPORT_SYMBOL_GPL(i915_gpu_lower);
3075bool i915_gpu_busy(void) 3075bool i915_gpu_busy(void)
3076{ 3076{
3077 struct drm_i915_private *dev_priv; 3077 struct drm_i915_private *dev_priv;
3078 struct intel_ring_buffer *ring;
3078 bool ret = false; 3079 bool ret = false;
3080 int i;
3079 3081
3080 spin_lock(&mchdev_lock); 3082 spin_lock(&mchdev_lock);
3081 if (!i915_mch_dev) 3083 if (!i915_mch_dev)
3082 goto out_unlock; 3084 goto out_unlock;
3083 dev_priv = i915_mch_dev; 3085 dev_priv = i915_mch_dev;
3084 3086
3085 ret = dev_priv->busy; 3087 for_each_ring(ring, dev_priv, i)
3088 ret |= !list_empty(&ring->request_list);
3086 3089
3087out_unlock: 3090out_unlock:
3088 spin_unlock(&mchdev_lock); 3091 spin_unlock(&mchdev_lock);