[libcamera-devel] [PATCH 1/3] include: linux: Add V4L2_CID_NOTIFY_GAINS control

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Dec 30 17:13:10 CET 2021


Hi David,

On Thu, Dec 30, 2021 at 10:52:54AM +0000, David Plowman wrote:
> Hi Laurent
> 
> Sure, I can do that. Could you perhaps give me a few more hints, I
> didn't really understand how looking at commits in include/linux was
> helping me. Anyway, here's what I've done:
> 
> 1. I've cloned the whole of linuxtv-master onto my Pi.
> 2. I've run "utils/update-kernel-headers.sh <path-to-my-linuxtv-master>
> 3. There were some warnings about intel-ipu3.h being missing, I assume
> I can ignore that.
> 4. Now I have about 7 files in include/linux that show up as
> "modified", and one (intel-ipu3.h) is "deleted".

The path to intel-ipu3.h has changed in v5.14. I've just sent a patch to
update the update-kernel-headers.sh script accordingly, and have CC'ed
you.

> I'm guessing I shouldn't try and commit them all, so should I commit
> just the one file that I care about (v4l2-controls.h)? But I can't
> commit the whole v4l2-controls.h either, not least because it doesn't
> compile (V4L2_CID_USER_BCM2835_ISP_BASE has disappeared), and it has
> lots of other changes too. So maybe I just pick the single line that I
> want? (only now it doesn't seem any different to what I did). So I've
> rather managed to confuse myself!

Committing everything will indeed not work, as we carry local
modifications for a few uAPI extensions that are not upstream yet. This
includes

- In include/linux/drm_fourcc.h, the MJPEG and Bayer formats, the
  DRM_FORMAT_MOD_VENDOR_MIPI modifier vendor prefix, the
  IPU3_FORMAT_MOD_PACKED modifier and the MIPI_FORMAT_MOD_CSI2_PACKED
  modifier.

- In include/linux/v4l2-controls.h, V4L2_CID_USER_BCM2835_ISP_BASE.

- In include/linux/videodev2.h, V4L2_META_FMT_SENSOR_DATA and
  V4L2_META_FMT_BCM2835_ISP_STATS.

Those should be kept. All other modifications should be committed.

By the way, we could simplify the kernel headers update process by
moving the definitions of V4L2_CID_USER_BCM2835_ISP_BASE,
V4L2_META_FMT_SENSOR_DATA and V4L2_META_FMT_BCM2835_ISP_STATS to the
Raspberry Pi pipeline handler and/or IPA as appropriate, until those get
merged upstream.

> Thanks for your help!
> 
> On Fri, 24 Dec 2021 at 03:18, Laurent Pinchart wrote:
> >
> > Hi David,
> >
> > Thank you for the patch.
> >
> > On Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:
> > > Add this control which is already present upstream.
> >
> > We have a process to update the kernel headers. If possible, please use
> > utils/update-kernel-headers.sh. You will need to then pick changes
> > manually to avoid dropping the currently not upstream features. The git
> > log for the include/linux/ directory can show you examples.
> >
> > > Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> > > ---
> > >  include/linux/v4l2-controls.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
> > > index 59a57418..9db06cb2 100644
> > > --- a/include/linux/v4l2-controls.h
> > > +++ b/include/linux/v4l2-controls.h
> > > @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {
> > >  #define V4L2_CID_TEST_PATTERN_BLUE           (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
> > >  #define V4L2_CID_TEST_PATTERN_GREENB         (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
> > >  #define V4L2_CID_UNIT_CELL_SIZE                      (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
> > > +#define V4L2_CID_NOTIFY_GAINS                        (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)
> > >
> > >
> > >  /* Image processing controls */

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list