Skip to contentSkip to conversation

drm/msm/dpu: ignore NULL clocks

PATCH In review Rob Clark 3 participants 3 messages Nov 14, 2019 – Nov 17, 2019

Subsystems (3)
lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 drm/msm/dpu: ignore NULL clocks

From: Rob Clark <[email protected]>

This isn't an error. Also the clk APIs handle the NULL case, so we can just delete the check.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c | 26 ++++++---------------
 1 file changed, 7 insertions(+), 19 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c +7 -19
index 27fbeb504362..ec1437b0ef75 100644
@@ -93,19 +93,12 @@ int msm_dss_enable_clk(struct dss_clk *clk_arry, int num_clk, int enable)
 			DEV_DBG("%pS->%s: enable '%s'\n",
 				__builtin_return_address(0), __func__,
 				clk_arry[i].clk_name);
-			if (clk_arry[i].clk) {
-				rc = clk_prepare_enable(clk_arry[i].clk);
-				if (rc)
-					DEV_ERR("%pS->%s: %s en fail. rc=%d\n",
-						__builtin_return_address(0),
-						__func__,
-						clk_arry[i].clk_name, rc);
-			} else {
-				DEV_ERR("%pS->%s: '%s' is not available\n",
-					__builtin_return_address(0), __func__,
-					clk_arry[i].clk_name);
-				rc = -EPERM;
-			}
+			rc = clk_prepare_enable(clk_arry[i].clk);
+			if (rc)
+				DEV_ERR("%pS->%s: %s en fail. rc=%d\n",
+					__builtin_return_address(0),
+					__func__,
+					clk_arry[i].clk_name, rc);
 
 			if (rc && i) {
 				msm_dss_enable_clk(&clk_arry[i - 1],
@@ -119,12 +112,7 @@ int msm_dss_enable_clk(struct dss_clk *clk_arry, int num_clk, int enable)
 				__builtin_return_address(0), __func__,
 				clk_arry[i].clk_name);
 
-			if (clk_arry[i].clk)
-				clk_disable_unprepare(clk_arry[i].clk);
-			else
-				DEV_ERR("%pS->%s: '%s' is not available\n",
-					__builtin_return_address(0), __func__,
-					clk_arry[i].clk_name);
+			clk_disable_unprepare(clk_arry[i].clk);
 		}
 	}
 
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#2 lore raw
In reply to Rob Clark

Quoting Rob Clark (2019-11-14 10:51:50)

Quoted 8 lines

From: Rob Clark <[email protected]>

This isn't an error. Also the clk APIs handle the NULL case, so we can just delete the check.

---

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno