]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Correct FIXED_VS Link Rate Toggle Condition
authorJing Zhou <Jing.Zhou@amd.com>
Mon, 17 Nov 2025 07:18:50 +0000 (15:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 18:56:41 +0000 (13:56 -0500)
[WHY&HOW]
The condition is only perform toggle if FIXED_VS LTTPR reports
no IEEE OUI.
The literal "\x0,\x0,\x0" contains commas changes the
bytes being compared to {0x00,0x2C,0X00}.
The correct literal should be "\x00\x00\x00" without commas.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Jing Zhou <Jing.Zhou@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c

index ce174ce5579c0771ec945451dbe2d17770e78551..6a7c4a59ff4c7b1af10725dacdc0d87f01fde0b1 100644 (file)
@@ -271,7 +271,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence(
        rate = get_dpcd_link_rate(&lt_settings->link_settings);
 
        // Only perform toggle if FIXED_VS LTTPR reports no IEEE OUI
-       if (memcmp("\x0,\x0,\x0", &link->dpcd_caps.lttpr_caps.lttpr_ieee_oui[0], 3) == 0) {
+       if (memcmp("\x00\x00\x00", &link->dpcd_caps.lttpr_caps.lttpr_ieee_oui[0], 3) == 0) {
                /* Vendor specific: Toggle link rate */
                toggle_rate = (rate == 0x6) ? 0xA : 0x6;