aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-24 04:31:44 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-24 11:22:00 -0500
commit85ba7b7d399dd2c4c65bd84b9ae4dfbd707e79e7 (patch)
tree7fcb1962926051c8ae7a6dafc10ad93fd57b0470 /drivers
parent232a6ee9af8adb185640f67fcaaa9014a9aa0573 (diff)
Revert "drm/i915: Mask reserved bits in display/sprite address registers"
This reverts commit 446f254566ea8911c9e19c7bc8a162fc0e53cf31. I've left the masking in the pageflip code since that seems to be some useful piece of preemptive robustness. Iirc I've merged this patch under the assumption that the BIOS leaves some random gunk in the lower bits and gets unhappy if we trample on them. We have quite a few case like this, so this made sense. Now I've just learned that there's actual hardware features bits in the low 12 bits, and the kernel needs to preserve them to allow a userspace blob to do its job. Given Dave Airlie's clear stance on userspace blob drivers I've quickly chatted with him and he doesn't seem too happy. So let's revert this. If there are indeed bits that we must preserve in this range then we can ressurrect this patch, but with proper documentation for those bits supplied. And we probably also need to think a bit about interactions with our driver. Cc: Armin Reese <armin.c.reese@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Dave Airlie <airlied@linux.ie> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c18
3 files changed, 13 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index ba0550222269..a48b7cad6f11 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3578,8 +3578,6 @@
3578#define DISP_BASEADDR_MASK (0xfffff000) 3578#define DISP_BASEADDR_MASK (0xfffff000)
3579#define I915_LO_DISPBASE(val) (val & ~DISP_BASEADDR_MASK) 3579#define I915_LO_DISPBASE(val) (val & ~DISP_BASEADDR_MASK)
3580#define I915_HI_DISPBASE(val) (val & DISP_BASEADDR_MASK) 3580#define I915_HI_DISPBASE(val) (val & DISP_BASEADDR_MASK)
3581#define I915_MODIFY_DISPBASE(reg, gfx_addr) \
3582 (I915_WRITE((reg), (gfx_addr) | I915_LO_DISPBASE(I915_READ(reg))))
3583 3581
3584/* VBIOS flags */ 3582/* VBIOS flags */
3585#define SWF00 (dev_priv->info->display_mmio_offset + 0x71410) 3583#define SWF00 (dev_priv->info->display_mmio_offset + 0x71410)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 98371eeac77c..40a9338ad54f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2114,8 +2114,8 @@ static int i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb,
2114 fb->pitches[0]); 2114 fb->pitches[0]);
2115 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]); 2115 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
2116 if (INTEL_INFO(dev)->gen >= 4) { 2116 if (INTEL_INFO(dev)->gen >= 4) {
2117 I915_MODIFY_DISPBASE(DSPSURF(plane), 2117 I915_WRITE(DSPSURF(plane),
2118 i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset); 2118 i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset);
2119 I915_WRITE(DSPTILEOFF(plane), (y << 16) | x); 2119 I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
2120 I915_WRITE(DSPLINOFF(plane), linear_offset); 2120 I915_WRITE(DSPLINOFF(plane), linear_offset);
2121 } else 2121 } else
@@ -2205,8 +2205,8 @@ static int ironlake_update_plane(struct drm_crtc *crtc,
2205 i915_gem_obj_ggtt_offset(obj), linear_offset, x, y, 2205 i915_gem_obj_ggtt_offset(obj), linear_offset, x, y,
2206 fb->pitches[0]); 2206 fb->pitches[0]);
2207 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]); 2207 I915_WRITE(DSPSTRIDE(plane), fb->pitches[0]);
2208 I915_MODIFY_DISPBASE(DSPSURF(plane), 2208 I915_WRITE(DSPSURF(plane),
2209 i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset); 2209 i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset);
2210 if (IS_HASWELL(dev) || IS_BROADWELL(dev)) { 2210 if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
2211 I915_WRITE(DSPOFFSET(plane), (y << 16) | x); 2211 I915_WRITE(DSPOFFSET(plane), (y << 16) | x);
2212 } else { 2212 } else {
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index fe4de89c374c..716a3c9c0751 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -141,8 +141,8 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
141 141
142 I915_WRITE(SPSIZE(pipe, plane), (crtc_h << 16) | crtc_w); 142 I915_WRITE(SPSIZE(pipe, plane), (crtc_h << 16) | crtc_w);
143 I915_WRITE(SPCNTR(pipe, plane), sprctl); 143 I915_WRITE(SPCNTR(pipe, plane), sprctl);
144 I915_MODIFY_DISPBASE(SPSURF(pipe, plane), i915_gem_obj_ggtt_offset(obj) + 144 I915_WRITE(SPSURF(pipe, plane), i915_gem_obj_ggtt_offset(obj) +
145 sprsurf_offset); 145 sprsurf_offset);
146 POSTING_READ(SPSURF(pipe, plane)); 146 POSTING_READ(SPSURF(pipe, plane));
147} 147}
148 148
@@ -158,7 +158,7 @@ vlv_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
158 I915_WRITE(SPCNTR(pipe, plane), I915_READ(SPCNTR(pipe, plane)) & 158 I915_WRITE(SPCNTR(pipe, plane), I915_READ(SPCNTR(pipe, plane)) &
159 ~SP_ENABLE); 159 ~SP_ENABLE);
160 /* Activate double buffered register update */ 160 /* Activate double buffered register update */
161 I915_MODIFY_DISPBASE(SPSURF(pipe, plane), 0); 161 I915_WRITE(SPSURF(pipe, plane), 0);
162 POSTING_READ(SPSURF(pipe, plane)); 162 POSTING_READ(SPSURF(pipe, plane));
163 163
164 intel_update_sprite_watermarks(dplane, crtc, 0, 0, false, false); 164 intel_update_sprite_watermarks(dplane, crtc, 0, 0, false, false);
@@ -315,8 +315,8 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
315 if (intel_plane->can_scale) 315 if (intel_plane->can_scale)
316 I915_WRITE(SPRSCALE(pipe), sprscale); 316 I915_WRITE(SPRSCALE(pipe), sprscale);
317 I915_WRITE(SPRCTL(pipe), sprctl); 317 I915_WRITE(SPRCTL(pipe), sprctl);
318 I915_MODIFY_DISPBASE(SPRSURF(pipe), 318 I915_WRITE(SPRSURF(pipe),
319 i915_gem_obj_ggtt_offset(obj) + sprsurf_offset); 319 i915_gem_obj_ggtt_offset(obj) + sprsurf_offset);
320 POSTING_READ(SPRSURF(pipe)); 320 POSTING_READ(SPRSURF(pipe));
321} 321}
322 322
@@ -333,7 +333,7 @@ ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
333 if (intel_plane->can_scale) 333 if (intel_plane->can_scale)
334 I915_WRITE(SPRSCALE(pipe), 0); 334 I915_WRITE(SPRSCALE(pipe), 0);
335 /* Activate double buffered register update */ 335 /* Activate double buffered register update */
336 I915_MODIFY_DISPBASE(SPRSURF(pipe), 0); 336 I915_WRITE(SPRSURF(pipe), 0);
337 POSTING_READ(SPRSURF(pipe)); 337 POSTING_READ(SPRSURF(pipe));
338 338
339 /* 339 /*
@@ -489,8 +489,8 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
489 I915_WRITE(DVSSIZE(pipe), (crtc_h << 16) | crtc_w); 489 I915_WRITE(DVSSIZE(pipe), (crtc_h << 16) | crtc_w);
490 I915_WRITE(DVSSCALE(pipe), dvsscale); 490 I915_WRITE(DVSSCALE(pipe), dvsscale);
491 I915_WRITE(DVSCNTR(pipe), dvscntr); 491 I915_WRITE(DVSCNTR(pipe), dvscntr);
492 I915_MODIFY_DISPBASE(DVSSURF(pipe), 492 I915_WRITE(DVSSURF(pipe),
493 i915_gem_obj_ggtt_offset(obj) + dvssurf_offset); 493 i915_gem_obj_ggtt_offset(obj) + dvssurf_offset);
494 POSTING_READ(DVSSURF(pipe)); 494 POSTING_READ(DVSSURF(pipe));
495} 495}
496 496
@@ -506,7 +506,7 @@ ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
506 /* Disable the scaler */ 506 /* Disable the scaler */
507 I915_WRITE(DVSSCALE(pipe), 0); 507 I915_WRITE(DVSSCALE(pipe), 0);
508 /* Flush double buffered register updates */ 508 /* Flush double buffered register updates */
509 I915_MODIFY_DISPBASE(DVSSURF(pipe), 0); 509 I915_WRITE(DVSSURF(pipe), 0);
510 POSTING_READ(DVSSURF(pipe)); 510 POSTING_READ(DVSSURF(pipe));
511 511
512 /* 512 /*