[PATCH 0/4] Centralize format information

2016-06-07 Thread Laurent Pinchart
Hi Daniel,

On Tuesday 07 Jun 2016 15:27:09 Daniel Vetter wrote:
> On Tue, Jun 07, 2016 at 02:33:10AM +0300, Laurent Pinchart wrote:
> > Hello,
> > 
> > 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.
> > 
> > This patch series addresses this issue by centralizing all format
> > information in a single data structure (1/4). It reimplements the
> > existing format helper functions based on that structure (3/4) and
> > converts the DRM core code to use the new structure (4/4). Two unused
> > format helper functions are removed in the process (2/4).
> > 
> > The new API is also useful for drivers. I will shortly post a patch series
> > for the omapdrm driver that makes use of it.
> 
> I'm still meh on this, but you could convince me if you'd extract all the
> format related stuff into drm_fourcc.c. drm_crtc is a mess, and the abi
> docs are confusing since everything is in one bag. Splitting parts out
> would be awesome.

I think we're on the same page, I had the exact same thought today. I'll work 
on that.

> Other stuff I think we could split out is all the framebuffer handling,
> basic property stuff, specialized properties (for zorder, blending,
> whatever) and maybe even a few more sub-topics. But let's start somewhere.

Deal, I'll start here :-)

-- 
Regards,

Laurent Pinchart



[PATCH 0/4] Centralize format information

2016-06-07 Thread Daniel Vetter
On Tue, Jun 07, 2016 at 02:33:10AM +0300, Laurent Pinchart wrote:
> Hello,
> 
> 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.
> 
> This patch series addresses this issue by centralizing all format information
> in a single data structure (1/4). It reimplements the existing format helper
> functions based on that structure (3/4) and converts the DRM core code to use
> the new structure (4/4). Two unused format helper functions are removed in the
> process (2/4).
> 
> The new API is also useful for drivers. I will shortly post a patch series for
> the omapdrm driver that makes use of it.

I'm still meh on this, but you could convince me if you'd extract all the
format related stuff into drm_fourcc.c. drm_crtc is a mess, and the abi
docs are confusing since everything is in one bag. Splitting parts out
would be awesome. Other stuff I think we could split out is all the
framebuffer handling, basic property stuff, specialized properties (for
zorder, blending, whatever) and maybe even a few more sub-topics. But
let's start somewhere.
-Daniel

> 
> Laurent Pinchart (4):
>   drm: Centralize format information
>   drm: Remove unused drm_format_plane_(width|height) helpers
>   drm: Implement the drm_format_*() helpers as drm_format_info()
> wrappers
>   drm: Use drm_format_info() in DRM core code
> 
>  drivers/gpu/drm/drm_crtc.c  | 391 
> +++-
>  drivers/gpu/drm/drm_fb_cma_helper.c |  23 ++-
>  include/drm/drm_crtc.h  |  23 ++-
>  3 files changed, 153 insertions(+), 284 deletions(-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


[PATCH 0/4] Centralize format information

2016-06-07 Thread Laurent Pinchart
Hello,

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.

This patch series addresses this issue by centralizing all format information
in a single data structure (1/4). It reimplements the existing format helper
functions based on that structure (3/4) and converts the DRM core code to use
the new structure (4/4). Two unused format helper functions are removed in the
process (2/4).

The new API is also useful for drivers. I will shortly post a patch series for
the omapdrm driver that makes use of it.

Laurent Pinchart (4):
  drm: Centralize format information
  drm: Remove unused drm_format_plane_(width|height) helpers
  drm: Implement the drm_format_*() helpers as drm_format_info()
wrappers
  drm: Use drm_format_info() in DRM core code

 drivers/gpu/drm/drm_crtc.c  | 391 +++-
 drivers/gpu/drm/drm_fb_cma_helper.c |  23 ++-
 include/drm/drm_crtc.h  |  23 ++-
 3 files changed, 153 insertions(+), 284 deletions(-)

-- 
Regards,

Laurent Pinchart