Skip to content

Commit 374735c

Browse files
effective-lightgregkh
authored andcommitted
drm/amd/display: use max_dsc_bpp in amdgpu_dm
commit 6e5abe9 upstream. Since, the quirk is handled in the DRM core now, we can use that value instead of the internal value. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 268bfb3 commit 374735c

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5714,16 +5714,14 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector,
57145714
{
57155715
struct drm_connector *drm_connector = &aconnector->base;
57165716
uint32_t link_bandwidth_kbps;
5717-
uint32_t max_dsc_target_bpp_limit_override = 0;
57185717
struct dc *dc = sink->ctx->dc;
57195718
uint32_t max_supported_bw_in_kbps, timing_bw_in_kbps;
57205719
uint32_t dsc_max_supported_bw_in_kbps;
5720+
uint32_t max_dsc_target_bpp_limit_override =
5721+
drm_connector->display_info.max_dsc_bpp;
57215722

57225723
link_bandwidth_kbps = dc_link_bandwidth_kbps(aconnector->dc_link,
57235724
dc_link_get_link_cap(aconnector->dc_link));
5724-
if (stream->link && stream->link->local_sink)
5725-
max_dsc_target_bpp_limit_override =
5726-
stream->link->local_sink->edid_caps.panel_patch.max_dsc_target_bpp_limit;
57275725

57285726
/* Set DSC policy according to dsc_clock_en */
57295727
dc_dsc_policy_set_enable_dsc_when_not_needed(

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,18 @@ static void set_dsc_configs_from_fairness_vars(struct dsc_mst_fairness_params *p
673673
int count,
674674
int k)
675675
{
676+
struct drm_connector *drm_connector;
676677
int i;
677678

678679
for (i = 0; i < count; i++) {
680+
drm_connector = &params[i].aconnector->base;
681+
679682
memset(&params[i].timing->dsc_cfg, 0, sizeof(params[i].timing->dsc_cfg));
680683
if (vars[i + k].dsc_enabled && dc_dsc_compute_config(
681684
params[i].sink->ctx->dc->res_pool->dscs[0],
682685
&params[i].sink->dsc_caps.dsc_dec_caps,
683686
params[i].sink->ctx->dc->debug.dsc_min_slice_height_override,
684-
params[i].sink->edid_caps.panel_patch.max_dsc_target_bpp_limit,
687+
drm_connector->display_info.max_dsc_bpp,
685688
0,
686689
params[i].timing,
687690
&params[i].timing->dsc_cfg)) {
@@ -723,12 +726,16 @@ static int bpp_x16_from_pbn(struct dsc_mst_fairness_params param, int pbn)
723726
struct dc_dsc_config dsc_config;
724727
u64 kbps;
725728

729+
struct drm_connector *drm_connector = &param.aconnector->base;
730+
uint32_t max_dsc_target_bpp_limit_override =
731+
drm_connector->display_info.max_dsc_bpp;
732+
726733
kbps = div_u64((u64)pbn * 994 * 8 * 54, 64);
727734
dc_dsc_compute_config(
728735
param.sink->ctx->dc->res_pool->dscs[0],
729736
&param.sink->dsc_caps.dsc_dec_caps,
730737
param.sink->ctx->dc->debug.dsc_min_slice_height_override,
731-
param.sink->edid_caps.panel_patch.max_dsc_target_bpp_limit,
738+
max_dsc_target_bpp_limit_override,
732739
(int) kbps, param.timing, &dsc_config);
733740

734741
return dsc_config.bits_per_pixel;

0 commit comments

Comments
 (0)