VESA vendor header from DisplayID spec may contain fixed bit per pixel rate, it should be used by drm driver for the modes that declare they are only supported with the declared fixed bits per pixel value.
It is however unclear how to deal with the modes created from userspace. Current implementation assumes that fixed bits per pixel value should always be used if the preferred display mode has this flag set, which is the case for all the known hardware. Signed-off-by: Yaroslav Bolyukin <[email protected]> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0d03e324d5b9..739d5dabcf41 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6521,6 +6521,11 @@ static void fill_stream_properties_from_drm_display_mode( stream->output_color_space = get_output_color_space(timing_out, connector_state); stream->content_type = get_output_content_type(connector_state); + + /* DisplayID Type VII pass-through timings. */ + if (mode_in->dsc_passthrough_timings_support && info->dp_dsc_bpp_x16 != 0) { + stream->timing.dsc_fixed_bits_per_pixel_x16 = info->dp_dsc_bpp_x16; + } } static void fill_audio_info(struct audio_info *audio_info, @@ -7067,6 +7072,13 @@ create_stream_for_sink(struct drm_connector *connector, &mode, preferred_mode, scale); preferred_refresh = drm_mode_vrefresh(preferred_mode); + + /* + * HACK: In case of multiple supported modes, we should look at the matching mode to decide this flag. + * But what is matching mode, how should it be decided? + * Assuming that only preferred mode would have this flag. + */ + mode.dsc_passthrough_timings_support = preferred_mode->dsc_passthrough_timings_support; } } -- 2.51.0
