2020-03-23 21:11:08

by Ezequiel Garcia

[permalink] [raw]
Subject: [PATCH 0/2] media: Clean up stateless codec configuration

This is another attempt at cleaning up the media
configuration for certain devices, targetting
stateless codecs for now.

The previous attempt was taking the bull by the horns,
removing all the existing "support" configurations
such as "Cameras/video grabbers support", "Analog TV support",
and the like:

https://patchwork.linuxtv.org/patch/62423/

This raised some concerns, but also some supporters, feel free
to jump on that discussion!

This series gives a different approach to reach the goal
mentioned by Tomasz: enabling specific hardware.

Patch 1 allows us to select the media controller API, without
requiring a "support" option. In other words, it stops hiding
the media controller API behing the "support" options.

Patch 2 enables VIDEO_DEV (video4linux core) when MEDIA_SUPPORT
is selected.

With this, we can now enable specific hardware such as stateless
codecs such as Hantro, Cedrus, as well as RKISP1.

Ezequiel Garcia (2):
media: Allow to enable the media controller API unconditionally
media: Remove VIDEO_DEV unneeded dependency

drivers/media/Kconfig | 2 --
drivers/media/mc/Kconfig | 1 -
2 files changed, 3 deletions(-)

--
2.26.0.rc2


2020-03-23 21:11:23

by Ezequiel Garcia

[permalink] [raw]
Subject: [PATCH 1/2] media: Allow to enable the media controller API unconditionally

In order to enable stateless codec drivers, such as cedrus
and hantro, the media controller API needs to be visible.

Remove the dependency on the support intermediate
configuration in order to allow this.

Signed-off-by: Ezequiel Garcia <[email protected]>
---
drivers/media/mc/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/media/mc/Kconfig b/drivers/media/mc/Kconfig
index 3b9795cfcb36..9382e35211ca 100644
--- a/drivers/media/mc/Kconfig
+++ b/drivers/media/mc/Kconfig
@@ -5,7 +5,6 @@

config MEDIA_CONTROLLER
bool "Media Controller API"
- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT
help
Enable the media controller API used to query media devices internal
topology and configure it dynamically.
--
2.26.0.rc2

2020-03-23 21:11:54

by Ezequiel Garcia

[permalink] [raw]
Subject: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

Enable VIDEO_DEV (which compiles Video4Linux core)
when MEDIA_SUPPORT is selected. This is needed, in order
to be able to enable devices such as stateless codecs.

Signed-off-by: Ezequiel Garcia <[email protected]>
---
drivers/media/Kconfig | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index b36a41332867..7de472ad07a2 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"

#
# Video4Linux support
-# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
#

config VIDEO_DEV
tristate
depends on MEDIA_SUPPORT
- depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
default y

config VIDEO_V4L2_SUBDEV_API
--
2.26.0.rc2

2020-03-24 09:49:25

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

Em Mon, 23 Mar 2020 18:10:22 -0300
Ezequiel Garcia <[email protected]> escreveu:

> Enable VIDEO_DEV (which compiles Video4Linux core)
> when MEDIA_SUPPORT is selected. This is needed, in order
> to be able to enable devices such as stateless codecs.
>
> Signed-off-by: Ezequiel Garcia <[email protected]>
> ---
> drivers/media/Kconfig | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index b36a41332867..7de472ad07a2 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"
>
> #
> # Video4Linux support
> -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
> #
>
> config VIDEO_DEV
> tristate
> depends on MEDIA_SUPPORT
> - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
> default y
>
> config VIDEO_V4L2_SUBDEV_API

The rationale of the above is to exclude Digital TV and remote
controller.

Removing the above will make the V4L2 core available every time, even
if all the user wants is remote controller or Digital TV support.

I'm working on a patchset that should hopefully address the issues
you're concerning.

Thanks,
Mauro

2020-03-24 10:19:42

by Ezequiel Garcia

[permalink] [raw]
Subject: Re: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

On Tue, 2020-03-24 at 10:47 +0100, Mauro Carvalho Chehab wrote:
> Em Mon, 23 Mar 2020 18:10:22 -0300
> Ezequiel Garcia <[email protected]> escreveu:
>
> > Enable VIDEO_DEV (which compiles Video4Linux core)
> > when MEDIA_SUPPORT is selected. This is needed, in order
> > to be able to enable devices such as stateless codecs.
> >
> > Signed-off-by: Ezequiel Garcia <[email protected]>
> > ---
> > drivers/media/Kconfig | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > index b36a41332867..7de472ad07a2 100644
> > --- a/drivers/media/Kconfig
> > +++ b/drivers/media/Kconfig
> > @@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"
> >
> > #
> > # Video4Linux support
> > -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
> > #
> >
> > config VIDEO_DEV
> > tristate
> > depends on MEDIA_SUPPORT
> > - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
> > default y
> >
> > config VIDEO_V4L2_SUBDEV_API
>
> The rationale of the above is to exclude Digital TV and remote
> controller.
>
> Removing the above will make the V4L2 core available every time, even
> if all the user wants is remote controller or Digital TV support.
>

Hm, right.

> I'm working on a patchset that should hopefully address the issues
> you're concerning.
>

Thanks, I'll appreciate that.

Ezequiel


2020-03-24 10:43:07

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

Em Tue, 24 Mar 2020 07:18:49 -0300
Ezequiel Garcia <[email protected]> escreveu:

> On Tue, 2020-03-24 at 10:47 +0100, Mauro Carvalho Chehab wrote:
> > Em Mon, 23 Mar 2020 18:10:22 -0300
> > Ezequiel Garcia <[email protected]> escreveu:
> >
> > > Enable VIDEO_DEV (which compiles Video4Linux core)
> > > when MEDIA_SUPPORT is selected. This is needed, in order
> > > to be able to enable devices such as stateless codecs.
> > >
> > > Signed-off-by: Ezequiel Garcia <[email protected]>
> > > ---
> > > drivers/media/Kconfig | 2 --
> > > 1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > > index b36a41332867..7de472ad07a2 100644
> > > --- a/drivers/media/Kconfig
> > > +++ b/drivers/media/Kconfig
> > > @@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"
> > >
> > > #
> > > # Video4Linux support
> > > -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
> > > #
> > >
> > > config VIDEO_DEV
> > > tristate
> > > depends on MEDIA_SUPPORT
> > > - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
> > > default y
> > >
> > > config VIDEO_V4L2_SUBDEV_API
> >
> > The rationale of the above is to exclude Digital TV and remote
> > controller.
> >
> > Removing the above will make the V4L2 core available every time, even
> > if all the user wants is remote controller or Digital TV support.
> >
>
> Hm, right.
>
> > I'm working on a patchset that should hopefully address the issues
> > you're concerning.
> >
>
> Thanks, I'll appreciate that.

Sent. Btw, I sent another patch to be applied *after* the series.

It just occurred to me that the best way to make everyone happy is
to let the filtering option to be optional. That's what the newest
patch does ;-)

Thanks,
Mauro

2020-03-27 13:48:40

by Ezequiel Garcia

[permalink] [raw]
Subject: Re: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

Hi Mauro,

On Tue, 2020-03-24 at 07:18 -0300, Ezequiel Garcia wrote:
> On Tue, 2020-03-24 at 10:47 +0100, Mauro Carvalho Chehab wrote:
> > Em Mon, 23 Mar 2020 18:10:22 -0300
> > Ezequiel Garcia <[email protected]> escreveu:
> >
> > > Enable VIDEO_DEV (which compiles Video4Linux core)
> > > when MEDIA_SUPPORT is selected. This is needed, in order
> > > to be able to enable devices such as stateless codecs.
> > >
> > > Signed-off-by: Ezequiel Garcia <[email protected]>
> > > ---
> > > drivers/media/Kconfig | 2 --
> > > 1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > > index b36a41332867..7de472ad07a2 100644
> > > --- a/drivers/media/Kconfig
> > > +++ b/drivers/media/Kconfig
> > > @@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"
> > >
> > > #
> > > # Video4Linux support
> > > -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
> > > #
> > >
> > > config VIDEO_DEV
> > > tristate
> > > depends on MEDIA_SUPPORT
> > > - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
> > > default y
> > >
> > > config VIDEO_V4L2_SUBDEV_API
> >
> > The rationale of the above is to exclude Digital TV and remote
> > controller.
> >
> > Removing the above will make the V4L2 core available every time, even
> > if all the user wants is remote controller or Digital TV support.
> >
>
> Hm, right.
>
> > I'm working on a patchset that should hopefully address the issues
> > you're concerning.
> >
>
> Thanks, I'll appreciate that.
>

It seems the config rework you sent will undergo some
extended discussions, which is fine given it's a full rework.

I'd like to send a smaller (ideally just one or two patches)
series, so we can improve the situation on codecs on a smaller
timeframe.

Thanks!
Ezequiel

2020-03-27 14:12:23

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] media: Remove VIDEO_DEV unneeded dependency

Em Fri, 27 Mar 2020 10:47:44 -0300
Ezequiel Garcia <[email protected]> escreveu:

> Hi Mauro,
>
> On Tue, 2020-03-24 at 07:18 -0300, Ezequiel Garcia wrote:
> > On Tue, 2020-03-24 at 10:47 +0100, Mauro Carvalho Chehab wrote:
> > > Em Mon, 23 Mar 2020 18:10:22 -0300
> > > Ezequiel Garcia <[email protected]> escreveu:
> > >
> > > > Enable VIDEO_DEV (which compiles Video4Linux core)
> > > > when MEDIA_SUPPORT is selected. This is needed, in order
> > > > to be able to enable devices such as stateless codecs.
> > > >
> > > > Signed-off-by: Ezequiel Garcia <[email protected]>
> > > > ---
> > > > drivers/media/Kconfig | 2 --
> > > > 1 file changed, 2 deletions(-)
> > > >
> > > > diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> > > > index b36a41332867..7de472ad07a2 100644
> > > > --- a/drivers/media/Kconfig
> > > > +++ b/drivers/media/Kconfig
> > > > @@ -93,13 +93,11 @@ source "drivers/media/mc/Kconfig"
> > > >
> > > > #
> > > > # Video4Linux support
> > > > -# Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
> > > > #
> > > >
> > > > config VIDEO_DEV
> > > > tristate
> > > > depends on MEDIA_SUPPORT
> > > > - depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT || MEDIA_SDR_SUPPORT
> > > > default y
> > > >
> > > > config VIDEO_V4L2_SUBDEV_API
> > >
> > > The rationale of the above is to exclude Digital TV and remote
> > > controller.
> > >
> > > Removing the above will make the V4L2 core available every time, even
> > > if all the user wants is remote controller or Digital TV support.
> > >
> >
> > Hm, right.
> >
> > > I'm working on a patchset that should hopefully address the issues
> > > you're concerning.
> > >
> >
> > Thanks, I'll appreciate that.
> >
>
> It seems the config rework you sent will undergo some
> extended discussions, which is fine given it's a full rework.
>
> I'd like to send a smaller (ideally just one or two patches)
> series, so we can improve the situation on codecs on a smaller
> timeframe.

I won't be merging anything new until the end of the merge
window. So, we have around 20 days where no patches will
be merged at linux media (except by critical bug fixes,
merge conflicts, build breakages and similar stuff).

So, there are plenty of time to review such series.

Thanks,
Mauro