]> Pileus Git - ~andy/linux/blobdiff - drivers/gpu/drm/i915/intel_display.c
drm/i915: Fix primary plane offset on HSW
[~andy/linux] / drivers / gpu / drm / i915 / intel_display.c
index 4e7affd268eb60f12f7502504761d173e578ff54..5d9b6509c2722e3553244b504a20c69742a21e5c 100644 (file)
@@ -2128,8 +2128,12 @@ static int ironlake_update_plane(struct drm_crtc *crtc,
        I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
        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);
+       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);
+       }
        POSTING_READ(reg);
 
        return 0;