aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAakarsh Jain <aakarsh.jain@samsung.com>2023-12-13 13:41:03 +0530
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-12-13 14:33:49 +0100
commita394c3ff5f98389aa19e036b4fe3cd46c2d3c60f (patch)
tree1b33084df9d2120a08ea9f5569a20673dfe4f949
parentmedia: s5p-mfc: Add support for DMABUF for encoder (diff)
downloadwireguard-linux-a394c3ff5f98389aa19e036b4fe3cd46c2d3c60f.tar.xz
wireguard-linux-a394c3ff5f98389aa19e036b4fe3cd46c2d3c60f.zip
media: s5p-mfc: Set context for valid case before calling try_run
Context bit is set for hardware execution if there is a buffer in source and destination queue before calling try_run in the init_buffers function. Now there will be a new context created and hardware will be invoked for the buffer queued instead of waiting for another buffer to be queued from userspace to set this context bit for hw execution. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy <smithatmurthy@gmail.com> Signed-off-by: Aakarsh Jain <aakarsh.jain@samsung.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to '')
-rw-r--r--drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
index bd055dea827e..fbb047eadf5a 100644
--- a/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/samsung/s5p-mfc/s5p_mfc.c
@@ -604,6 +604,8 @@ static void s5p_mfc_handle_init_buffers(struct s5p_mfc_ctx *ctx,
s5p_mfc_clock_off();
wake_up(&ctx->queue);
+ if (ctx->src_queue_cnt >= 1 && ctx->dst_queue_cnt >= 1)
+ set_work_bit_irqsave(ctx);
s5p_mfc_hw_call(dev->mfc_ops, try_run, dev);
} else {
WARN_ON(test_and_clear_bit(0, &dev->hw_lock) == 0);