mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
71021265a6
commit
8fde5884f4
1 changed files with 10 additions and 6 deletions
|
@ -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 =
|
||||
|
|
Loading…
Add table
Reference in a new issue