mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 11:55:12 +07:00
drm/amd/display: Update link rate from DPCD 10
[WHY] Some panels return a link rate of 0 (unknown) in DPCD 0. In this case, an appropriate mode cannot be set, and certain panels will show corruption as they are forced to use a mode they do not support. [HOW] Read DPCD 10 in the case where supported link rate from DPCD 0 is unknown, and pass that value on to the reported link rate. This re-introduces behaviour present in previous versions that appears to have been accidentally removed. Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
540c122924
commit
53c81fc787
@ -1624,8 +1624,7 @@ static bool decide_edp_link_settings(struct dc_link *link, struct dc_link_settin
|
||||
uint32_t link_bw;
|
||||
|
||||
if (link->dpcd_caps.dpcd_rev.raw < DPCD_REV_14 ||
|
||||
link->dpcd_caps.edp_supported_link_rates_count == 0 ||
|
||||
link->dc->config.optimize_edp_link_rate == false) {
|
||||
link->dpcd_caps.edp_supported_link_rates_count == 0) {
|
||||
*link_setting = link->verified_link_cap;
|
||||
return true;
|
||||
}
|
||||
@ -2609,7 +2608,8 @@ void detect_edp_sink_caps(struct dc_link *link)
|
||||
memset(supported_link_rates, 0, sizeof(supported_link_rates));
|
||||
|
||||
if (link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_14 &&
|
||||
link->dc->config.optimize_edp_link_rate) {
|
||||
(link->dc->config.optimize_edp_link_rate ||
|
||||
link->reported_link_cap.link_rate == LINK_RATE_UNKNOWN)) {
|
||||
// Read DPCD 00010h - 0001Fh 16 bytes at one shot
|
||||
core_link_read_dpcd(link, DP_SUPPORTED_LINK_RATES,
|
||||
supported_link_rates, sizeof(supported_link_rates));
|
||||
@ -2624,6 +2624,9 @@ void detect_edp_sink_caps(struct dc_link *link)
|
||||
link_rate = linkRateInKHzToLinkRateMultiplier(link_rate_in_khz);
|
||||
link->dpcd_caps.edp_supported_link_rates[link->dpcd_caps.edp_supported_link_rates_count] = link_rate;
|
||||
link->dpcd_caps.edp_supported_link_rates_count++;
|
||||
|
||||
if (link->reported_link_cap.link_rate < link_rate)
|
||||
link->reported_link_cap.link_rate = link_rate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user