Skip to contentSkip to conversation

drm/i915/bdw: Restore PPAT on thaw

PATCH Applied Ben Widawsky 5 participants 5 messages Mar 18, 2014 – Mar 19, 2014

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

PATCH 1/1 drm/i915/bdw: Restore PPAT on thaw

Apparently it is wiped out from under us, and we get some really fun caching artifacts upon resume (it seems to be WB for all types by default).

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -1
index bd016e2..1b45a04 100644
@@ -30,6 +30,8 @@
 #include "i915_trace.h"
 #include "intel_drv.h"
 
+static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
+
 bool intel_enable_ppgtt(struct drm_device *dev, bool full)
 {
 	if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
@@ -1371,8 +1373,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 	}
 
 
-	if (INTEL_INFO(dev)->gen >= 8)
+	if (INTEL_INFO(dev)->gen >= 8) {
+		gen8_setup_private_ppat(dev_priv);
 		return;
+	}
 
 	list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
 		/* TODO: Perhaps it shouldn't be gen6 specific */
Signature · 1 line
1.9.0
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Ben Widawsky

Apparently it is wiped out from under us, and we get some really fun caching artifacts upon resume (it seems to be WB for all types by default).

Works for me backported on to both a 3.14-rc3 w/ ChromeOS sauce and a vanilla 3.14-rc6. Thanks!

Quoted 32 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -2
index bd016e2..1b45a04 100644
@@ -30,6 +30,8 @@
 #include "i915_trace.h"
 #include "intel_drv.h"
 
+static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
+
 bool intel_enable_ppgtt(struct drm_device *dev, bool full)
 {
        if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
@@ -1371,8 +1373,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
        }
 
 
-       if (INTEL_INFO(dev)->gen >= 8)
+       if (INTEL_INFO(dev)->gen >= 8) {
+               gen8_setup_private_ppat(dev_priv);
                return;
+       }
 
        list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
                /* TODO: Perhaps it shouldn't be gen6 specific */
--

1.9.0

Signature · 3 lines
James Ausmus
Sr. Software Engineer
SSG-OTC ChromeOS Integration
#2 lore raw
In reply to Ben Widawsky
Quoted 6 lines · Ben Widawsky

Apparently it is wiped out from under us, and we get some really fun caching artifacts upon resume (it seems to be WB for all types by default).

Perhaps related to https://bugs.freedesktop.org/show_bug.cgi?id=76113 ? -Chris

Quoted 37 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -1
index bd016e2..1b45a04 100644
@@ -30,6 +30,8 @@
 #include "i915_trace.h"
 #include "intel_drv.h"
 
+static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
+
 bool intel_enable_ppgtt(struct drm_device *dev, bool full)
 {
 	if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
@@ -1371,8 +1373,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 	}
 
 
-	if (INTEL_INFO(dev)->gen >= 8)
+	if (INTEL_INFO(dev)->gen >= 8) {
+		gen8_setup_private_ppat(dev_priv);
 		return;
+	}
 
 	list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
 		/* TODO: Perhaps it shouldn't be gen6 specific */
Signature · 6 lines
1.9.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Tested-by on v1 1/1
#3 lore raw
In reply to Ben Widawsky
Quoted 6 lines · Ben Widawsky

Apparently it is wiped out from under us, and we get some really fun caching artifacts upon resume (it seems to be WB for all types by default).

Excellent!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76113

Quoted 30 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -1
index bd016e2..1b45a04 100644
@@ -30,6 +30,8 @@
 #include "i915_trace.h"
 #include "intel_drv.h"
 
+static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
+
 bool intel_enable_ppgtt(struct drm_device *dev, bool full)
 {
 	if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
@@ -1371,8 +1373,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 	}
 
 
-	if (INTEL_INFO(dev)->gen >= 8)
+	if (INTEL_INFO(dev)->gen >= 8) {
+		gen8_setup_private_ppat(dev_priv);
 		return;
+	}
 
 	list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
 		/* TODO: Perhaps it shouldn't be gen6 specific */
Signature · 1 line
[email protected]
#4 lore raw
Quoted 5 lines · Timo Aaltonen
Quoted 4 lines · Ben Widawsky

Apparently it is wiped out from under us, and we get some really fun caching artifacts upon resume (it seems to be WB for all types by default).

Quoted 7 lines
Quoted 2 lines

Excellent!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76113

Also Cc: [email protected]

Queued for -next, thanks for the patch.
-Daniel

Quoted 39 lines
Quoted 31 lines
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -1
index bd016e2..1b45a04 100644
@@ -30,6 +30,8 @@
 #include "i915_trace.h"
 #include "intel_drv.h"
 
+static void gen8_setup_private_ppat(struct drm_i915_private *dev_priv);
+
 bool intel_enable_ppgtt(struct drm_device *dev, bool full)
 {
 	if (i915.enable_ppgtt == 0 || !HAS_ALIASING_PPGTT(dev))
@@ -1371,8 +1373,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 	}
 
 
-	if (INTEL_INFO(dev)->gen >= 8)
+	if (INTEL_INFO(dev)->gen >= 8) {
+		gen8_setup_private_ppat(dev_priv);
 		return;
+	}
 
 	list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
 		/* TODO: Perhaps it shouldn't be gen6 specific */
Signature · 5 lines
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch