Переглянути джерело

video-driver: resolve retry assert xo reset issue

In assert xo reset failure case, count increment and
usleep are skipped resulting in indefinite while loop.
Correct the conditions to avoid looping indefinitely.

Change-Id: I38fae272f0c7c676e1454e1fb0a8bfee860ea2f0
Signed-off-by: Maheshwar Ajja <[email protected]>
Maheshwar Ajja 2 роки тому
батько
коміт
e044c01ccc
1 змінених файлів з 6 додано та 3 видалено
  1. 6 3
      driver/variant/iris33/src/msm_vidc_iris33.c

+ 6 - 3
driver/variant/iris33/src/msm_vidc_iris33.c

@@ -471,13 +471,16 @@ static int __power_off_iris33_controller(struct msm_vidc_core *core)
 	count = 0;
 	do {
 		rc = call_res_op(core, reset_control_acquire, core, "video_xo_reset");
-		if (rc) {
-			d_vpr_e("%s: failed to acquire video_xo_reset control\n", __func__);
+		if (!rc) {
+			break;
 		} else {
+			d_vpr_e(
+				"%s: failed to acquire video_xo_reset control, count %d\n",
+				__func__, count);
 			count++;
 			usleep_range(1000, 1000);
 		}
-	} while (rc && count < 100);
+	} while (count < 100);
 
 	if (count >= 100) {
 		d_vpr_e("%s: timeout acquiring video_xo_reset\n", __func__);