media: mediatek: vcodec: making sure queue_work successfully
authorYunfei Dong <yunfei.dong@mediatek.com>
Wed, 1 Feb 2023 07:33:15 +0000 (07:33 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 10 Apr 2023 13:14:54 +0000 (14:14 +0100)
commit2e0ef56d81cb2569624d288b7e95a8a2734a7c74
tree766375893407ad041dc993389ea2556234b39ee0
parentaf50b13dd3d7d5dbc1f08add1c462398e926a053
media: mediatek: vcodec: making sure queue_work successfully

Putting core work to work queue using queue_work maybe fail, call
queue_work again when the count of core work in work queue is less
than core_list_cnt, making sure all the buffer in core list can be
scheduled.

Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
drivers/media/platform/mediatek/vcodec/vdec_msg_queue.h