Skip to contentSkip to conversation

drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap()

PATCH In review Hamza Mahfooz 2 participants 2 messages Jan 20, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: use a more appropriate return value in dp_retrieve_lttpr_cap()

Not all ASICs support LTTPR, however if they don't it doesn't mean that we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED instead of DC_ERROR_UNEXPECTED.

---
 drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c +1 -1
index e72ad1b8330f..21fd9275ae4c 100644
@@ -1462,7 +1462,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
 	bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
 
 	if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
-		return DC_ERROR_UNEXPECTED;
+		return DC_NOT_SUPPORTED;
 
 	/* By reading LTTPR capability, RX assumes that we will enable
 	 * LTTPR extended aux timeout if LTTPR is present.
Signature · 1 line
2.39.0
Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Hamza Mahfooz

Not all ASICs support LTTPR, however if they don't it doesn't mean that we have encountered unexpected behaviour. So, use DC_NOT_SUPPORTED instead of DC_ERROR_UNEXPECTED.

---
 drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c +1 -2
index e72ad1b8330f..21fd9275ae4c 100644
@@ -1462,7 +1462,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
        bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
 
        if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
-               return DC_ERROR_UNEXPECTED;
+               return DC_NOT_SUPPORTED;
 
        /* By reading LTTPR capability, RX assumes that we will enable
         * LTTPR extended aux timeout if LTTPR is present.
--

2.39.0