diff options
author | Deepak S <deepak.s@linux.intel.com> | 2014-09-09 09:44:16 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-19 08:41:17 -0400 |
commit | a01b0e946f6db0a145dd92d7a44babd628d2c7a8 (patch) | |
tree | 47b85d702b22ffb2e8c73c2a743c67c23d1a47b8 /drivers/gpu | |
parent | cf303626748e0a5c059e453d025539583d870116 (diff) |
drm/i915: add cherryview specfic forcewake in execlists_elsp_write
In chv, we have two power wells Render & Media. We need to use
corresponsing forcewake count. If we dont follow this we are getting
error "*ERROR*: Timed out waiting for forcewake old ack to clear" due to
multiple entry into __vlv_force_wake_get.
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Requested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index bd1b28d99920..bafd38b5703e 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c | |||
@@ -300,8 +300,18 @@ static void execlists_elsp_write(struct intel_engine_cs *ring, | |||
300 | * Instead, we do the runtime_pm_get/put when creating/destroying requests. | 300 | * Instead, we do the runtime_pm_get/put when creating/destroying requests. |
301 | */ | 301 | */ |
302 | spin_lock_irqsave(&dev_priv->uncore.lock, flags); | 302 | spin_lock_irqsave(&dev_priv->uncore.lock, flags); |
303 | if (dev_priv->uncore.forcewake_count++ == 0) | 303 | if (IS_CHERRYVIEW(dev_priv->dev)) { |
304 | dev_priv->uncore.funcs.force_wake_get(dev_priv, FORCEWAKE_ALL); | 304 | if (dev_priv->uncore.fw_rendercount++ == 0) |
305 | dev_priv->uncore.funcs.force_wake_get(dev_priv, | ||
306 | FORCEWAKE_RENDER); | ||
307 | if (dev_priv->uncore.fw_mediacount++ == 0) | ||
308 | dev_priv->uncore.funcs.force_wake_get(dev_priv, | ||
309 | FORCEWAKE_MEDIA); | ||
310 | } else { | ||
311 | if (dev_priv->uncore.forcewake_count++ == 0) | ||
312 | dev_priv->uncore.funcs.force_wake_get(dev_priv, | ||
313 | FORCEWAKE_ALL); | ||
314 | } | ||
305 | spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); | 315 | spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); |
306 | 316 | ||
307 | I915_WRITE(RING_ELSP(ring), desc[1]); | 317 | I915_WRITE(RING_ELSP(ring), desc[1]); |
@@ -315,8 +325,19 @@ static void execlists_elsp_write(struct intel_engine_cs *ring, | |||
315 | 325 | ||
316 | /* Release Force Wakeup (see the big comment above). */ | 326 | /* Release Force Wakeup (see the big comment above). */ |
317 | spin_lock_irqsave(&dev_priv->uncore.lock, flags); | 327 | spin_lock_irqsave(&dev_priv->uncore.lock, flags); |
318 | if (--dev_priv->uncore.forcewake_count == 0) | 328 | if (IS_CHERRYVIEW(dev_priv->dev)) { |
319 | dev_priv->uncore.funcs.force_wake_put(dev_priv, FORCEWAKE_ALL); | 329 | if (--dev_priv->uncore.fw_rendercount == 0) |
330 | dev_priv->uncore.funcs.force_wake_put(dev_priv, | ||
331 | FORCEWAKE_RENDER); | ||
332 | if (--dev_priv->uncore.fw_mediacount == 0) | ||
333 | dev_priv->uncore.funcs.force_wake_put(dev_priv, | ||
334 | FORCEWAKE_MEDIA); | ||
335 | } else { | ||
336 | if (--dev_priv->uncore.forcewake_count == 0) | ||
337 | dev_priv->uncore.funcs.force_wake_put(dev_priv, | ||
338 | FORCEWAKE_ALL); | ||
339 | } | ||
340 | |||
320 | spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); | 341 | spin_unlock_irqrestore(&dev_priv->uncore.lock, flags); |
321 | } | 342 | } |
322 | 343 | ||