Skip to content

RFC Add support modifiers for drivers whose planes only support linear layout

Tomohito Esaki amd-gfx dri-devel lkml nouveau 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 RFC Latest3 patches 1 replyIn review
  2. v5 RFC3 patches 1 replySuperseded
  3. v4 RFC3 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v3 RFC3 patches14 repliesSuperseded
v2 RFC3 patches4 repliesSuperseded
v1 RFC3 patches4 repliesSuperseded

Changes in v6 from the cover letter

* add Reviewed-by and Acked-by
* add a changelog per-patch

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm: introduce fb_modifiers_not_supported flag in mode_configdrivers/gpu/drm/amd/amdgpu/amdgpu_display.c drivers/gpu/drm/amd/amdgpu/dce_v10_0.c drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +8 more+33 -90 replies
2/3drm: add support modifiers for drivers whose planes only support linear layoutdrivers/gpu/drm/drm_plane.c include/drm/drm_plane.h+16 -100 replies
3/3drm: remove allow_fb_modifiersdrivers/gpu/drm/selftests/test-drm_framebuffer.c include/drm/drm_mode_config.h+0 -170 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchHarry WentlandAndy ShevchenkoLaurent Pinchart
1/3A-b R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [RFC PATCH v6 0/3] Add support modifiers for drivers whose planes only support linear layout

Some drivers whose planes only support linear layout fb do not support format modifiers.
These drivers should support modifiers, however the DRM core should handle this rather than open-coding in every driver.

In this patch series, these drivers expose format modifiers based on the following suggestion[1].

Quoted 9 lines · Daniel Stone

I think the best way forward here is:
- add a new mode_config.cannot_support_modifiers flag, and enable
this in radeon (plus any other drivers in the same boat)
- change drm_universal_plane_init() to advertise the LINEAR modifier
when NULL is passed as the modifier list (including installing a default .format_mod_supported hook)
- remove the mode_config.allow_fb_modifiers hook and always
advertise modifier support, unless mode_config.cannot_support_modifiers is set

[1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/[email protected]/#24602575

v6:
* add Reviewed-by and Acked-by
* add a changelog per-patch

v5: https://www.spinics.net/lists/dri-devel/msg330860.html
* rebase to the latest master branch (5.17-rc1+)
+ "drm/plane: Make format_mod_supported truly optional" patch [2]
[2] https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3

* change default_modifiers array from non-static to static
* remove terminator in default_modifiers array
* use ARRAY_SIZE to get the format_modifier_count
* keep a sanity check in plane init func
* modify several kerneldocs

v4: https://www.spinics.net/lists/dri-devel/msg329508.html
* modify documentation for fb_modifiers_not_supported flag in kerneldoc

v3: https://www.spinics.net/lists/dri-devel/msg329102.html
* change the order as follows:
1. add fb_modifiers_not_supported flag
2. add default modifiers
3. remove allow_fb_modifiers flag
* add a conditional disable in amdgpu_dm_plane_init()

v2: https://www.spinics.net/lists/dri-devel/msg328939.html
* rebase to the latest master branch (5.16.0+)
+ "drm/plane: Make format_mod_supported truly optional" patch [2]

v1: https://www.spinics.net/lists/dri-devel/msg327352.html
* The initial patch set

Tomohito Esaki (3):
drm: introduce fb_modifiers_not_supported flag in mode_config
drm: add support modifiers for drivers whose planes only support
linear layout
drm: remove allow_fb_modifiers

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  6 ++---
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c        |  2 ++
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c         |  1 +
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c         |  2 ++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  3 +++
 drivers/gpu/drm/drm_framebuffer.c             |  6 ++---
 drivers/gpu/drm/drm_ioctl.c                   |  2 +-
 drivers/gpu/drm/drm_plane.c                   | 23 +++++++++++--------
 drivers/gpu/drm/nouveau/nouveau_display.c     |  6 +++--
 drivers/gpu/drm/radeon/radeon_display.c       |  2 ++
 .../gpu/drm/selftests/test-drm_framebuffer.c  |  1 -
 include/drm/drm_mode_config.h                 | 18 +++++----------
 include/drm/drm_plane.h                       |  3 +++
 14 files changed, 45 insertions(+), 32 deletions(-)
Signature · 1 line
2.25.1