drm/amd/display: Calculate output_color_space after pixel encoding adjustment
authorjsg <jsg@openbsd.org>
Wed, 25 Jan 2023 02:01:03 +0000 (02:01 +0000)
committerjsg <jsg@openbsd.org>
Wed, 25 Jan 2023 02:01:03 +0000 (02:01 +0000)
From Joshua Ashton
87e84d0ff97cf8d508910d793866083a918d8cab in linux-6.1.y/6.1.8
79601b894849cb6f6d6122e6590f1887ac4a66b3 in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 5f565df..fcb2665 100644 (file)
@@ -5285,8 +5285,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) {
@@ -5297,6 +5295,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,