[Intel-gfx] [PATCH 4/8] drm/i915: Only rotate cursor base when the cursor is visible.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Nov 17 01:56:07 PST 2015


There is a if branch in i9xx_update_cursor that may get taken
otherwise, resulting in cursor not being made invisible accidentally.

Cc: stable at vger.kernel.org
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c7ed478ddd49..70e4589e6387 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10040,7 +10040,7 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
 	I915_WRITE(CURPOS(pipe), pos);
 
 	/* ILK+ do this automagically */
-	if (HAS_GMCH_DISPLAY(dev) &&
+	if (HAS_GMCH_DISPLAY(dev) && base &&
 	    crtc->cursor->state->rotation == BIT(DRM_ROTATE_180)) {
 		base += (cursor_state->crtc_h *
 			 cursor_state->crtc_w - 1) * 4;
-- 
2.1.0



More information about the Intel-gfx mailing list