lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMO6nawKYdBH8gCN9ZETRRT4-6=xYjLY-3xGctoTxfp+USkfjQ@mail.gmail.com>
Date:   Fri, 7 Dec 2018 17:12:20 +0100
From:   Maxime Jourdan <mjourdan@...libre.com>
To:     Hans Verkuil <hverkuil@...all.nl>
Cc:     Tomasz Figa <tfiga@...omium.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: videodev2: add V4L2_FMT_FLAG_NO_SOURCE_CHANGE

Hi Hans, Tomasz,

Sorry I missed your messages last week..!
On Fri, Nov 30, 2018 at 8:35 AM Hans Verkuil <hverkuil@...all.nl> wrote:
>
> On 11/29/2018 08:35 PM, Tomasz Figa wrote:
> > On Thu, Nov 29, 2018 at 1:01 AM Hans Verkuil <hverkuil@...all.nl> wrote:
> >>
> >> On 10/04/2018 03:37 PM, Maxime Jourdan wrote:
> >>> When a v4l2 driver exposes V4L2_EVENT_SOURCE_CHANGE, some (usually
> >>> OUTPUT) formats may not be able to trigger this event.
> >>>
> >>> Add a enum_fmt format flag to tag those specific formats.
> >>
> >> I think I missed (or forgot) some discussion about this since I have no
> >> idea why this flag is needed. What's the use-case?
> >
> > As far as I remember, the hardware/firmware Maxime has been working
> > with can't handle resolution changes for some coded formats. Perhaps
> > we should explain that better in the commit message and documentation
> > of the flag, though. Maxime, could you refresh my memory with the
> > details?
>
> So basically it describes if a compressed format can handle resolution
> changes for the given hardware?
>

Yes, exactly

> If that's the case, then NO_SOURCE_CHANGE is not a good name as it
> describes the symptom, not the real reason.
>
> Perhaps _FIXED_RESOLUTION might be a better name.
>

Fair point, I will update it as such.

Next time, this patch will come in a series that uses the flag.

Cheers,
Maxime

> Regards,
>
>         Hans
>
> >
> > Best regards,
> > Tomasz
> >
> >>
> >> Regards,
> >>
> >>         Hans
> >>
> >>>
> >>> Signed-off-by: Maxime Jourdan <mjourdan@...libre.com>
> >>> ---
> >>>  Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 5 +++++
> >>>  include/uapi/linux/videodev2.h                   | 5 +++--
> >>>  2 files changed, 8 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> >>> index 019c513df217..e0040b36ac43 100644
> >>> --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> >>> +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
> >>> @@ -116,6 +116,11 @@ one until ``EINVAL`` is returned.
> >>>        - This format is not native to the device but emulated through
> >>>       software (usually libv4l2), where possible try to use a native
> >>>       format instead for better performance.
> >>> +    * - ``V4L2_FMT_FLAG_NO_SOURCE_CHANGE``
> >>> +      - 0x0004
> >>> +      - The event ``V4L2_EVENT_SOURCE_CHANGE`` is not supported
> >>> +     for this format.
> >>> +
> >>>
> >>>
> >>>  Return Value
> >>> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> >>> index 3a65951ca51e..a28acee1cb52 100644
> >>> --- a/include/uapi/linux/videodev2.h
> >>> +++ b/include/uapi/linux/videodev2.h
> >>> @@ -723,8 +723,9 @@ struct v4l2_fmtdesc {
> >>>       __u32               reserved[4];
> >>>  };
> >>>
> >>> -#define V4L2_FMT_FLAG_COMPRESSED 0x0001
> >>> -#define V4L2_FMT_FLAG_EMULATED   0x0002
> >>> +#define V4L2_FMT_FLAG_COMPRESSED     0x0001
> >>> +#define V4L2_FMT_FLAG_EMULATED               0x0002
> >>> +#define V4L2_FMT_FLAG_NO_SOURCE_CHANGE       0x0004
> >>>
> >>>       /* Frame Size and frame rate enumeration */
> >>>  /*
> >>>
> >>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ