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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4a58c2122096b0ea43614e0ad44dbb1d77584782.camel@collabora.com>
Date:   Mon, 22 Feb 2021 17:13:28 -0300
From:   Ezequiel Garcia <ezequiel@...labora.com>
To:     Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        John Cox <jc@...esim.co.uk>
Cc:     p.zabel@...gutronix.de, mchehab@...nel.org, robh+dt@...nel.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, gregkh@...uxfoundation.org,
        mripard@...nel.org, paul.kocialkowski@...tlin.com, wens@...e.org,
        jernej.skrabec@...l.net, peng.fan@....com,
        hverkuil-cisco@...all.nl, dan.carpenter@...cle.com,
        linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v2 4/9] media: uapi: Add a control for HANTRO driver

On Mon, 2021-02-22 at 17:28 +0100, Benjamin Gaignard wrote:
> 
> Le 22/02/2021 à 17:16, John Cox a écrit :
> > > The HEVC HANTRO driver needs to know the number of bits to skip at
> > > the beginning of the slice header.
> > > That is a hardware specific requirement so create a dedicated control
> > > that this purpose.
> > > 
> > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
> > > ---
> > > include/uapi/linux/hantro-v4l2-controls.h | 20 ++++++++++++++++++++
> > > include/uapi/linux/v4l2-controls.h        |  5 +++++
> > > 2 files changed, 25 insertions(+)
> > > create mode 100644 include/uapi/linux/hantro-v4l2-controls.h
> > > 
> > > diff --git a/include/uapi/linux/hantro-v4l2-controls.h b/include/uapi/linux/hantro-v4l2-controls.h
> > > new file mode 100644
> > > index 000000000000..30b1999b7af3
> > > --- /dev/null
> > > +++ b/include/uapi/linux/hantro-v4l2-controls.h
> > > @@ -0,0 +1,20 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> > > +
> > > +#ifndef __UAPI_HANTRO_V4L2_CONYTROLS_H__
> > > +#define __UAPI_HANTRO_V4L2_CONYTROLS_H__
> > > +
> > > +#include <linux/v4l2-controls.h>
> > > +#include <media/hevc-ctrls.h>
> > > +
> > > +#define V4L2_CID_HANTRO_HEVC_EXTRA_DECODE_PARAMS       (V4L2_CID_USER_HANTRO_BASE + 0)
> > > +
> > > +/**
> > > + * struct hantro_hevc_extra_decode_params - extra decode parameters for hantro driver
> > > + * @hevc_hdr_skip_lenght:      header first bits offset
> > > + */
> > > +struct hantro_hevc_extra_decode_params {
> > > +       __u32   hevc_hdr_skip_lenght;
> > > +       __u8    padding[4];
> > > +};
> > Can you clarify how hevc_hdr_skip_length differs from
> > v4l2_ctrl_hevc_slice_params.data_bit_offset?  At first sight they would
> > appear to be very similar.
> 
> hevc_hdr_skip_length is the difference between the start positions of 2 nals.
> v4l2_ctrl_hevc_slice_params.data_bit_offset is the offset of the data in the nal.
> 

I think the hardware is weird enough that we should have detailed
documentation to the exact expectation for this control, i.e. detailing
exactly what syntax elements userspace is expected to pass the distance.

Maybe documenting this somewhere in Documentation/.../media/something,
and then linking that in the kernel-doc comment for hantro_hevc_extra_decode_params.

Thanks,
Ezequiel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ