]> git.baikalelectronics.ru Git - kernel.git/commit
media: mediatek: vcodec: Make encoder capability fields fit requirements
authorChen-Yu Tsai <wenst@chromium.org>
Fri, 8 Jul 2022 10:44:51 +0000 (11:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 15 Jul 2022 13:58:42 +0000 (14:58 +0100)
commitd8a754aea3841e45f756d16e1289c13bb7c4d83e
tree8706dd3bde64345b2fb85491afc0a76414038d18
parent6cf0f0dc953d830dc36b2116e0f2710bb33c7027
media: mediatek: vcodec: Make encoder capability fields fit requirements

This partially reverts commit f4ac1d5408833d647b9898a202e42532c9bfa887,
and changes things so that the capability string fields of the encoder
conform to their requirements.

The driver name field should contain the actual driver name, not some
otherwise unused string macro from the driver. To make this clear,
copy the name from the driver's name field.

The card name for the video encoder previously held a static platform
name that was fixed to match MT8173. This obviously doesn't make sense
for newer chips. Since commit f4ac1d540883 ("media: mediatek: vcodec:
Change encoder v4l2 capability value"), this field was changed to hold
the driver's name, or "mtk-vcodec-dec". This doesn't make much sense
either, since this still doesn't reflect what chip this is.

Instead, fill in the card name with "MTxxxx video encoder" with the
proper chip number.

Since commit 16c7f47c8bfd ("media: v4l: ioctl: Set bus_info in
v4l_querycap()"), the V4L2 core provides a default value for the
bus_info field for platform and PCI devices. This value will match
the default value for media devices added by commit e4a416e561a1
("media: mc: Set bus_info in media_device_init()"). These defaults
are stable and device-specific.

Drop the custom capability bus_info from the mtk-vcodec encoder
driver, and use the defaults.

As this patch removes the last usage of MTK_VCODEC_DRV_NAME, remove
the macro as well.

Fixes: f4ac1d540883 ("media: mediatek: vcodec: Change encoder v4l2 capability value")
Signed-off-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>
drivers/media/platform/mediatek/vcodec/mtk_vcodec_drv.h
drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c