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

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

drm/amd/display: Fix a logic defect in cursor move



Regression caused by: Ib98354194d7

Need to check crtc->stream before updating cursor attributes
and position.

Signed-off-by: default avatarJerry Zuo <Jerry.Zuo@amd.com>
Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3411eac1
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -3736,15 +3736,16 @@ static void handle_cursor_update(struct drm_plane *plane,

	attributes.pitch = attributes.width;

	if (crtc_state->stream) {
		if (!dc_stream_set_cursor_attributes(crtc_state->stream,
							 &attributes))
			DRM_ERROR("DC failed to set cursor attributes\n");

	if (crtc_state->stream)
		if (!dc_stream_set_cursor_position(crtc_state->stream,
						   &position))
			DRM_ERROR("DC failed to set cursor position\n");
	}
}

static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
{