Skip to content

Commit aa6dcf1

Browse files
Stanimir Varbanovmchehab
authored andcommitted
media: venus: helpers: Add helper to mark fatal vb2 error
Add a helper to mark source and destination vb2 queues fatal unrecoverable error. Signed-off-by: Stanimir Varbanov <[email protected]> Tested-by: Vikash Garodia <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 3efc520 commit aa6dcf1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

drivers/media/platform/qcom/venus/helpers.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,18 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q)
15141514
}
15151515
EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming);
15161516

1517+
void venus_helper_vb2_queue_error(struct venus_inst *inst)
1518+
{
1519+
struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx;
1520+
struct vb2_queue *q;
1521+
1522+
q = v4l2_m2m_get_src_vq(m2m_ctx);
1523+
vb2_queue_error(q);
1524+
q = v4l2_m2m_get_dst_vq(m2m_ctx);
1525+
vb2_queue_error(q);
1526+
}
1527+
EXPORT_SYMBOL_GPL(venus_helper_vb2_queue_error);
1528+
15171529
int venus_helper_process_initial_cap_bufs(struct venus_inst *inst)
15181530
{
15191531
struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx;

drivers/media/platform/qcom/venus/helpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb);
2121
void venus_helper_vb2_buf_queue(struct vb2_buffer *vb);
2222
void venus_helper_vb2_stop_streaming(struct vb2_queue *q);
2323
int venus_helper_vb2_start_streaming(struct venus_inst *inst);
24+
void venus_helper_vb2_queue_error(struct venus_inst *inst);
2425
void venus_helper_m2m_device_run(void *priv);
2526
void venus_helper_m2m_job_abort(void *priv);
2627
int venus_helper_get_bufreq(struct venus_inst *inst, u32 type,

0 commit comments

Comments
 (0)