From: Charlene Liu <charlene.liu@xxxxxxx> Change-Id: Ife9d9a6f177e8eb8ec2526d3ef419226fd3833c8 Signed-off-by: Charlene Liu <charlene.liu at amd.com> Reviewed-by: Charlene Liu <Charlene.Liu at amd.com> Acked-by: Harry Wentland <Harry.Wentland at amd.com> --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index ee1c3b029394..3d8a85e48b05 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1300,19 +1300,23 @@ static void set_avi_info_frame( info_frame.avi_info_packet.info_packet_hdmi.bits.S0_S1 = scan_type; /* C0, C1 : Colorimetry */ - if (color_space == COLOR_SPACE_YCBCR709) + if (color_space == COLOR_SPACE_YCBCR709 || + color_space == COLOR_SPACE_YCBCR709_LIMITED) info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = COLORIMETRY_ITU709; - else if (color_space == COLOR_SPACE_YCBCR601) + else if (color_space == COLOR_SPACE_YCBCR601 || + color_space == COLOR_SPACE_YCBCR601_LIMITED) info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = COLORIMETRY_ITU601; - else + else { + if (stream->public.timing.pixel_encoding != PIXEL_ENCODING_RGB) + BREAK_TO_DEBUGGER(); info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = COLORIMETRY_NO_DATA; - + } if (color_space == COLOR_SPACE_2020_RGB_FULLRANGE || - color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE || - color_space == COLOR_SPACE_2020_YCBCR) { + color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE || + color_space == COLOR_SPACE_2020_YCBCR) { info_frame.avi_info_packet.info_packet_hdmi.bits.EC0_EC2 = COLORIMETRYEX_BT2020RGBYCBCR; info_frame.avi_info_packet.info_packet_hdmi.bits.C0_C1 = -- 2.9.3