[PATCH] drm/amd/display: correct AMDGPU Display Core logging logic

Andreas Bauer posted 1 patch 1 month, 1 week ago
[PATCH] drm/amd/display: correct AMDGPU Display Core logging logic
Posted by Andreas Bauer 1 month, 1 week ago
In: drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c

dp_is_lttpr_present() does output a DC_LOG_ERROR() when monitor reports
DPCD lane count non zero but no lanes detected, and gracefully falls back
to ignoring what the monitor reports.

dp_retrieve_lttpr_cap() also logs an DC_LOG_ERROR() when hardware returns
wrong count. Fallback means also graceful handling.

According to documentation, DC_LOG_WARNING() is supposed to be used for 
this case (hardware bug with graceful fallback)

Change DC_LOG_ERROR() to DC_LOG_WARNING() in both cases.

Signed-off-by: Andreas Bauer <a.bauer@zukunftsfirma.de>
---
diff -uprN linux-source-6.18.orig/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c linux-source-6.18.modified/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
--- linux-source-6.18.orig/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c   2025-12-29 21:03:40.477580191 +0000
+++ linux-source-6.18.modified/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c       2025-12-29 22:09:47.338435938 +0000
@@ -391,7 +391,8 @@ bool dp_is_lttpr_present(struct dc_link
                        link->dpcd_caps.lttpr_caps.max_lane_count <= 4);
 
        if (lttpr_count > 0 && !is_lttpr_present)
-               DC_LOG_ERROR("LTTPR count is nonzero but invalid lane count reported. Assuming no LTTPR present.\n");
+               DC_LOG_WARNING("LTTPR count is nonzero but invalid lane count reported. " +
+                              "Assuming no LTTPR present.\n");
 
        return is_lttpr_present;
 }
@@ -1638,7 +1639,7 @@ enum dc_status dp_retrieve_lttpr_cap(str
                /* If you see this message consistently, either the host platform has FIXED_VS flag
                 * incorrectly configured or the sink device is returning an invalid count.
                 */
-               DC_LOG_ERROR("lttpr_caps phy_repeater_cnt is 0x%x, forcing it to 0x80.",
+               DC_LOG_WARNING("lttpr_caps phy_repeater_cnt is 0x%x, forcing it to 0x80.",
                             link->dpcd_caps.lttpr_caps.phy_repeater_cnt);
                link->dpcd_caps.lttpr_caps.phy_repeater_cnt = 0x80;
                lttpr_count = 1;