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 (2/5). It reimplements the existing format helper functions based on that structure (3/5) and converts the DRM core code to use the new structure (4/5). The new API is also useful for drivers as shown by the "[PATCH v2 00/20] OMAP DRM fixes and improvements" patch series posted yesterday. Changes since v1: - Move format-related helpers to drm_fourcc.c (1/5) - Use named initializers for the formats array (2/5) - WARN when calling drm_format_info() for an unsupported format (5/5) - Don't drop the drm_format_plane_width() and drm_format_plane_height() helpers Laurent Pinchart (5): drm: Move format-related helpers to drm_fourcc.c drm: Centralize format information drm: Implement the drm_format_*() helpers as drm_format_info() wrappers drm: Use drm_format_info() in DRM core code drm: WARN when calling drm_format_info() for an unsupported format Documentation/DocBook/gpu.tmpl | 5 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_crtc.c | 389 ++---------------------------------- drivers/gpu/drm/drm_fb_cma_helper.c | 23 ++- drivers/gpu/drm/drm_fourcc.c | 308 ++++++++++++++++++++++++++++ include/drm/drmP.h | 1 + include/drm/drm_crtc.h | 9 - include/drm/drm_fourcc.h | 59 ++++++ 8 files changed, 399 insertions(+), 397 deletions(-) create mode 100644 drivers/gpu/drm/drm_fourcc.c create mode 100644 include/drm/drm_fourcc.h -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel