[PATCH v2 0/5] Add Mali DP non-compressed pixel formats

Alexandru Gheorghe alexandru-cosmin.gheorghe at arm.com
Tue Aug 21 18:29:59 UTC 2018


Change since v1 [1]:
  - Droped changes that add special handling of the tile formats
    X0L0/X0L2 in the driver and extend drm_core, by adding tile_h and
    tile_w in drm_format_info, suggested by Daniel Vetter here [2],
    see patches 2 to 4.
  - Use a differnt fourcc code for DRM_FORMAT_XVYU2101010, as
    suggested by Brian Starkey here [3].

Mali DP supports a bunch of pixel formats that don't have a fourcc
code defined in drm_fourcc.h, so this patchset adds the definition for
those formats and enables them in mali-dp driver.

The following new formats will be added:

Packed YCbCr444
* DRM_FORMAT_XYUV8888
* DRM_FORMAT_XVYU2101010

Two plane 10 bits format.
* DRM_FORMAT_P010

Packed YCbCr420 2x2 tiled formats
* DRM_FORMAT_Y0L0
* DRM_FORMAT_X0L0
* DRM_FORMAT_Y0L2
* DRM_FORMAT_X0L2
The difference between X0L0/X0L2 vs Y0L0/Y0L2 is that the later group
have two alpha bits per pixel.

This group is a bit special because we are dealing with a tiled format
where the first 64 bits in memory represent the pixels for a 2x2 tile,
so it needs a bit of special handling when it comes to:
 - pitch: needs to cover both rows that are in the same tile.
 - min allocation size: since a pitch cover both rows the formulas
   defined in drm_gem_fb_create don't work anymore.
 - handling of src_x and src_y offset: same as above since we are
   dealing with a tiled format drm_fb_cma_get_gem_obj doesn't return
   the correct address offset.

[1] https://lists.freedesktop.org/archives/dri-devel/2018-July/184597.html
[2] https://lists.freedesktop.org/archives/dri-devel/2018-August/186465.html
[3] https://lists.freedesktop.org/archives/dri-devel/2018-August/186057.html

Alexandru Gheorghe (5):
  drm/fourcc: Add new fourcc for malidp uncompressed formats
  drm/fourcc: Add tile width and height to drm_format_info
  drm/i915: Set tile sizes in drm_format_info
  drm: Add support for handling linear tile formats
  drm: mali-dp: Enable mali specific buffer formats

 drivers/gpu/drm/arm/malidp_hw.c              |   7 +-
 drivers/gpu/drm/drm_atomic.c                 |   8 +
 drivers/gpu/drm/drm_fb_cma_helper.c          |  11 +-
 drivers/gpu/drm/drm_fourcc.c                 | 397 +++++++++++++++----
 drivers/gpu/drm/drm_framebuffer.c            |  19 +-
 drivers/gpu/drm/drm_gem_framebuffer_helper.c |  10 +-
 drivers/gpu/drm/i915/intel_display.c         |  12 +-
 include/drm/drm_fourcc.h                     |   6 +
 include/uapi/drm/drm_fourcc.h                |  27 +-
 9 files changed, 415 insertions(+), 82 deletions(-)

-- 
2.18.0



More information about the dri-devel mailing list