Hi, On 10/18/2016 04:11 AM, 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 (01/13). It reimplements the existing format helper > functions based on that structure (02/13) and converts the DRM core code to > use the new structure (03/13). The DRM core now WARNs when a driver tries to > query information about an unsupported format (04/13). > > The second part of the patch series removes the drm_fb_get_bpp_depth() legacy > function that shouldn't be used directly by drivers. It modifies all its users > to use the appropriate API instead (05/13 to 12/13) and finally merges the > function into its only caller in the DRM core (13/13). > > The new API is also useful for drivers as shown by the "[PATCH v2 00/20] OMAP > DRM fixes and improvements" patch series previously posted. > > All patches have been acked, the series is ready to be merged for v4.10.
Queued all patches to drm-misc. Thanks, Archit > > Changes since v4: > > - Rebased on top of latest drm/master branch > - Collected acks > - Fixed depth value of DRM_FORMAT_[AXRGB]{4}4444 formats to match current code > - Added support for DRM_FORMAT_BGR565, DRM_FORMAT_XBGR8888 and > DRM_FORMAT_BGR888 to tilcdc > - Documented the depth field as legacy > > Changes since v3: > > - Rebased on top of latest drm/master branch > - Collected acks > - Dropped "drm: Move format-related helpers to drm_fourcc.c" and > "drm/msm: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()" that > have been merged already > - Added new "drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp()" patch > - Coding style fixes and variable renames > > Changes since v2: > > - Remove bpp field from drm_format_info structure > - Replace all users of drm_fb_get_bpp_depth() with the appropriate API > - Merge drm_fb_get_bpp_depth() into its only caller > > Changes since v1: > > - Move format-related helpers to drm_fourcc.c > - Use named initializers for the formats array > - WARN when calling drm_format_info() for an unsupported format > - Don't drop the drm_format_plane_width() and drm_format_plane_height() > helpers > > Laurent Pinchart (13): > 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 > drm: hdlcd: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() > drm: tilcdc: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp() > drm: cirrus: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp() > drm: gma500: Replace drm_fb_get_bpp_depth() with drm_format_info() > drm: amdgpu: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp() > drm: radeon: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp() > drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info() > drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with > drm_format_plane_cpp() > drm: Don't export the drm_fb_get_bpp_depth() function > > Documentation/gpu/drm-kms.rst | 3 + > drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 14 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 +- > drivers/gpu/drm/arm/hdlcd_crtc.c | 5 +- > drivers/gpu/drm/arm/malidp_hw.c | 7 +- > drivers/gpu/drm/cirrus/cirrus_fbdev.c | 6 +- > drivers/gpu/drm/cirrus/cirrus_main.c | 4 +- > drivers/gpu/drm/drm_fb_cma_helper.c | 23 +-- > drivers/gpu/drm/drm_fourcc.c | 281 > ++++++++++++++------------------ > drivers/gpu/drm/drm_framebuffer.c | 102 ++---------- > drivers/gpu/drm/drm_modeset_helper.c | 17 +- > drivers/gpu/drm/gma500/framebuffer.c | 20 +-- > drivers/gpu/drm/radeon/radeon_fb.c | 20 +-- > drivers/gpu/drm/radeon/radeon_gem.c | 3 +- > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 18 +- > drivers/gpu/drm/tilcdc/tilcdc_plane.c | 7 +- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 12 +- > include/drm/drm_fourcc.h | 23 ++- > 18 files changed, 244 insertions(+), 324 deletions(-) > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project