소스 검색

video: driver: Fix unbalanced irq warning in interrupt handling

In case of watchdog interrupt, power off sequence will
get called which will make intr_status to 0 due to which
enable_irq gets called from isr_handler irrespective of
watchdog interrupt. Now during power up sequence again
when the enable_irq gets called, it will through
"Unbalanced enable for irq" error.
Added a fix for the same.

Call trace ->
enable_irq+0x9c/0xf8
__power_on_ar50lt+0x2d4/0x320 [msm_video]
__load_fw+0x92c/0x1368 [msm_video]
venus_hfi_core_init+0x64/0x468 [msm_video]
msm_vidc_core_init+0x158/0x4bc [msm_video]
msm_vidc_open+0x90/0x804 [msm_video]

Change-Id: Ic675d7540ef029e530a8cd5b87fb97f72e72057f
Signed-off-by: Vedang Nagar <[email protected]>
Vedang Nagar 2 년 전
부모
커밋
8765409333
3개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 2
      driver/variant/iris2/src/msm_vidc_iris2.c
  2. 1 2
      driver/variant/iris3/src/msm_vidc_iris3.c
  3. 1 2
      driver/variant/iris33/src/msm_vidc_iris33.c

+ 1 - 2
driver/variant/iris2/src/msm_vidc_iris2.c

@@ -439,9 +439,8 @@ static int __power_off_iris2(struct msm_vidc_core *core)
 	if (rc)
 		d_vpr_e("%s: failed to unvote buses\n", __func__);
 
-	if (!(core->intr_status & WRAPPER_INTR_STATUS_A2HWD_BMSK_IRIS2))
+	if (!call_venus_op(core, watchdog, core, core->intr_status))
 		disable_irq_nosync(core->resource->irq);
-	core->intr_status = 0;
 
 	msm_vidc_change_core_sub_state(core, CORE_SUBSTATE_POWER_ENABLE, 0, __func__);
 

+ 1 - 2
driver/variant/iris3/src/msm_vidc_iris3.c

@@ -489,9 +489,8 @@ static int __power_off_iris3(struct msm_vidc_core *core)
 	if (rc)
 		d_vpr_e("%s: failed to unvote buses\n", __func__);
 
-	if (!(core->intr_status & WRAPPER_INTR_STATUS_A2HWD_BMSK_IRIS3))
+	if (!call_venus_op(core, watchdog, core, core->intr_status))
 		disable_irq_nosync(core->resource->irq);
-	core->intr_status = 0;
 
 	msm_vidc_change_core_sub_state(core, CORE_SUBSTATE_POWER_ENABLE, 0, __func__);
 

+ 1 - 2
driver/variant/iris33/src/msm_vidc_iris33.c

@@ -593,9 +593,8 @@ static int __power_off_iris33(struct msm_vidc_core *core)
 	if (rc)
 		d_vpr_e("%s: failed to unvote buses\n", __func__);
 
-	if (!(core->intr_status & WRAPPER_INTR_STATUS_A2HWD_BMSK_IRIS33))
+	if (!call_venus_op(core, watchdog, core, core->intr_status))
 		disable_irq_nosync(core->resource->irq);
-	core->intr_status = 0;
 
 	msm_vidc_change_core_sub_state(core, CORE_SUBSTATE_POWER_ENABLE, 0, __func__);