]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: mediatek: vcodec: Fix non subdev architecture open power fail
authorYunfei Dong <yunfei.dong@mediatek.com>
Fri, 17 Jun 2022 07:25:21 +0000 (08:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:40:54 +0000 (14:40 +0200)
[ Upstream commit 083f54a7c9c66496b9d9f3c50dfdca24e6aa7012 ]

According to subdev_bitmap bit value to open hardware power, need to
set subdev_bitmap value for non subdev architecture.

Fixes: c05bada35f01 ("media: mtk-vcodec: Add to support multi hardware decode")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
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>
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c

index bd1ee9901da0bd20488b0265ce157a4edaddefb1..d5c94845ea4281cbaa4c63a5a520dca8b2c5a73e 100644 (file)
@@ -393,6 +393,8 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
                        mtk_v4l2_err("Main device of_platform_populate failed.");
                        goto err_reg_cont;
                }
+       } else {
+               set_bit(MTK_VDEC_CORE, dev->subdev_bitmap);
        }
 
        ret = video_register_device(vfd_dec, VFL_TYPE_VIDEO, -1);