diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-09 04:25:23 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-02-09 04:25:23 +0000 |
commit | ef062e3c0826d2c342fd871bc58c2d99f7f00c95 (patch) | |
tree | 4bd3b2da55ea4865e4815ee7db07b79a8df3226c /sys | |
parent | 854a435d72baa8a2e205127adcc759fc778eca27 (diff) |
drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels
From Aun-Ali Zaidi
2093ecf557e733f995c7db6df716c91c43923972 in linux 5.15.y/5.15.22
30fbce374745a9c6af93c775a5ac49a97f822fda in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/core/dc_link_dp.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_link_dp.c b/sys/dev/pci/drm/amd/display/dc/core/dc_link_dp.c index d6405b07785..095020648a3 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/dc_link_dp.c +++ b/sys/dev/pci/drm/amd/display/dc/core/dc_link_dp.c @@ -3913,6 +3913,26 @@ static bool retrieve_link_cap(struct dc_link *link) dp_hw_fw_revision.ieee_fw_rev, sizeof(dp_hw_fw_revision.ieee_fw_rev)); + /* Quirk for Apple MBP 2018 15" Retina panels: wrong DP_MAX_LINK_RATE */ + { + uint8_t str_mbp_2018[] = { 101, 68, 21, 103, 98, 97 }; + uint8_t fwrev_mbp_2018[] = { 7, 4 }; + uint8_t fwrev_mbp_2018_vega[] = { 8, 4 }; + + /* We also check for the firmware revision as 16,1 models have an + * identical device id and are incorrectly quirked otherwise. + */ + if ((link->dpcd_caps.sink_dev_id == 0x0010fa) && + !memcmp(link->dpcd_caps.sink_dev_id_str, str_mbp_2018, + sizeof(str_mbp_2018)) && + (!memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018, + sizeof(fwrev_mbp_2018)) || + !memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018_vega, + sizeof(fwrev_mbp_2018_vega)))) { + link->reported_link_cap.link_rate = LINK_RATE_RBR2; + } + } + memset(&link->dpcd_caps.dsc_caps, '\0', sizeof(link->dpcd_caps.dsc_caps)); memset(&link->dpcd_caps.fec_cap, '\0', sizeof(link->dpcd_caps.fec_cap)); |