All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/13] Centralize format information
@ 2016-10-17 22:41 Laurent Pinchart
  2016-10-17 22:41 ` [PATCH v5 01/13] drm: " Laurent Pinchart
                   ` (14 more replies)
  0 siblings, 15 replies; 21+ messages in thread
From: Laurent Pinchart @ 2016-10-17 22:41 UTC (permalink / raw)
  To: dri-devel; +Cc: Tomi Valkeinen

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.

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

-- 
Regards,

Laurent Pinchart

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2016-10-18 15:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 22:41 [PATCH v5 00/13] Centralize format information Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 01/13] drm: " Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 02/13] drm: Implement the drm_format_*() helpers as drm_format_info() wrappers Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 03/13] drm: Use drm_format_info() in DRM core code Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 04/13] drm: WARN when calling drm_format_info() for an unsupported format Laurent Pinchart
2016-10-18 15:14   ` Eric Engestrom
2016-10-17 22:41 ` [PATCH v5 05/13] drm: hdlcd: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 06/13] drm: tilcdc: " Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 07/13] drm: cirrus: " Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 08/13] drm: gma500: Replace drm_fb_get_bpp_depth() with drm_format_info() Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 09/13] drm: amdgpu: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 10/13] drm: radeon: " Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 11/13] drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info() Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 12/13] drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() Laurent Pinchart
2016-10-17 22:41 ` [PATCH v5 13/13] drm: Don't export the drm_fb_get_bpp_depth() function Laurent Pinchart
2016-10-18 15:14   ` Eric Engestrom
2016-10-18 10:33 ` [PATCH v5 00/13] Centralize format information Archit Taneja
2016-10-18 11:43 ` Ville Syrjälä
2016-10-18 12:33   ` Laurent Pinchart
2016-10-18 12:45     ` Ville Syrjälä
2016-10-18 12:49       ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.