From 0e7f7b3a20a8531463592086579f1db31b4a3483 Mon Sep 17 00:00:00 2001 From: Nicholas Kazlauskas Date: Thu, 20 Nov 2025 09:51:34 -0500 Subject: [PATCH] drm/amd/display: Reset pipe mask at beginning of cursor offload [Why] Double cursor when switching between hardware and software cursor when dragging an MPO window can occur with cursor offload enabled. The abort cursor update in the full programming path is responsible for this issue since it does not reset the pipe mask when attempting to submit an empty update. The firmware programs the payload as requested which may contain invalid or stale data for the previously enabled pipes, resulting in an offset or double cursor. [How] For performance we don't want to memset the entire payload structure due to its size, so just reset the pipe mask which will indicate the payload data is empty. Reviewed-by: Dillon Varone Signed-off-by: Nicholas Kazlauskas Signed-off-by: Roman Li Tested-by: Dan Wheeler Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c index cb2dfd34b5e2e..1271bf55dac3b 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c @@ -1631,6 +1631,7 @@ void dcn35_begin_cursor_offload_update(struct dc *dc, const struct pipe_ctx *pip payload_idx = write_idx % ARRAY_SIZE(cs->offload_streams[stream_idx].payloads); cs->offload_streams[stream_idx].payloads[payload_idx].write_idx_start = write_idx; + cs->offload_streams[stream_idx].payloads[payload_idx].pipe_mask = 0; if (pipe->plane_res.hubp) pipe->plane_res.hubp->cursor_offload = true; -- 2.47.3