summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-10-07 14:30:02 +1000
committerDave Airlie <airlied@redhat.com>2014-10-07 14:30:02 +1000
commit436e94a4cb6f60c99edc7e424d32821c454ab8f0 (patch)
tree8135c911e6611230804f66ce6f205c5507f8ab8b /drivers/gpu/drm/i915/intel_lrc.c
parentccb09a8e36b64a4d161dd61d4066a5c54181615b (diff)
parentebb69c95175609990af708ec90c46530f5a2c819 (diff)
Merge tag 'drm-intel-next-fixes-2014-10-03' of git://anongit.freedesktop.org/drm-intel into drm-next
Bunch of fixes for 3.18. Major parts: - ppgtt fixes (but full ppgtt is for 3.19) from Chris, Michel, ... - hdmi pixel replication fixes (Clint Taylor) - leftover i830M patches from Ville - small things all over * tag 'drm-intel-next-fixes-2014-10-03' of git://anongit.freedesktop.org/drm-intel: (21 commits) drm/i915: Enable pixel replicated modes on BDW and HSW. drm/i915: Don't spam dmesg with rps messages on vlv/chv drm/i915: Do not leak pages when freeing userptr objects drm/i915: Do not store the error pointer for a failed userptr registration Revert "drm/i915/bdw: BDW Software Turbo" drm/i915/bdw: Cleanup pre prod workarounds drm/i915: Use EIO instead of EAGAIN for sink CRC error. drm/i915: Extend BIOS stolen mem handling to all platform drm/i915: Match GTT space sanity checker with implementation drm/i915: HSW always use GGTT selector for secure batches drm/i915: add cherryview specfic forcewake in execlists_elsp_write drm/i915: fix another use-after-free in i915_gem_evict_everything drm/i915: Don't reinit hpd interrupts after gpu reset drm/i915: Wrap -EIO send-vblank event for failed pageflip in spinlock drm/i915: Drop any active reference before unbinding drm/i915: Objects on the unbound list may still have an active reference drm/i915/edp: use lane count and link rate from DPCD for eDP drm/i915/dp: add missing \n in the TPS3 debug message drm/i915/hdmi, dp: Do not dereference the encoder in the connector destroy drm/i915: Limit the watermark to at least 8 entries on gen2/3 ...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c29
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,
* Instead, we do the runtime_pm_get/put when creating/destroying requests.
*/
spin_lock_irqsave(&dev_priv->uncore.lock, flags);
- if (dev_priv->uncore.forcewake_count++ == 0)
- dev_priv->uncore.funcs.force_wake_get(dev_priv, FORCEWAKE_ALL);
+ if (IS_CHERRYVIEW(dev_priv->dev)) {
+ if (dev_priv->uncore.fw_rendercount++ == 0)
+ dev_priv->uncore.funcs.force_wake_get(dev_priv,
+ FORCEWAKE_RENDER);
+ if (dev_priv->uncore.fw_mediacount++ == 0)
+ dev_priv->uncore.funcs.force_wake_get(dev_priv,
+ FORCEWAKE_MEDIA);
+ } else {
+ if (dev_priv->uncore.forcewake_count++ == 0)
+ dev_priv->uncore.funcs.force_wake_get(dev_priv,
+ FORCEWAKE_ALL);
+ }
spin_unlock_irqrestore(&dev_priv->uncore.lock, flags);
I915_WRITE(RING_ELSP(ring), desc[1]);
@@ -315,8 +325,19 @@ static void execlists_elsp_write(struct intel_engine_cs *ring,
/* Release Force Wakeup (see the big comment above). */
spin_lock_irqsave(&dev_priv->uncore.lock, flags);
- if (--dev_priv->uncore.forcewake_count == 0)
- dev_priv->uncore.funcs.force_wake_put(dev_priv, FORCEWAKE_ALL);
+ if (IS_CHERRYVIEW(dev_priv->dev)) {
+ if (--dev_priv->uncore.fw_rendercount == 0)
+ dev_priv->uncore.funcs.force_wake_put(dev_priv,
+ FORCEWAKE_RENDER);
+ if (--dev_priv->uncore.fw_mediacount == 0)
+ dev_priv->uncore.funcs.force_wake_put(dev_priv,
+ FORCEWAKE_MEDIA);
+ } else {
+ if (--dev_priv->uncore.forcewake_count == 0)
+ dev_priv->uncore.funcs.force_wake_put(dev_priv,
+ FORCEWAKE_ALL);
+ }
+
spin_unlock_irqrestore(&dev_priv->uncore.lock, flags);
}