Skip to content

Commit

Permalink
media: mediatek: vcodec: using each instance lat_buf count replace co…
Browse files Browse the repository at this point in the history
…re ready list

[ Upstream commit f7a3780 ]

Core Hardware decoder depends on each instance lat_buf count,
calling queue_work decode again when the lat_buf count of each instance
isn't zero.

Fixes: 365e4ba ("media: mtk-vcodec: Add work queue for core hardware decode")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
yunfei-mtk authored and gregkh committed May 11, 2023
1 parent 8f81185 commit e1192a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static void vdec_msg_queue_core_work(struct work_struct *work)
mtk_vcodec_dec_disable_hardware(ctx, MTK_VDEC_CORE);
vdec_msg_queue_qbuf(&ctx->msg_queue.lat_ctx, lat_buf);

if (!list_empty(&dev->msg_queue_core_ctx.ready_queue)) {
if (atomic_read(&lat_buf->ctx->msg_queue.core_list_cnt)) {
mtk_v4l2_debug(3, "re-schedule to decode for core: %d",
dev->msg_queue_core_ctx.ready_num);
queue_work(dev->core_workqueue, &msg_queue->core_work);
Expand Down

0 comments on commit e1192a0

Please sign in to comment.