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 <quic_majja@quicinc.com>
This commit is contained in:
@@ -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__);
|
||||
|
Viittaa uudesa ongelmassa
Block a user