Skip to contentSkip to conversation

media: amphion: wake up when error occurs

PATCH New Ming Qian 1 participant 1 message Apr 29, 2022

Subsystems (2)
lore
Share & tools
lore

Ming Qian

author maintainer
#0 lore raw

PATCH 1/1 media: amphion: wake up when error occurs

when error occurs, driver set error flag,
and driver need to wake up the poll wait

---
 drivers/media/platform/amphion/vpu_v4l2.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/media/platform/amphion/vpu_v4l2.c +4 -4
index 49747e0ee96e..a5de72f644a1 100644
@@ -73,10 +73,10 @@ void vpu_v4l2_set_error(struct vpu_inst *inst)
 	if (inst->fh.m2m_ctx) {
 		src_q = v4l2_m2m_get_src_vq(inst->fh.m2m_ctx);
 		dst_q = v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx);
-		if (src_q)
-			src_q->error = 1;
-		if (dst_q)
-			dst_q->error = 1;
+		src_q->error = 1;
+		dst_q->error = 1;
+		wake_up(&src_q->done_wq);
+		wake_up(&dst_q->done_wq);
 	}
 	vpu_inst_unlock(inst);
 }
Signature · 1 line
2.36.0