History log of /linux-master/drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c
Revision Date Author Comments
# 7c7e33b7 14-Jul-2023 Rob Herring <robh@kernel.org>

media: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 20de9fda 01-Jun-2023 Arnd Bergmann <arnd@arndb.de>

media: mtk_jpeg_core: avoid unused-variable warning

The mtk8195_jpegenc_drvdata object was added outside of an #ifdef causing
a harmless build warning.

drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c:1879:32: error: 'mtk8195_jpegenc_drvdata' defined but not used [-Werror=unused-variable]
1879 | static struct mtk_jpeg_variant mtk8195_jpegenc_drvdata = {
| ^~~~~~~~~~~~~~~~~~~~~~~

A follow-up patch moved it inside of an #ifdef, which caused more
warnings, and a third patch ended up adding even more #ifdefs. These
were all bogus, since the actual problem here is the incorrect use
of of_ptr(). Since the driver (like any other modern platform driver)
only works in combination with CONFIG_OF, there is no point in hiding
the reference, so just remove that along with all the pointless #ifdef
checks in the driver.

This improves build coverage and avoids running into the same problem
again when another part of the driver gets changed that relies on
the #ifdef blocks to be completely matched.

Fixes: 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware")
Fixes: 4ae47770d57b ("media: mtk-jpegenc: Fix a compilation issue")
Fixes: da4ede4b7fd6 ("media: mtk-jpeg: move data/code inside CONFIG_OF blocks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 0a2f03bb 09-Mar-2023 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpeg: refactor hw dev initializaiton

Add a atomic_t variable for initialization of hw dev.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 09aea13e 09-Mar-2023 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpeg: refactor some variables

Refactor some variables to reduce redundancy
and optimize the initialization process.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 6a7a883f 09-Mar-2023 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpeg: Remove some unnecessary variables

remove is_jpgenc_multihw, is_jpgdec_multihw,
and unnecessary initialization.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# ba7c0d34 10-Nov-2022 Yang Yingliang <yangyingliang@huawei.com>

media: mtk-jpegdec: add missing destroy_workqueue()

destroy_workqueue() needs be called to when driver is
unloading, fix it by using devm_add_action_or_reset()
to make workqueuedevice-managed.

Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>


# 9b358183 10-Nov-2022 Yang Yingliang <yangyingliang@huawei.com>

media: mtk-jpegdec: add missing destroy_workqueue()

destroy_workqueue() needs be called to when driver is
unloading, fix it by using devm_add_action_or_reset()
to make workqueuedevice-managed.

Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 52f68114 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: refactor jpegdec func interface

refactor the func interface of mtk_jpeg_dec_set_config
for decode

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 79152824 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: add output pic reorder interface

add output reorder func to reorder the output images
to ensure the output pic is consistent with the input images.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# dedc2150 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: add jpeg decode worker interface

Add jpeg decoding worker to ensure that three HWs
run in parallel in MT8195.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# e5f969dd 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: add jpegdec timeout func interface

Generalizes jpegdec timeout func interfaces to handle HW timeout.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 0fa49df4 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: support jpegdec multi-hardware

support jpegdec multi-hardware includes HW0/HW1/HW2.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 08d530a8 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

media: mtk-jpegdec: export jpeg decoder functions

mtk jpeg decoder is built as a module, export some functions to make them
visible by other modules.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 841a58de 29-Sep-2022 kyrie wu <kyrie.wu@mediatek.com>

mtk-jpegenc: add output pic reorder interface

There are two HWs in mt8195. Since the two HWs run
in parallel, it is necessary to reorder the output images
to ensure that the order is consistent with the input images.

Signed-off-by: kyrie wu <kyrie.wu@mediatek.com>
Signed-off-by: irui wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>


# 2023a998 14-Mar-2022 Mauro Carvalho Chehab <mchehab@kernel.org>

media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/

As the end goal is to have platform drivers split by vendor,
rename mediatek/mtk-jpeg/ to mediatek/jpeg/.

Requested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>