<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Ubuntu12.04.2 Haswell linear framebuffer support under extended mode broken by intel_gen4_compute_offset_xtiled()"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61152#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Ubuntu12.04.2 Haswell linear framebuffer support under extended mode broken by intel_gen4_compute_offset_xtiled()"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61152">bug 61152</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>The code reads fine according to the bspec - it mentions no restrictions on
PRI_OFFSET to tiled modes. So the only thing I could come up with was that we
broke the ordering of latching:

diff --git a/drivers/gpu/drm/i915/intel_display.c
b/drivers/gpu/drm/i915/intel_display.c
index 4179780..86edbb2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2175,10 +2175,10 @@ static int i9xx_update_plane(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
               obj->gtt_offset, linear_offset, x, y, fb->pitches[0]);
     I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
     if (INTEL_INFO(dev)->gen >= 4) {
-        I915_MODIFY_DISPBASE(DSPSURF(plane),
-                     obj->gtt_offset + intel_crtc->dspaddr_offset);
         I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
         I915_WRITE(DSPLINOFF(plane), linear_offset);
+        I915_MODIFY_DISPBASE(DSPSURF(plane),
+                     obj->gtt_offset + intel_crtc->dspaddr_offset);
     } else
         I915_WRITE(DSPADDR(plane), obj->gtt_offset + linear_offset);
     POSTING_READ(reg);
@@ -2264,14 +2264,14 @@ static int ironlake_update_plane(struct drm_crtc *crtc,
     DRM_DEBUG_KMS("Writing base %08X %08lX %d %d %d\n",
               obj->gtt_offset, linear_offset, x, y, fb->pitches[0]);
     I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
-    I915_MODIFY_DISPBASE(DSPSURF(plane),
-                 obj->gtt_offset + intel_crtc->dspaddr_offset);
     if (IS_HASWELL(dev)) {
         I915_WRITE(DSPOFFSET(plane), (y << 16) | x);
     } else {
         I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
         I915_WRITE(DSPLINOFF(plane), linear_offset);
     }
+    I915_MODIFY_DISPBASE(DSPSURF(plane),
+                 obj->gtt_offset + intel_crtc->dspaddr_offset);
     POSTING_READ(reg);

     return 0;</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>