* [V5] media: mtk-jpeg: Fixes jpeghw multi-core judgement
@ 2023-01-31 5:57 Irui Wang
0 siblings, 0 replies; only message in thread
From: Irui Wang @ 2023-01-31 5:57 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab, Matthias Brugger,
angelogioacchino.delregno, nicolas.dufresne, kyrie wu
Cc: Project_Global_Chrome_Upstream_Group, linux-media, linux-kernel,
linux-arm-kernel, linux-mediatek, Tomasz Figa, xia.jiang,
maoguang.meng, Irui Wang
From: kyrie wu <kyrie.wu@mediatek.com>
some chips have multi-hw, but others have only one,
modify the condition of multi-hw judgement
Fixes: 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware")
Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 4 +++-
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
index 79a8f1b1965c..857afaa24cab 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
@@ -1694,7 +1694,7 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
return -EINVAL;
}
- if (list_empty(&pdev->dev.devres_head)) {
+ if (!jpeg->variant->multi_core) {
INIT_DELAYED_WORK(&jpeg->job_timeout_work,
mtk_jpeg_job_timeout_work);
@@ -1888,6 +1888,7 @@ static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
.ioctl_ops = &mtk_jpeg_enc_ioctl_ops,
.out_q_default_fourcc = V4L2_PIX_FMT_YUYV,
.cap_q_default_fourcc = V4L2_PIX_FMT_JPEG,
+ .multi_core = true,
};
static const struct mtk_jpeg_variant mtk8195_jpegdec_drvdata = {
@@ -1899,6 +1900,7 @@ static const struct mtk_jpeg_variant mtk8195_jpegdec_drvdata = {
.ioctl_ops = &mtk_jpeg_dec_ioctl_ops,
.out_q_default_fourcc = V4L2_PIX_FMT_JPEG,
.cap_q_default_fourcc = V4L2_PIX_FMT_YUV420M,
+ .multi_core = true,
};
#if defined(CONFIG_OF)
diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h
index b9126476be8f..20517f7a5405 100644
--- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h
+++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h
@@ -60,6 +60,7 @@ enum mtk_jpeg_ctx_state {
* @ioctl_ops: the callback of jpeg v4l2_ioctl_ops
* @out_q_default_fourcc: output queue default fourcc
* @cap_q_default_fourcc: capture queue default fourcc
+ * @multi_core: mark jpeg hw is multi_core or not
*/
struct mtk_jpeg_variant {
struct clk_bulk_data *clks;
@@ -74,6 +75,7 @@ struct mtk_jpeg_variant {
const struct v4l2_ioctl_ops *ioctl_ops;
u32 out_q_default_fourcc;
u32 cap_q_default_fourcc;
+ bool multi_core;
};
struct mtk_jpeg_src_buf {
--
2.18.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-31 5:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 5:57 [V5] media: mtk-jpeg: Fixes jpeghw multi-core judgement Irui Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).