]> git.itanic.dy.fi Git - linux-stable/commit
media: mediatek: vcodec: Read HW active status from syscon
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Fri, 30 Jun 2023 15:14:11 +0000 (11:14 -0400)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 25 Jul 2023 07:44:26 +0000 (09:44 +0200)
commitfe8a33978383d8c61157523ba1bb04900a32ba1d
treec00d74a930d37f23b47c85ed26d2b47bd275f635
parentc33262171252d355f9c962d603425d445a24ac4c
media: mediatek: vcodec: Read HW active status from syscon

Remove the requirement of a VDEC_SYS reg iospace for both MT8173 and
MT8183. To achieve that, rely on a vdecsys syscon to be passed through
the DT, and use it to directly read the VDEC_HW_ACTIVE bit during IRQ
handling to check whether the HW is active. Also update the VP8 stateful
decoder to use the syscon, if present, for writes to VDEC_SYS.

The old behavior is still present when reg-names aren't supplied, as
to keep backward compatibility.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: added vdecsys_regmap kerneldoc line provided by Nicolas]
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.c
drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
drivers/media/platform/mediatek/vcodec/vdec/vdec_vp8_if.c