summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Mateo <oscar.mateo@intel.com>2014-08-15 12:01:31 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-20 17:17:48 +0200
commitb7c71823f11158340b9d61325d3c44124650dc4e (patch)
tree1fb095e8f652f42bb1f484c2c99fd44f2b7ccf05
parent4ed91096881449012b14b1e879f40b4a37533e0e (diff)
downloadop-kernel-dev-b7c71823f11158340b9d61325d3c44124650dc4e.zip
op-kernel-dev-b7c71823f11158340b9d61325d3c44124650dc4e.tar.gz
drm/i915/bdw: Don't write PDP in the legacy way when using LRCs
This is mostly for correctness so that we know we are running the LR context correctly (this is, the PDPs are contained inside the context object). v2: Move the check to inside the enable PPGTT function. The switch happens in two places: the legacy context switch (that we won't hit when Execlists are enabled) and the PPGTT enable, which unfortunately we need. This would look much nicer if the ppgtt->enable was part of the ring init, where it logically belongs. v3: Move the check to the start of the enable PPGTT function. None of the legacy PPGTT enabling is required when using LRCs as the PPGTT is enabled in the context descriptor and the PDPs are written in the LRC. v4: Clarify comment based on review feedback. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Signed-off-by: Thomas Daniel <thomas.daniel@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> [danvet: Resolve conflicts with ppgtt_enable rework.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index d97b280..4db2370 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -826,6 +826,12 @@ static void gen8_ppgtt_enable(struct drm_device *dev)
struct intel_engine_cs *ring;
int j;
+ /* In the case of execlists, PPGTT is enabled by the context descriptor
+ * and the PDPs are contained within the context itself. We don't
+ * need to do anything here. */
+ if (i915.enable_execlists)
+ return;
+
for_each_ring(ring, dev_priv, j) {
I915_WRITE(RING_MODE_GEN7(ring),
_MASKED_BIT_ENABLE(GFX_PPGTT_ENABLE));
OpenPOWER on IntegriCloud