[Intel-gfx] [PATCH] drm/i915: Don't try to write to SPR_SCALE when disabling the plane

Damien Lespiau damien.lespiau at gmail.com
Tue Oct 23 19:24:25 CEST 2012


From: Damien Lespiau <damien.lespiau at intel.com>

A left over from:
  drm/i915: Don't try to use SPR_SCALE when we don't have a sprite scaler

We also need to avoid to reset this register in _disable()

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index ccfaa6f..fa68e2a 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -153,7 +153,8 @@ ivb_disable_plane(struct drm_plane *plane)
 
 	I915_WRITE(SPRCTL(pipe), I915_READ(SPRCTL(pipe)) & ~SPRITE_ENABLE);
 	/* Can't leave the scaler enabled... */
-	I915_WRITE(SPRSCALE(pipe), 0);
+	if (intel_plane->can_scale)
+		I915_WRITE(SPRSCALE(pipe), 0);
 	/* Activate double buffered register update */
 	I915_MODIFY_DISPBASE(SPRSURF(pipe), 0);
 	POSTING_READ(SPRSURF(pipe));
-- 
1.7.11.7




More information about the Intel-gfx mailing list