Skip to content

Commit 0c8c5bd

Browse files
leo-sunli1alexdeucher
authored andcommitted
drm/amd/display: Add all planes on CRTC to state for overlay cursor
[Why] DC has a special commit path for native cursor, which use the built-in cursor pipe within DCN planes. This update path does not require all enabled planes to be added to the list of surface updates sent to DC. This is not the case for overlay cursor; it uses the same path as MPO commits. This update path requires all enabled planes to be added to the list of surface updates sent to DC. Otherwise, DC will disable planes not inside the list. [How] If overlay cursor is needed, add all planes on the same CRTC as this cursor to the atomic state. This is already done for non-cursor planes (MPO), just before the added lines. Fixes: 1b04dcc ("drm/amd/display: Introduce overlay cursor mode") Closes: https://lore.kernel.org/lkml/[email protected] Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Leo Li <[email protected]> Tested-by: Mikhail Gavrilov <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4c3140f commit 0c8c5bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11409,6 +11409,17 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
1140911409
drm_dbg(dev, "Failed to determine cursor mode\n");
1141011410
goto fail;
1141111411
}
11412+
11413+
/*
11414+
* If overlay cursor is needed, DC cannot go through the
11415+
* native cursor update path. All enabled planes on the CRTC
11416+
* need to be added for DC to not disable a plane by mistake
11417+
*/
11418+
if (dm_new_crtc_state->cursor_mode == DM_CURSOR_OVERLAY_MODE) {
11419+
ret = drm_atomic_add_affected_planes(state, crtc);
11420+
if (ret)
11421+
goto fail;
11422+
}
1141211423
}
1141311424

1141411425
/* Remove exiting planes if they are modified */

0 commit comments

Comments
 (0)