Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 947fdaad authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm/i915: Do not attempt to re-enable an unconnected primary plane



Due to user fudging (for instance using video=VGA-1:e with FBDEV=n) we can
attempt to reset an inconsistent CRTC that is marked as active but has
no assigned fb. It would be wise to fix this earlier, but the long
term plan is to have primary and secondary planes associated with a
CRTC, in which crtc->fb being NULL will be expected. So for a quick
short term fix with pretensions of grandeur, just check for a NULL fb
during GPU reset and ignore the plane restoration.

This fixes a potential hard hang (a panic in the panic handler)
following a GPU hang.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
[danvet: Add a corresponding fixme comment.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1da51581
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -2241,7 +2241,12 @@ void intel_display_handle_reset(struct drm_device *dev)
		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);


		mutex_lock(&crtc->mutex);
		mutex_lock(&crtc->mutex);
		if (intel_crtc->active)
		/*
		 * FIXME: Once we have proper support for primary planes (and
		 * disabling them without disabling the entire crtc) allow again
		 * a NULL crtc->fb.
		 */
		if (intel_crtc->active && crtc->fb)
			dev_priv->display.update_plane(crtc, crtc->fb,
			dev_priv->display.update_plane(crtc, crtc->fb,
						       crtc->x, crtc->y);
						       crtc->x, crtc->y);
		mutex_unlock(&crtc->mutex);
		mutex_unlock(&crtc->mutex);