diff options
author | Charlene Liu <charlene.liu@amd.com> | 2017-01-31 20:18:05 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:13:34 -0400 |
commit | 8fde5884f4a18dec81ab5d498bf7bf3c156f8dfb (patch) | |
tree | 3831359f6bb7fb0664e5558a863ced13440fa44a | |
parent | 71021265a6f03893139f58f2bc50d2ad9adc3826 (diff) | |
download | linux-8fde5884f4a18dec81ab5d498bf7bf3c156f8dfb.tar.bz2 |
drm/amd/display: Fix YCbCr pixel format shows green issue
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 |
1 files 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 = |