media: venus: helpers: Add helper to mark fatal vb2 error
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Fri, 23 Apr 2021 09:08:05 +0000 (10:08 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 21 Oct 2021 13:22:08 +0000 (14:22 +0100)
Add a helper to mark source and destination vb2 queues fatal
unrecoverable error.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Tested-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/helpers.c
drivers/media/platform/qcom/venus/helpers.h

index 8cebb8e..dacd244 100644 (file)
@@ -1514,6 +1514,18 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q)
 }
 EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming);
 
+void venus_helper_vb2_queue_error(struct venus_inst *inst)
+{
+       struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx;
+       struct vb2_queue *q;
+
+       q = v4l2_m2m_get_src_vq(m2m_ctx);
+       vb2_queue_error(q);
+       q = v4l2_m2m_get_dst_vq(m2m_ctx);
+       vb2_queue_error(q);
+}
+EXPORT_SYMBOL_GPL(venus_helper_vb2_queue_error);
+
 int venus_helper_process_initial_cap_bufs(struct venus_inst *inst)
 {
        struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx;
index e6269b4..6a250c3 100644 (file)
@@ -21,6 +21,7 @@ int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb);
 void venus_helper_vb2_buf_queue(struct vb2_buffer *vb);
 void venus_helper_vb2_stop_streaming(struct vb2_queue *q);
 int venus_helper_vb2_start_streaming(struct venus_inst *inst);
+void venus_helper_vb2_queue_error(struct venus_inst *inst);
 void venus_helper_m2m_device_run(void *priv);
 void venus_helper_m2m_job_abort(void *priv);
 int venus_helper_get_bufreq(struct venus_inst *inst, u32 type,