[Bug 61457] [Intel G45] Screen turns blank when terminating a low res X server on a different low res KMS mode.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 1 06:06:36 PST 2013


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

--- Comment #8 from Chris Wilson <chris at chris-wilson.co.uk> ---
Let's try that a little bit harder:

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 61fee7f..ec01ddd 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1369,18 +1369,17 @@ static void g4x_update_wm(struct drm_device *dev)
                 &planeb_wm, &cursorb_wm))
         enabled |= 2;

-    if (single_plane_enabled(enabled) &&
-        g4x_compute_srwm(dev, ffs(enabled) - 1,
-                 sr_latency_ns,
-                 &g4x_wm_info,
-                 &g4x_cursor_wm_info,
-                 &plane_sr, &cursor_sr)) {
-        I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN);
-    } else {
-        I915_WRITE(FW_BLC_SELF,
-               I915_READ(FW_BLC_SELF) & ~FW_BLC_SELF_EN);
+    I915_WRITE(FW_BLC_SELF,
+           I915_READ(FW_BLC_SELF) & ~FW_BLC_SELF_EN);
+    POSTING_READ(FW_BLC_SELF);
+
+    if (!single_plane_enabled(enabled) ||
+        !g4x_compute_srwm(dev, ffs(enabled) - 1,
+                  sr_latency_ns,
+                  &g4x_wm_info,
+                  &g4x_cursor_wm_info,
+                  &plane_sr, &cursor_sr))
         plane_sr = cursor_sr = 0;
-    }

     DRM_DEBUG_KMS("Setting FIFO watermarks - A: plane=%d, cursor=%d, B:
plane=%d, cursor=%d, SR: plane=%d, cursor=%d\n",
               planea_wm, cursora_wm,
@@ -1399,6 +1398,9 @@ static void g4x_update_wm(struct drm_device *dev)
     I915_WRITE(DSPFW3,
            (I915_READ(DSPFW3) & ~(DSPFW_HPLL_SR_EN | DSPFW_CURSOR_SR_MASK)) |
            (cursor_sr << DSPFW_CURSOR_SR_SHIFT));
+
+    if (plane_sr && cursor_sr)
+        I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN);
 }

 static void i965_update_wm(struct drm_device *dev)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20130301/d8ef2142/attachment.html>


More information about the intel-gfx-bugs mailing list