diff mbox

drm/i915: Don't try to write to SPR_SCALE when disabling the plane

Message ID 1351013065-12057-1-git-send-email-damien.lespiau@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Damien Lespiau Oct. 23, 2012, 5:24 p.m. UTC
From: Damien Lespiau <damien.lespiau@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@intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Vetter Oct. 23, 2012, 5:38 p.m. UTC | #1
On Tue, Oct 23, 2012 at 06:24:25PM +0100, Damien Lespiau wrote:
> From: Damien Lespiau <damien.lespiau@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@intel.com>

Squashed into the previous patch, thanks.
-Daniel
diff mbox

Patch

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));