Skip to content

Commit 24cc4f8

Browse files
Evgenii Krasnikovalexdeucher
authored andcommitted
drm/amd/display: add visual confirm colors to differentiate layer_index > 0
[WHY] Currently there is no way to visually identify if there is one or more layers presented fullscreen on the display [HOW] Add new visual confirm colors in get_surface_visual_confirm_color for planes with layer_index > 0 Signed-off-by: Evgenii Krasnikov <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Stylon Wang <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 60df844 commit 24cc4f8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,20 @@ void get_surface_visual_confirm_color(
323323
case PIXEL_FORMAT_ARGB8888:
324324
/* set border color to red */
325325
color->color_r_cr = color_value;
326+
if (pipe_ctx->plane_state->layer_index > 0) {
327+
/* set border color to pink */
328+
color->color_b_cb = color_value;
329+
color->color_g_y = color_value * 0.5;
330+
}
326331
break;
327332

328333
case PIXEL_FORMAT_ARGB2101010:
329334
/* set border color to blue */
330335
color->color_b_cb = color_value;
336+
if (pipe_ctx->plane_state->layer_index > 0) {
337+
/* set border color to cyan */
338+
color->color_g_y = color_value;
339+
}
331340
break;
332341
case PIXEL_FORMAT_420BPP8:
333342
/* set border color to green */
@@ -343,6 +352,11 @@ void get_surface_visual_confirm_color(
343352
color->color_r_cr = color_value;
344353
color->color_b_cb = color_value;
345354
color->color_g_y = color_value;
355+
if (pipe_ctx->plane_state->layer_index > 0) {
356+
/* set border color to orange */
357+
color->color_g_y = 0.22 * color_value;
358+
color->color_b_cb = 0;
359+
}
346360
break;
347361
default:
348362
break;

0 commit comments

Comments
 (0)