All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/15] Centralize format information
@ 2016-06-08 23:32 Laurent Pinchart
  2016-06-08 23:32 ` [PATCH v3 01/15] drm: Move format-related helpers to drm_fourcc.c Laurent Pinchart
                   ` (14 more replies)
  0 siblings, 15 replies; 49+ messages in thread
From: Laurent Pinchart @ 2016-06-08 23:32 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Tomi Valkeinen

Hello,

(Repost with the drivers maintainers CC'ed, sorry about the noise)

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 (02/15). It reimplements the existing format helper
functions based on that structure (03/15) and converts the DRM core code to
use the new structure (04/15). The DRM core now WARNs when a driver tries to
query information about an unsupported format (05/15).

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 (06/15 to 14/15) and finally merges the
function into its only caller in the DRM core (15/15).

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 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 (15):
  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
  drm: msm: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
  drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
  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: Don't export the drm_fb_get_bpp_depth() function

 Documentation/DocBook/gpu.tmpl           |   5 +
 drivers/gpu/drm/Makefile                 |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c   |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c  |   3 +-
 drivers/gpu/drm/arm/hdlcd_crtc.c         |   5 +-
 drivers/gpu/drm/cirrus/cirrus_fbdev.c    |   6 +-
 drivers/gpu/drm/cirrus/cirrus_main.c     |   4 +-
 drivers/gpu/drm/drm_crtc.c               | 389 +------------------------------
 drivers/gpu/drm/drm_crtc_helper.c        |  14 +-
 drivers/gpu/drm/drm_fb_cma_helper.c      |  23 +-
 drivers/gpu/drm/drm_fourcc.c             | 280 ++++++++++++++++++++++
 drivers/gpu/drm/gma500/framebuffer.c     |  20 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c |   6 +-
 drivers/gpu/drm/radeon/radeon_fb.c       |  14 +-
 drivers/gpu/drm/radeon/radeon_gem.c      |   3 +-
 drivers/gpu/drm/sti/sti_gdp.c            |   6 +-
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c     |  23 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c      |  12 +-
 include/drm/drmP.h                       |   1 +
 include/drm/drm_crtc.h                   |   9 -
 include/drm/drm_fourcc.h                 |  56 +++++
 21 files changed, 437 insertions(+), 454 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-09-08 14:44 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 23:32 [PATCH v3 00/15] Centralize format information Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 01/15] drm: Move format-related helpers to drm_fourcc.c Laurent Pinchart
2016-06-09  8:36   ` Daniel Vetter
2016-06-09  9:54     ` [PATCH v3.1 " Laurent Pinchart
2016-06-09 10:03       ` Daniel Vetter
2016-06-08 23:32 ` [PATCH v3 02/15] drm: Centralize format information Laurent Pinchart
2016-06-09  8:52   ` Daniel Vetter
2016-06-09 12:23     ` Ville Syrjälä
2016-06-09 12:40       ` Daniel Vetter
2016-06-09 13:05         ` Ville Syrjälä
2016-06-09 13:29           ` Daniel Vetter
2016-06-09 14:13             ` Ville Syrjälä
2016-09-08 13:49               ` Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 03/15] drm: Implement the drm_format_*() helpers as drm_format_info() wrappers Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 04/15] drm: Use drm_format_info() in DRM core code Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 05/15] drm: WARN when calling drm_format_info() for an unsupported format Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 06/15] drm: msm: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 07/15] drm: sti: " Laurent Pinchart
2016-06-09  7:52   ` Vincent ABRIOU
2016-06-09  9:17     ` Laurent Pinchart
2016-06-09 12:10       ` Vincent ABRIOU
2016-06-08 23:32 ` [PATCH v3 08/15] drm: hdlcd: " Laurent Pinchart
2016-06-09  9:01   ` Liviu Dudau
2016-07-25 11:10     ` Liviu Dudau
2016-09-08 14:45       ` Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 09/15] drm: tilcdc: " Laurent Pinchart
2016-06-10 11:51   ` Tomi Valkeinen
2016-06-10 12:05     ` Ville Syrjälä
2016-06-10 12:08       ` Tomi Valkeinen
2016-06-10 12:23         ` Ville Syrjälä
2016-06-10 12:26           ` Tomi Valkeinen
2016-06-10 12:29             ` Ville Syrjälä
2016-06-10 12:48               ` Tomi Valkeinen
2016-06-10 13:08                 ` Tomi Valkeinen
2016-06-10 13:16                   ` Jyri Sarha
2016-06-10 13:25                     ` Ville Syrjälä
2016-06-10 14:21                       ` Daniel Vetter
2016-06-10 12:07     ` Laurent Pinchart
2016-06-10 12:08     ` [PATCH v3.1 " Laurent Pinchart
2016-06-10 12:21       ` Tomi Valkeinen
2016-06-08 23:32 ` [PATCH v3 10/15] drm: cirrus: " Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 11/15] drm: gma500: Replace drm_fb_get_bpp_depth() with drm_format_info() Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 12/15] drm: amdgpu: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp() Laurent Pinchart
2016-06-09  1:42   ` Michel Dänzer
2016-06-09  9:18     ` Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 13/15] drm: radeon: " Laurent Pinchart
2016-06-08 23:32 ` [PATCH v3 14/15] drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info() Laurent Pinchart
2016-06-27 17:51   ` Sinclair Yeh
2016-06-08 23:32 ` [PATCH v3 15/15] drm: Don't export the drm_fb_get_bpp_depth() function 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.