Commit e84131a8 authored by Joshua Ashton's avatar Joshua Ashton Committed by Alex Deucher
Browse files

amd/display/dc: Fix COLOR_ENCODING and COLOR_RANGE doing nothing for 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 a1e07ba8 ("drm/amd/display: Use plane->color_space for dpp if specified")

Fixes: a1e07ba8 ("drm/amd/display: Use plane->color_space for dpp if specified")
Signed-off-by: default avatarJoshua Ashton <joshua@froggi.es>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 98b02e9f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
+3 −0
Original line number Diff line number Diff line
@@ -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);
+3 −0
Original line number Diff line number Diff line
@@ -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);