[PATCH 3/8] drm/amdgpu/display: handle all cases in decide_cr_training_pattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need a default case to handle the additional enum values.  While
here drop the need for a local variable.

Fixes: 808a662bb3a8 ("drm/amd/display: Add DP 2.0 SST DC Support")
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index fc122c8c2318..0126e71841fa 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -257,20 +257,15 @@ static void dpcd_set_training_pattern(
 static enum dc_dp_training_pattern decide_cr_training_pattern(
 		const struct dc_link_settings *link_settings)
 {
-	enum dc_dp_training_pattern pattern = DP_TRAINING_PATTERN_SEQUENCE_1;
-
 	switch (dp_get_link_encoding_format(link_settings)) {
 	case DP_8b_10b_ENCODING:
-		pattern = DP_TRAINING_PATTERN_SEQUENCE_1;
-		break;
+	default:
+		return DP_TRAINING_PATTERN_SEQUENCE_1;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	case DP_128b_132b_ENCODING:
-		pattern = DP_128b_132b_TPS1;
-		break;
+		return DP_128b_132b_TPS1;
 #endif
 	}
-
-	return pattern;
 }
 
 static enum dc_dp_training_pattern decide_eq_training_pattern(struct dc_link *link,
-- 
2.31.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux