Skip to content

Commit

Permalink
drm/amd/display: Calculate output_color_space after pixel encoding ad…
Browse files Browse the repository at this point in the history
…justment

commit 79601b8 upstream.

Code in get_output_color_space depends on knowing the pixel encoding to
determine whether to pick between eg. COLOR_SPACE_SRGB or
COLOR_SPACE_YCBCR709 for transparent RGB -> YCbCr 4:4:4 in the driver.

v2: Fixed patch being accidentally based on a personal feature branch, oops!

Fixes: ea11731 ("drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded")
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Joshua-Ashton authored and gregkh committed Jan 24, 2023
1 parent 032cebd commit 87e84d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Expand Up @@ -5283,8 +5283,6 @@ static void fill_stream_properties_from_drm_display_mode(

timing_out->aspect_ratio = get_aspect_ratio(mode_in);

stream->output_color_space = get_output_color_space(timing_out);

stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) {
Expand All @@ -5295,6 +5293,8 @@ static void fill_stream_properties_from_drm_display_mode(
adjust_colour_depth_from_display_info(timing_out, info);
}
}

stream->output_color_space = get_output_color_space(timing_out);
}

static void fill_audio_info(struct audio_info *audio_info,
Expand Down

0 comments on commit 87e84d0

Please sign in to comment.