Skip to content

Commit 973a9c8

Browse files
misyltoadalexdeucher
authored andcommitted
drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix
The YCC conversion matrix for RGB -> COLOR_SPACE_YCBCR2020_TYPE is missing the values for the fourth column of the matrix. The fourth column of the matrix is essentially just a value that is added given that the color is 3 components in size. These values are needed to bias the chroma from the [-1, 1] -> [0, 1] range. This fixes color being very green when using Gamescope HDR on HDMI output which prefers YCC 4:4:4. Fixes: 40df2f8 ("drm/amd/display: color space ycbcr709 support") Reviewed-by: Melissa Wen <[email protected]> Signed-off-by: Joshua Ashton <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 79601b8 commit 973a9c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ static const struct out_csc_color_matrix_type output_csc_matrix[] = {
9090
{ 0xE00, 0xF349, 0xFEB7, 0x1000, 0x6CE, 0x16E3,
9191
0x24F, 0x200, 0xFCCB, 0xF535, 0xE00, 0x1000} },
9292
{ COLOR_SPACE_YCBCR2020_TYPE,
93-
{ 0x1000, 0xF149, 0xFEB7, 0x0000, 0x0868, 0x15B2,
94-
0x01E6, 0x0000, 0xFB88, 0xF478, 0x1000, 0x0000} },
93+
{ 0x1000, 0xF149, 0xFEB7, 0x1004, 0x0868, 0x15B2,
94+
0x01E6, 0x201, 0xFB88, 0xF478, 0x1000, 0x1004} },
9595
{ COLOR_SPACE_YCBCR709_BLACK_TYPE,
9696
{ 0x0000, 0x0000, 0x0000, 0x1000, 0x0000, 0x0000,
9797
0x0000, 0x0200, 0x0000, 0x0000, 0x0000, 0x1000} },

0 commit comments

Comments
 (0)