Skip to content

Commit 79ac66b

Browse files
CertainLach1Naim
authored andcommitted
drm/amd: use fixed dsc bits-per-pixel from edid
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. Signed-off-by: Yaroslav Bolyukin <iam@lach.pw> Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
1 parent 4f1a94d commit 79ac66b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6804,6 +6804,11 @@ static void fill_stream_properties_from_drm_display_mode(
68046804

68056805
stream->output_color_space = get_output_color_space(timing_out, connector_state);
68066806
stream->content_type = get_output_content_type(connector_state);
6807+
6808+
/* DisplayID Type VII pass-through timings. */
6809+
if (mode_in->dsc_passthrough_timings_support && info->dp_dsc_bpp_x16 != 0) {
6810+
stream->timing.dsc_fixed_bits_per_pixel_x16 = info->dp_dsc_bpp_x16;
6811+
}
68076812
}
68086813

68096814
static void fill_audio_info(struct audio_info *audio_info,
@@ -7262,6 +7267,7 @@ create_stream_for_sink(struct drm_connector *connector,
72627267
struct drm_display_mode mode;
72637268
struct drm_display_mode saved_mode;
72647269
struct drm_display_mode *freesync_mode = NULL;
7270+
struct drm_display_mode *dsc_passthru_mode = NULL;
72657271
bool native_mode_found = false;
72667272
bool recalculate_timing = false;
72677273
bool scale = dm_state->scaling != RMX_OFF;
@@ -7353,6 +7359,16 @@ create_stream_for_sink(struct drm_connector *connector,
73537359
}
73547360
}
73557361

7362+
list_for_each_entry(dsc_passthru_mode, &connector->modes, head) {
7363+
if (dsc_passthru_mode->hdisplay == mode.hdisplay &&
7364+
dsc_passthru_mode->vdisplay == mode.vdisplay &&
7365+
drm_mode_vrefresh(dsc_passthru_mode) == mode_refresh) {
7366+
mode.dsc_passthrough_timings_support =
7367+
dsc_passthru_mode->dsc_passthrough_timings_support;
7368+
break;
7369+
}
7370+
}
7371+
73567372
if (recalculate_timing)
73577373
drm_mode_set_crtcinfo(&saved_mode, 0);
73587374

0 commit comments

Comments
 (0)