Skip to content

Commit

Permalink
amd/display/dc: Fix COLOR_ENCODING and COLOR_RANGE doing nothing for …
Browse files Browse the repository at this point in the history
…DCN20+

For DCN20 and above, the code that actually hooks up the provided
input_color_space got lost at some point.

Fixes COLOR_ENCODING and COLOR_RANGE doing nothing on DCN20+.
Tested using Steam Remote Play Together + gamescope.

Update other DCNs the same wasy DCN1.x was updates in
commit a1e07ba ("drm/amd/display: Use plane->color_space for dpp if specified")

Fixes: a1e07ba ("drm/amd/display: Use plane->color_space for dpp if specified")
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Joshua Ashton authored and Alex Deucher committed Jun 22, 2022
1 parent 98b02e9 commit e84131a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ static void dpp2_cnv_setup (
break;
}

/* Set default color space based on format if none is given. */
color_space = input_color_space ? input_color_space : color_space;

if (is_2bit == 1 && alpha_2bit_lut != NULL) {
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn201/dcn201_dpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ static void dpp201_cnv_setup(
break;
}

/* Set default color space based on format if none is given. */
color_space = input_color_space ? input_color_space : color_space;

if (is_2bit == 1 && alpha_2bit_lut != NULL) {
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ static void dpp3_cnv_setup (
break;
}

/* Set default color space based on format if none is given. */
color_space = input_color_space ? input_color_space : color_space;

if (is_2bit == 1 && alpha_2bit_lut != NULL) {
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);
Expand Down

0 comments on commit e84131a

Please sign in to comment.