Skip to content

Commit a0c73db

Browse files
aunali1gregkh
authored andcommitted
drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels
commit 30fbce3 upstream. The eDP link rate reported by the DP_MAX_LINK_RATE dpcd register (0xa) is contradictory to the highest rate supported reported by EDID (0xc = LINK_RATE_RBR2). The effects of this compounded with commit '4a8ca46bae8a ("drm/amd/display: Default max bpc to 16 for eDP")' results in no display modes being found and a dark panel. For now, simply force the maximum supported link rate for the eDP attached 2018 15" Apple Retina panels. Additionally, we must also check the firmware revision since the device ID reported by the DPCD is identical to that of the more capable 16,1, incorrectly quirking it. We also use said firmware check to quirk the refreshed 15,1 models with Vega graphics as they use a slightly newer firmware version. Tested-by: Aun-Ali Zaidi <admin@kodeit.net> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net> Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f071d9f commit a0c73db

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,6 +3587,26 @@ static bool retrieve_link_cap(struct dc_link *link)
35873587
dp_hw_fw_revision.ieee_fw_rev,
35883588
sizeof(dp_hw_fw_revision.ieee_fw_rev));
35893589

3590+
/* Quirk for Apple MBP 2018 15" Retina panels: wrong DP_MAX_LINK_RATE */
3591+
{
3592+
uint8_t str_mbp_2018[] = { 101, 68, 21, 103, 98, 97 };
3593+
uint8_t fwrev_mbp_2018[] = { 7, 4 };
3594+
uint8_t fwrev_mbp_2018_vega[] = { 8, 4 };
3595+
3596+
/* We also check for the firmware revision as 16,1 models have an
3597+
* identical device id and are incorrectly quirked otherwise.
3598+
*/
3599+
if ((link->dpcd_caps.sink_dev_id == 0x0010fa) &&
3600+
!memcmp(link->dpcd_caps.sink_dev_id_str, str_mbp_2018,
3601+
sizeof(str_mbp_2018)) &&
3602+
(!memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018,
3603+
sizeof(fwrev_mbp_2018)) ||
3604+
!memcmp(link->dpcd_caps.sink_fw_revision, fwrev_mbp_2018_vega,
3605+
sizeof(fwrev_mbp_2018_vega)))) {
3606+
link->reported_link_cap.link_rate = LINK_RATE_RBR2;
3607+
}
3608+
}
3609+
35903610
memset(&link->dpcd_caps.dsc_caps, '\0',
35913611
sizeof(link->dpcd_caps.dsc_caps));
35923612
memset(&link->dpcd_caps.fec_cap, '\0', sizeof(link->dpcd_caps.fec_cap));

0 commit comments

Comments
 (0)