Skip to contentSkip to conversation

drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt

PATCH In review Michel Thierry 3 participants 3 messages Aug 8, 2014 – Aug 9, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Update gen8_ppgtt_info to keep working in full ppgtt

The driver will no longer initialize the aliasing ppgtt if we have full ppgtt enabled.

gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the default context. This patch makes it clear.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +6 -0
index 8dc82c3..a62ac66 100644
@@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_engine_cs *ring;
 	struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
+	struct intel_context *ctx = dev_priv->ring[RCS].default_context;
 	int unused, i;
 
+	if (USES_FULL_PPGTT(dev))
+		ppgtt = ctx->ppgtt;
+	else
+		ppgtt = dev_priv->mm.aliasing_ppgtt;
+
 	if (!ppgtt)
 		return;
 
Signature · 1 line
2.0.3
#1 lore raw
Quoted 8 lines · Michel Thierry

The driver will no longer initialize the aliasing ppgtt if we have full ppgtt enabled.

gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the default context. This patch makes it clear.

I actually looked at this one here and decided that ppgtt_info for gen8 is sufficiently broken so that we don't care. Imo we should refactor it a bit so that it does the same as the gen6 version, i.e. dump the aliasing ppgtt or the contexts.

Trying to dump the default ctx ppgtt when full ppgtt is enabled is fairly usesless since nothing at all will ever use that one.

Best approach is probably to remove the gen8 version and push the GenX checks down into the actual ppgtt dump functions or something like that. -Daniel

Quoted 26 lines
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +6 -0
index 8dc82c3..a62ac66 100644
@@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_engine_cs *ring;
 	struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
+	struct intel_context *ctx = dev_priv->ring[RCS].default_context;
 	int unused, i;
 
+	if (USES_FULL_PPGTT(dev))
+		ppgtt = ctx->ppgtt;
+	else
+		ppgtt = dev_priv->mm.aliasing_ppgtt;
+
 	if (!ppgtt)
 		return;
 
Signature · 1 line
2.0.3
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
Quoted 15 lines · Daniel Vetter
Quoted 8 lines · Michel Thierry

The driver will no longer initialize the aliasing ppgtt if we have full ppgtt enabled.

gen8_ppgtt_info uses the aliasing ppgtt or the ppgtt from the default context. This patch makes it clear.

I actually looked at this one here and decided that ppgtt_info for gen8 is sufficiently broken so that we don't care. Imo we should refactor it a bit so that it does the same as the gen6 version, i.e. dump the aliasing ppgtt or the contexts.

Quoted 6 lines

Trying to dump the default ctx ppgtt when full ppgtt is enabled is fairly usesless since nothing at all will ever use that one.

Best approach is probably to remove the gen8 version and push the GenX checks down into the actual ppgtt dump functions or something like that. -Daniel

I did start down this path here:
http://patchwork.freedesktop.org/patch/25728/ (originally here: http://patchwork.freedesktop.org/patch/22348/)

It also helped with the later addition for dynamic page tables. I would ask that someone look at fixing that patch to their needs should the dynamic page table patches ever get merged.

Quoted 36 lines
Quoted 27 lines
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_debugfs.c +6 -0
index 8dc82c3..a62ac66 100644
@@ -1995,8 +1995,14 @@ static void gen8_ppgtt_info(struct seq_file *m, struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_engine_cs *ring;
 	struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt;
+	struct intel_context *ctx = dev_priv->ring[RCS].default_context;
 	int unused, i;
 
+	if (USES_FULL_PPGTT(dev))
+		ppgtt = ctx->ppgtt;
+	else
+		ppgtt = dev_priv->mm.aliasing_ppgtt;
+
 	if (!ppgtt)
 		return;
 
Signature · 1 line
2.0.3
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center