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

Commit fc17235f authored by Jerry Zuo's avatar Jerry Zuo Committed by Alex Deucher
Browse files

drm/amd/display: Fix NULL pointer on MST chained mode



Prevent NULL pointer on new_stream being added to ctx
when added MST connectors cannot be found in existing crtc_state
in the chained mode

Signed-off-by: default avatarJerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f4ac176e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4462,6 +4462,13 @@ static int dm_update_crtcs_state(struct dc *dc,
			*lock_and_validation_needed = true;

		} else {/* Add stream for any updated/enabled CRTC */
			/*
			 * Quick fix to prevent NULL pointer on new_stream when
			 * added MST connectors not found in existing crtc_state in the chained mode
			 * TODO: need to dig out the root cause of that
			 */
			if (!aconnector || (!aconnector->dc_sink && aconnector->mst_port))
				continue;

			if (modereset_required(new_crtc_state))
				goto next_crtc;