Skip to content

Commit 3341d30

Browse files
psw2koralexdeucher
authored andcommitted
drm/amd/display: Add Logging for HDMI color depth information
[Why] Recent HDMI2.0 HF1-1 V-Swing testing showed that logging deep color status helps in validation of testcase. [How] Add logging based on various color depths and pixel encoding formats. Signed-off-by: Praful Swarnakar <[email protected]> Reviewed-by: Hersen Wu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 30acef3 commit 3341d30

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,33 +522,44 @@ void enc1_stream_encoder_hdmi_set_stream_attribute(
522522
switch (crtc_timing->display_color_depth) {
523523
case COLOR_DEPTH_888:
524524
REG_UPDATE(HDMI_CONTROL, HDMI_DEEP_COLOR_DEPTH, 0);
525+
DC_LOG_DEBUG("HDMI source set to 24BPP deep color depth\n");
525526
break;
526527
case COLOR_DEPTH_101010:
527528
if (crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR422) {
528529
REG_UPDATE_2(HDMI_CONTROL,
529530
HDMI_DEEP_COLOR_DEPTH, 1,
530531
HDMI_DEEP_COLOR_ENABLE, 0);
532+
DC_LOG_DEBUG("HDMI source 30BPP deep color depth" \
533+
"disabled for YCBCR422 pixel encoding\n");
531534
} else {
532535
REG_UPDATE_2(HDMI_CONTROL,
533536
HDMI_DEEP_COLOR_DEPTH, 1,
534537
HDMI_DEEP_COLOR_ENABLE, 1);
538+
DC_LOG_DEBUG("HDMI source 30BPP deep color depth" \
539+
"enabled for YCBCR422 non-pixel encoding\n");
535540
}
536541
break;
537542
case COLOR_DEPTH_121212:
538543
if (crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR422) {
539544
REG_UPDATE_2(HDMI_CONTROL,
540545
HDMI_DEEP_COLOR_DEPTH, 2,
541546
HDMI_DEEP_COLOR_ENABLE, 0);
547+
DC_LOG_DEBUG("HDMI source 36BPP deep color depth" \
548+
"disabled for YCBCR422 pixel encoding\n");
542549
} else {
543550
REG_UPDATE_2(HDMI_CONTROL,
544551
HDMI_DEEP_COLOR_DEPTH, 2,
545552
HDMI_DEEP_COLOR_ENABLE, 1);
553+
DC_LOG_DEBUG("HDMI source 36BPP deep color depth" \
554+
"enabled for non-pixel YCBCR422 encoding\n");
546555
}
547556
break;
548557
case COLOR_DEPTH_161616:
549558
REG_UPDATE_2(HDMI_CONTROL,
550559
HDMI_DEEP_COLOR_DEPTH, 3,
551560
HDMI_DEEP_COLOR_ENABLE, 1);
561+
DC_LOG_DEBUG("HDMI source deep color depth enabled in" \
562+
"reserved mode\n");
552563
break;
553564
default:
554565
break;

0 commit comments

Comments
 (0)