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

Commit 541cc966 authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie
Browse files

drm: Don't try and disable an encoder that was never enabled



Prevents code that assumes that the encoder is active when asked to be
disabled from dying a horrible death.

Reported-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ea5d552c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
	}

	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
		if (!drm_helper_encoder_in_use(encoder)) {
		if (encoder->crtc && !drm_helper_encoder_in_use(encoder)) {
			drm_encoder_disable(encoder);
			/* disconnector encoder from any connector */
			encoder->crtc = NULL;