Skip to contentSkip to conversation

drm/amdgpu/display: fix unhandled cases in get_phyd32clk_src()

PATCH In review Alex Deucher 2 participants 3 messages Aug 24, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 2/8 drm/amdgpu/display: fix unhandled cases in get_phyd32clk_src()

Fixes an unhandled cases warning and defaults to a more logical return value.

Fixes 808a662bb3a8 ("drm/amd/display: Add DP 2.0 SST DC Support")
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +2 -3
index 97de1c5ab3a6..29b9c128c87c 100644
@@ -730,10 +730,9 @@ static enum phyd32clk_clock_source get_phyd32clk_src(struct dc_link *link)
 		return PHYD32CLKD;
 	case TRANSMITTER_UNIPHY_E:
 		return PHYD32CLKE;
+	default:
+		return PHYD32CLKA;
 	}
-
-	//BREAK_TO_DEBUGGER();
-	return TRANSMITTER_UNIPHY_A;
 }
 
 void enable_dp_hpo_output(struct dc_link *link, const struct dc_link_settings *link_settings)
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 4/8 drm/amdgpu/display: drop unused variable.

Trivial.

Fixes 808a662bb3a8 ("drm/amd/display: Add DP 2.0 SST DC Support")
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -3
index bdc7d7ebee12..f58d3956f3e2 100644
@@ -186,9 +186,6 @@ static bool create_links(
 	int i;
 	int connectors_num;
 	struct dc_bios *bios = dc->ctx->dc_bios;
-#if defined(CONFIG_DRM_AMD_DC_DCN)
-	int dp_hpo_link_count = 0;
-#endif
 
 	dc->link_count = 0;
 
Signature · 1 line
2.31.1
maintainer Reviewed-by on v1 4/8
#2 lore raw

Re: [PATCH 4/8] drm/amdgpu/display: drop unused variable.

Patches 2 and 4 are

Harry

Quoted 23 lines · Alex Deucher

Trivial.

Fixes 808a662bb3a8 ("drm/amd/display: Add DP 2.0 SST DC Support")
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -3
index bdc7d7ebee12..f58d3956f3e2 100644
@@ -186,9 +186,6 @@ static bool create_links(
 	int i;
 	int connectors_num;
 	struct dc_bios *bios = dc->ctx->dc_bios;
-#if defined(CONFIG_DRM_AMD_DC_DCN)
-	int dp_hpo_link_count = 0;
-#endif
 
 	dc->link_count = 0;