Re: [libcamera-devel] [PATCH v2] drm/fourcc: Add bayer formats and modifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Emil,

On Thu, May 28, 2020 at 04:36:59PM +0100, Emil Velikov wrote:
> On Fri, 22 May 2020 at 07:56, Niklas Söderlund wrote:
> >
> > Bayer formats are used with cameras and contain green, red and blue
> > components, with alternating lines of red and green, and blue and green
> > pixels in different orders. For each block of 2x2 pixels there is one
> > pixel with a red filter, two with a green filter, and one with a blue
> > filter. The filters can be arranged in different patterns.
> >
> > Add DRM fourcc formats to describe the most common Bayer formats. Also
> > add a modifiers to describe the custom packing layouts used by the Intel
> > IPU3 and in the MIPI (Mobile Industry Processor Interface) CSI-2
> > specification.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
> > ---
> > * Changes since v1
> > - Rename the defines from DRM_FORMAT_SRGGB8 to DRM_FORMAT_BAYER_RGGB8.
> > - Update the fourcc codes passed to fourcc_code() to avoid a conflict.
> > - Add diagrams for all Bayer formats memory layout.
> > - Update documentation.
> > ---
> >  include/uapi/drm/drm_fourcc.h | 205 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 205 insertions(+)
>
> Where is the user for these new formats - be that kernel or userspace?
> Did you forget to update the __drm_format_info() in
> drivers/gpu/drm/drm_fourcc.c?

The userspace user is here: https://git.linuxtv.org/libcamera.git/tree/

The formats are not used in the DRM subsystem, so I don't think there's
a need to update __drm_format_info().

libcamera is standardizing on using DRM 4CCs to ease interoperability
with display. We thus need to be able to express camera-specific formats
with DRM 4CCs, even if they're not used on the display side. The
alternative would be to have custom 4CCs for those formats, but we would
then end up risking a 4CC namespace clash.

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux