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

Commit c30f55a7 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Daniel Vetter
Browse files

drm/atomic: Don't set crtc_state->enable manually



The enable field needs to be kept in sync with the mode_blob field. Call
drm_atomic_set_mode_prop_for_crtc() instead of setting enable to false
in order to dereference the mode blob correctly.

v2:
- Check the return value of drm_atomic_set_mode_prop_for_crtc()
- Drop the num_connectors local variable

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ffc5fbdb
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1555,11 +1555,15 @@ static int update_output_state(struct drm_atomic_state *state,
		if (crtc == set->crtc)
			continue;

		crtc_state->enable =
			drm_atomic_connectors_for_crtc(state, crtc);
		if (!crtc_state->enable)
		if (!drm_atomic_connectors_for_crtc(state, crtc)) {
			ret = drm_atomic_set_mode_prop_for_crtc(crtc_state,
								NULL);
			if (ret < 0)
				return ret;

			crtc_state->active = false;
		}
	}

	return 0;
}