]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
authorMario Kleiner <mario.kleiner.de@gmail.com>
Fri, 28 Feb 2020 21:36:07 +0000 (22:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:08:38 +0000 (09:08 +0200)
commit53225a1db549f045e3c92b4f71a21b80bbde5952
tree8cbf624b749be2ba058c382044aa7cf5482a9c22
parente6280c05e63747f46b4aef46f228e63ffa6d2002
drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017

[ Upstream commit 3c0e1b6e161f8031c2035980a79dd61be1b26245 ]

This fixes a problem found on the MacBookPro 2017 Retina panel:

The panel reports 10 bpc color depth in its EDID, and the
firmware chooses link settings at boot which support enough
bandwidth for 10 bpc (324000 kbit/sec aka LINK_RATE_RBR2
aka 0xc), but the DP_MAX_LINK_RATE dpcd register only reports
2.7 Gbps (multiplier value 0xa) as possible, in direct
contradiction of what the firmware successfully set up.

This restricts the panel to 8 bpc, not providing the full
color depth of the panel on Linux <= 5.5. Additionally, commit
'8eec062fef6e ("drm/amd/display: Default max bpc to 16 for eDP")'
introduced into Linux 5.6-rc1 will unclamp panel depth to
its full 10 bpc, thereby requiring a eDP bandwidth for all
modes that exceeds the bandwidth available and causes all modes
to fail validation -> No modes for the laptop panel -> failure
to set any mode -> Panel goes dark.

This patch adds a quirk specific to the MBP 2017 15" Retina
panel to override reported max link rate to the correct maximum
of 0xc = LINK_RATE_RBR2 to fix the darkness and reduced display
precision.

Please apply for Linux 5.6+ to avoid regressing Apple MBP panel
support.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c