diff options
author | Nikola Cornij <nikola.cornij@amd.com> | 2021-04-30 23:45:31 +0200 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2021-05-01 00:47:45 +0200 |
commit | 4128359666793d9eb733a4a113ada3afa5d0da88 (patch) | |
tree | 05da2d3d82f3a8baeb8befbad582697c1b89350c /drivers/gpu/drm | |
parent | drm/panel: panel-simple: Add missing pm_runtime_disable() calls (diff) | |
download | linux-4128359666793d9eb733a4a113ada3afa5d0da88.tar.xz linux-4128359666793d9eb733a4a113ada3afa5d0da88.zip |
drm/i915: Use the correct max source link rate for MST
[why]
Previously used value was not safe to provide the correct value, i.e. it
could be 0 if not not configured, leading to no MST on this platform.
[how]
Do not use the value from BIOS, but from the structure populated at
encoder initialization time.
Fixes: 98025a62cb00 ("drm/dp_mst: Use Extended Base Receiver Capability DPCD space")
Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[fixed open coded drm_dp_link_rate_to_bw_code()]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210430214531.24565-2-nikola.cornij@amd.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp_mst.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index bf7f8487945c..f608c0cb98f4 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -942,7 +942,8 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id) struct intel_dp *intel_dp = &dig_port->dp; enum port port = dig_port->base.port; int ret; - int bios_max_link_rate; + int max_source_rate = + intel_dp->source_rates[intel_dp->num_source_rates - 1]; if (!HAS_DP_MST(i915) || intel_dp_is_edp(intel_dp)) return 0; @@ -957,11 +958,11 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id) /* create encoders */ intel_dp_create_fake_mst_encoders(dig_port); - bios_max_link_rate = intel_bios_dp_max_link_rate(&dig_port->base); ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, &i915->drm, &intel_dp->aux, 16, 3, (u8)dig_port->max_lanes, - (u8)(bios_max_link_rate / 27000), conn_base_id); + drm_dp_link_rate_to_bw_code(max_source_rate), + conn_base_id); if (ret) return ret; |