]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Add override for visual confirm
authorLeo Zeng <Leo.Zeng@amd.com>
Tue, 25 Feb 2025 20:59:59 +0000 (15:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Apr 2025 19:18:30 +0000 (15:18 -0400)
[WHY]
We want to allow the display manager to override the visual
confirm color in DC when required.

[HOW]
Add new visual confirm mode VISUAL_CONFIRM_EXPLICIT, check mode before
setting visual confirm color.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Leo Zeng <Leo.Zeng@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h

index 28d1353f403dfbc9266ad4de1d9ddbfc4f2a4afb..5a44f5da68dcc5eae887429cda16681cac0d5616 100644 (file)
@@ -1192,6 +1192,12 @@ static void apply_ctx_interdependent_lock(struct dc *dc,
 
 static void dc_update_visual_confirm_color(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
 {
+       if (dc->debug.visual_confirm & VISUAL_CONFIRM_EXPLICIT) {
+               memcpy(&pipe_ctx->visual_confirm_color, &pipe_ctx->plane_state->visual_confirm_color,
+               sizeof(pipe_ctx->visual_confirm_color));
+               return;
+       }
+
        if (dc->ctx->dce_version >= DCN_VERSION_1_0) {
                memset(&pipe_ctx->visual_confirm_color, 0, sizeof(struct tg_color));
 
index 7c2ee052692604c3235af4abd721f5bbe55e6683..78dd4d1f51dca3ae5555129d80a00a9d16b26b68 100644 (file)
@@ -496,6 +496,7 @@ enum visual_confirm {
        VISUAL_CONFIRM_HW_CURSOR = 20,
        VISUAL_CONFIRM_VABC = 21,
        VISUAL_CONFIRM_DCC = 22,
+       VISUAL_CONFIRM_EXPLICIT = 0x80000000,
 };
 
 enum dc_psr_power_opts {