mbox series

[RFC,0/3] Add support modifiers for drivers whose planes only support linear layout

Message ID 20211222052727.19725-1-etom@igel.co.jp (mailing list archive)
Headers show
Series Add support modifiers for drivers whose planes only support linear layout | expand

Message

Esaki Tomohito Dec. 22, 2021, 5:27 a.m. UTC
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].

On Thu, Nov 18, 2021 at 01:02:11PM +0000, Daniel Stone wrote:
> 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/20190509054518.10781-1-etom@igel.co.jp/#24602575


Tomohito Esaki (3):
  drm: add support modifiers for drivers whose planes only support
    linear layout
  drm: set fb_modifiers_not_supported flag in legacy drivers
  drm: replace allow_fb_modifiers with fb_modifiers_not_supported

 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 +
 drivers/gpu/drm/drm_framebuffer.c             |  6 +--
 drivers/gpu/drm/drm_ioctl.c                   |  2 +-
 drivers/gpu/drm/drm_plane.c                   | 41 +++++++++++--------
 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 ++
 13 files changed, 54 insertions(+), 38 deletions(-)

Comments

Simon Ser Jan. 5, 2022, 11:57 p.m. UTC | #1
Thanks for working on this! I've pushed a patch [1] to drm-misc-next which
touches the same function, can you rebase your patches on top of it?

[1]: https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3
Esaki Tomohito Jan. 12, 2022, 2:13 a.m. UTC | #2
Hi, Simon

On 2022/01/06 8:57, Simon Ser wrote:
> Thanks for working on this! I've pushed a patch [1] to drm-misc-next which
> touches the same function, can you rebase your patches on top of it?
> 
> [1]: https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3

I understand. I will rebase the patches and send.

Thanks
Tomohito Esaki