From: Ville Syrjälä Date: Tue, 17 Sep 2013 15:33:44 +0000 (+0300) Subject: drm/i915: Don't enable the cursor on a disable pipe X-Git-Tag: v3.12-rc2~3^2~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2f5f771c5fc0fa252cde3d0d0452dcc785cc17a;p=profile%2Fivi%2Fkernel-x86-ivi.git drm/i915: Don't enable the cursor on a disable pipe On HSW enabling a plane on a disabled pipe may hang the entire system. And there's no good reason for doing it ever, so just don't. v2: Move the crtc active checks to intel_crtc_cursor_{set,move} to avoid confusing people during modeset Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Tested-by: Paulo Zanoni Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a38056d..d8a1d98 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6929,7 +6929,8 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, intel_crtc->cursor_width = width; intel_crtc->cursor_height = height; - intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); + if (intel_crtc->active) + intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); return 0; fail_unpin: @@ -6948,7 +6949,8 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) intel_crtc->cursor_x = x; intel_crtc->cursor_y = y; - intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); + if (intel_crtc->active) + intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); return 0; }