Re: [PATCH v6 12/14] media: mtk-vcodec: vdec: add media device if using stateless api

From: Tzung-Bi Shih
Date: Thu Aug 05 2021 - 07:52:10 EST


On Tue, Jul 20, 2021 at 12:22 AM Dafna Hirschfeld
<dafna.hirschfeld@xxxxxxxxxxxxx> wrote:
> On 05.07.21 07:32, Alexandre Courbot wrote:
> > + mtk_v4l2_debug(0, "media registered as /dev/media%d", vfd_dec->num);
> the media's node minor is not vfd_dec->num
IIUC, it should be vfd_dec->minor[1]. Will fix in the next version.

[1]: https://elixir.bootlin.com/linux/v5.14-rc4/source/include/media/v4l2-dev.h#L243

> > struct mtk_vcodec_dev {
> This structs has a lot of duplicated fields for enc/dec
> Since the device represents either a decoder or an encoder,
> I think all those dupliactes can be removed, so for example
> instead of having both 'dec_irq' and 'enc_irq' we can have just 'irq'
I understand the struct may contain duplicate fields. However I
prefer to separate the refactor into another series. Would provide
the fixes later.