drm/amd/display: Fix preferred link rate for NUTMEG
Subsystems (4)
PATCH 1/2 drm/amd/display: Fix preferred link rate for NUTMEG
When there is a preferred link rate setting, it needs to be applied to both the current and initial link rate. This was regressed by a "coding style" fix, which caused the current link rate to not respect the preferred value.
This commit restores the functionality of NUTMEG, the DP bridge encoder found on old APUs such as Kaveri.
--- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3 -1
@@ -750,8 +750,10 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingif (req_bw >dp_link_bandwidth_kbps (link, &link->verified_link_cap))return false; -if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) +if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) { initial_link_setting.link_rate = link->preferred_link_setting.link_rate; + current_link_setting.link_rate = link->preferred_link_setting.link_rate; + }/* search for the minimum link setting that: * 1. is supported according to the link training result
Signature · 1 line
2.53.0
PATCH 2/2 drm/amd/display: Add dp_skip_rbr flag for NUTMEG
No functional changes. Just clean up a conceptual mismatch.
Based on feedback on the NUTMEG code in DC, the preferred_link_setting is meant to force the DP link to a specific setting, meaning both the link rate and lane count should be locked to an exact value. What NUTMEG needs is a lower bound on the link rate, which is not the same concept.
Implement this as a HW workaround flag instead.
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/link/link_detection.c | 2 +- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
@@ -1731,6 +1731,8 @@ struct dc_scratch_space {bool dp_skip_DID2;bool dp_skip_reset_segment;bool dp_skip_fs_144hz; +/* Some DP bridges don't work with RBR and must use HBR. */ +bool dp_skip_rbr;bool dp_mot_reset_segment;/* Some USB4 docks do not handle turning off MST DSC once it has been enabled. */ bool dpia_mst_dsc_always_on;
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -1
@@ -621,7 +621,7 @@ static bool detect_dp(struct dc_link *link, link->dpcd_caps.sink_count.bits.SINK_COUNT =1 ;/* NUTMEG requires that we use HBR, doesn't work with RBR. */ if (link->dpcd_caps.branch_dev_id ==DP_BRANCH_DEVICE_ID_00001A ) - link->preferred_link_setting.link_rate =LINK_RATE_HIGH ; + link->wa_flags.dp_skip_rbr = true; }return true;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3 -3
@@ -750,9 +750,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingif (req_bw >dp_link_bandwidth_kbps (link, &link->verified_link_cap))return false; -if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) { - initial_link_setting.link_rate = link->preferred_link_setting.link_rate; - current_link_setting.link_rate = link->preferred_link_setting.link_rate; +if (link->wa_flags.dp_skip_rbr) { + initial_link_setting.link_rate =LINK_RATE_HIGH ; + current_link_setting.link_rate =LINK_RATE_HIGH ; }/* search for the minimum link setting that:
Signature · 1 line
2.53.0
Alex Deucher
AppliedRe: [PATCH 2/2] drm/amd/display: Add dp_skip_rbr flag for NUTMEG
Applied the series. Thanks!
Alex
Quoted 65 lines · Timur Kristóf
No functional changes. Just clean up a conceptual mismatch.
Based on feedback on the NUTMEG code in DC, the
preferred_link_settingis meant to force the DP link to a specific setting, meaning both the link rate and lane count should be locked to an exact value. What NUTMEG needs is a lower bound on the link rate, which is not the same concept.Implement this as a HW workaround flag instead.
Suggested-by Wenjing Liu <[email protected]>Signed-off-by Timur Kristóf <[email protected]>--- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/link/link_detection.c | 2 +- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/dc/dc.h +2
-0@@ -1731,6 +1731,8 @@ struct dc_scratch_space {bool dp_skip_DID2;bool dp_skip_reset_segment;bool dp_skip_fs_144hz; +/* Some DP bridges don't work with RBR and must use HBR. */ +bool dp_skip_rbr;bool dp_mot_reset_segment;/* Some USB4 docks do not handle turning off MST DSC once it has been enabled. */ bool dpia_mst_dsc_always_on;drivers/gpu/drm/amd/display/dc/link/link_detection.c +1
-1@@ -621,7 +621,7 @@ static bool detect_dp(struct dc_link *link, link->dpcd_caps.sink_count.bits.SINK_COUNT =1 ;/* NUTMEG requires that we use HBR, doesn't work with RBR. */ if (link->dpcd_caps.branch_dev_id ==DP_BRANCH_DEVICE_ID_00001A ) - link->preferred_link_setting.link_rate =LINK_RATE_HIGH ; + link->wa_flags.dp_skip_rbr = true; }return true;drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3
-4@@ -750,9 +750,9 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingif (req_bw >dp_link_bandwidth_kbps (link, &link->verified_link_cap))return false; -if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) { - initial_link_setting.link_rate = link->preferred_link_setting.link_rate; - current_link_setting.link_rate = link->preferred_link_setting.link_rate; +if (link->wa_flags.dp_skip_rbr) { + initial_link_setting.link_rate =LINK_RATE_HIGH ; + current_link_setting.link_rate =LINK_RATE_HIGH ; }/* search for the minimum link setting that: -- 2.53.0
AMD General
Quoted 52 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Timur Kristóf
Sent: Friday, May 29, 2026 05:09
To: [email protected]; Deucher, Alexander <[email protected]>; LIPSKI, IVAN <[email protected]>; Wentland, Harry <[email protected]>; Hung, Alex <[email protected]>; Wu, Ray <[email protected]>; Liu, Wenjing <[email protected]>; Pillai, Aurabindo <[email protected]>; Chuanyu Tseng <[email protected]>; Li, Roman <[email protected]>; Wheeler, Daniel <[email protected]>
Cc: Timur Kristóf <[email protected]>
Subject: [PATCH 1/2] drm/amd/display: Fix preferred link rate for NUTMEGWhen there is a preferred link rate setting, it needs to be applied to both the current and initial link rate.
This was regressed by a "coding style" fix, which caused the current link rate to not respect the preferred value.This commit restores the functionality of NUTMEG, the DP bridge encoder found on old APUs such as Kaveri.
Fixes b74322eea36b ("drm/amd/display: Fix coding style issue")Cc Chuanyu Tseng <[email protected]>Signed-off-by Timur Kristóf <[email protected]>--- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)diff --git
a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.cb/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.cindex817b4010edcbe..f44c13300a59c100644drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3
-1@@ -750,8 +750,10 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingif (req_bw >dp_link_bandwidth_kbps (link, &link->verified_link_cap))return false; -if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) +if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) { initial_link_setting.link_rate = link- >preferred_link_setting.link_rate; + current_link_setting.link_rate = link- >preferred_link_setting.link_rate; + }/* search for the minimum link setting that:
* 1. is supported according to the link training result
--
2.53.0
Ping.
Quoted 11 lines · Timur Kristóf
When there is a preferred link rate setting, it needs to be applied to both the current and initial link rate. This was regressed by a "coding style" fix, which caused the current link rate to not respect the preferred value.
This commit restores the functionality of NUTMEG, the DP bridge encoder found on old APUs such as Kaveri.
Fixes b74322eea36b ("drm/amd/display: Fix coding style issue")Cc Chuanyu Tseng <[email protected]>Signed-off-by Timur Kristóf <[email protected]>
A user recently reported this issue to the tracker and confirmed this patch is an effective fix.
Thanks,
John
Quoted 20 lines
--- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3
-1@@ -750,8 +750,10 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingif (req_bw >dp_link_bandwidth_kbps (link, &link->verified_link_cap))return false; -if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) +if (link->preferred_link_setting.link_rate !=LINK_RATE_UNKNOWN ) { initial_link_setting.link_rate = link->preferred_link_setting.link_rate; + current_link_setting.link_rate = link->preferred_link_setting.link_rate; + }/* search for the minimum link setting that: * 1. is supported according to the link training result
Hi,
I independently hit this regression on a desktop Kaveri system and can confirm this patch fixes it:
- AMD A10-7850K (Kaveri, DCE 8.1), MSI A68HM-E33, VGA monitor on the onboard output (NUTMEG DP-to-VGA bridge)
- Debian kernel 7.1.3 (amdgpu.cik_support=1): VGA monitor receives no signal from KMS takeover on; dmesg shows
"[drm] enabling link 2 failed: 15" (DC_FAIL_DP_LINK_TRAINING).
- Applying just this patch (1/2) on top of v7.1.3 restores VGA output with DC enabled: the link trains, the CRTC comes up at 1360x768@60, and the fix survived three consecutive reboots.
Two notes:
1. The Fixes: tag references b74322eea36b, but that hash does not exist in mainline — it looks like an amd-staging-internal id. In Linus' tree the offending commit is:
a62346043a89 ("drm/amd/display: Fix coding style issue")It would be good to correct this before the patch is pushed so the stable tooling can resolve the dependency.
2. Since the offending commit shipped in v7.1, could this be annotated
Cc: [email protected] # 7.1.x (or nominated for 7.1.y once it lands in mainline)? Every Kaveri/Kabini/Mullins system with a VGA monitor loses display output on release kernels.
Thanks,
Lionso
Quoted 14 lines · On 2026. július 11., szombat 21:35:07 közép-európai nyári idő Lionso Alejandro…
Hi,
I independently hit this regression on a desktop Kaveri system and can confirm this patch fixes it:
- AMD A10-7850K (Kaveri, DCE 8.1), MSI A68HM-E33, VGA monitor on the onboard output (NUTMEG DP-to-VGA bridge)
- Debian kernel 7.1.3 (amdgpu.cik_support=1): VGA monitor receives no signal from KMS takeover on; dmesg shows
"[drm] enabling link 2 failed: 15" (DC_FAIL_DP_LINK_TRAINING).
- Applying just this patch (1/2) on top of v7.1.3 restores VGA output with DC enabled: the link trains, the CRTC comes up at 1360x768@60, and the fix survived three consecutive reboots.
Quoted 1 line
Thank you for the testing!
I would appreciate if you could verify that the second patch also works well.
Quoted 11 lines
Two notes:
1. The Fixes: tag references
b74322eea36b, but that hash does not exist in mainline — it looks like an amd-staging-internal id. In Linus' tree the offending commit is:a62346043a89 ("drm/amd/display: Fix coding style issue")It would be good to correct this before the patch is pushed so the stable tooling can resolve the dependency.
As far as I remember the regression hasn't made it upstream yet when I made the fix, so the hash didn't exist in Linus's tree yet.
Quoted 5 lines
2. Since the offending commit shipped in v7.1, could this be annotated
Cc: [email protected] # 7.1.x (or nominated for 7.1.y once it lands in mainline)? Every Kaveri/Kabini/Mullins system with a VGA monitor loses display output on release kernels.
Agreed. Alex can you please backport this to 7.1?
Thanks & best regards,
Timur
Lionso Alejandro Pacheco Vacacela
Tested-byHi Timur,
Quoted 3 lines · On Sunday, 12 July 2026 19:44:31 CEST Timur Kristóf wrote:
Thank you for the testing!
I would appreciate if you could verify that the second patch also works well.
Happy to! I applied both patches (1/2 and 2/2) on top of v7.1.3, rebuilt, and re-tested on the same machine (A10-7850K / MSI A68HM-E33, VGA on the onboard output). With DC enabled the NUTMEG link trains, the CRTC comes up at 1360x768@60, VGA output is back, and it happily survived a bunch of reboots. dmesg shows "Display Core v3.2.378 initialized on DCE 8.1" with no "enabling link failed" this time. Nice to have this old box on DC at last.
So for 2/2 as well:
Quoted 2 lines
As far as I remember the regression hasn't made it upstream yet when I made the fix, so the hash didn't exist in Linus's tree yet.
Ah, that explains it — makes sense. It has landed since then, so it's really just a matter of refreshing the tag. In Linus' tree the commit is:
a62346043a89 ("drm/amd/display: Fix coding style issue")
and it's an ancestor of v7.1.3 (it shipped in the v7.1 release), so pointing the Fixes: line at that hash when the fix goes out should let the stable tooling pull it into 7.1.y on its own.
Thanks a lot for the quick fix, and thanks Alex for picking up the 7.1 backport — much appreciated.
Best regards,
Lionso