Skip to content

Commit f2f5f77

Browse files
vsyrjaladanvet
authored andcommitted
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ä <ville.syrjala@linux.intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent cc17396 commit f2f5f77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6929,7 +6929,8 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
69296929
intel_crtc->cursor_width = width;
69306930
intel_crtc->cursor_height = height;
69316931

6932-
intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
6932+
if (intel_crtc->active)
6933+
intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
69336934

69346935
return 0;
69356936
fail_unpin:
@@ -6948,7 +6949,8 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
69486949
intel_crtc->cursor_x = x;
69496950
intel_crtc->cursor_y = y;
69506951

6951-
intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
6952+
if (intel_crtc->active)
6953+
intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL);
69526954

69536955
return 0;
69546956
}

0 commit comments

Comments
 (0)