<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Intel G45] Screen turns blank when terminating a low res X server on a different low res KMS mode."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61457#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Intel G45] Screen turns blank when terminating a low res X server on a different low res KMS mode."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61457">bug 61457</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>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)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>