Re: [PATCH v4.1 01/14] drm: Centralize format information

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

 



Hi Daniel,

Thanks for the review.

On Wednesday 21 Sep 2016 09:23:14 Daniel Vetter wrote:
> On Sun, Sep 18, 2016 at 01:17:27PM +0300, Laurent Pinchart wrote:
> > Various pieces of information about DRM formats (number of planes, color
> > depth, chroma subsampling, ...) are scattered across different helper
> > functions in the DRM core. Callers of those functions often need to
> > access more than a single parameter of the format, leading to
> > inefficiencies due to multiple lookups.
> > 
> > Centralize all format information in a data structure and create a
> > function to look up information based on the format 4CC.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> > ---
> > Changes since v4:
> > 
> > - Fixed depth value of DRM_FORMAT_[AXRGB]{4}4444 formats to match
> >   current code
> > - Documented the depth field as legacy
> > ---
> > 
> >  Documentation/gpu/drm-kms.rst |  3 ++
> >  drivers/gpu/drm/drm_fourcc.c  | 84 ++++++++++++++++++++++++++++++++++++++
> >  include/drm/drm_fourcc.h      | 21 +++++++++++
> >  3 files changed, 108 insertions(+)
> > 
> > diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
> > index f9a991bb87d4..85c4c49f4436 100644
> > --- a/Documentation/gpu/drm-kms.rst
> > +++ b/Documentation/gpu/drm-kms.rst
> > @@ -63,6 +63,9 @@ Frame Buffer Functions Reference
> >  DRM Format Handling
> >  ===================
> > 
> > +.. kernel-doc:: include/drm/drm_fourcc.h
> > +   :internal:
> > +
> >  .. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
> >     :export:
> >  

Given this...

[snip]

> > diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
> > index 30c30fa87ee8..135fef050ee6 100644
> > --- a/include/drm/drm_fourcc.h
> > +++ b/include/drm/drm_fourcc.h
> > @@ -25,6 +25,27 @@
> > 
> >  #include <linux/types.h>
> >  #include <uapi/drm/drm_fourcc.h>
> > 
> > +/**
> > + * struct drm_format_info - information about a DRM format
> > + * @format: 4CC format identifier (DRM_FORMAT_*)
> > + * @depth: Color depth (number of bits per pixel excluding padding bits),
> > + *	valid for a subset of RGB formats only. This is a legacy field, do not
> > + *	use in new code and set to 0 for new formats.
> > + * @num_planes: Number of color planes (1 to 3)
> > + * @cpp: Number of bytes per pixel (per plane)
> > + * @hsub: Horizontal chroma subsampling factor
> > + * @vsub: Vertical chroma subsampling factor
> > + */
> 
> Atm we don't include the drm_fourcc.h header in
> Documentation/gpu/drm-kms.rst, which means we're missing this new
> kerneldoc.

... How do you mean exactly ? :-)

> With that fixed:
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

-- 
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