OSDN Git Service

drm: add support modifiers for drivers whose planes only support linear layout
authorTomohito Esaki <etom@igel.co.jp>
Fri, 28 Jan 2022 06:08:35 +0000 (15:08 +0900)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 31 Jan 2022 20:45:24 +0000 (21:45 +0100)
commit8be576837b6e62b2ad0de2f9ba31cef618fa2891
tree8e195f2aaa00e88a455f154a96cad60df2bd984d
parent2af104290da5e4858e8caefa068827d7392c6a09
drm: add support modifiers for drivers whose planes only support linear layout

The LINEAR modifier is advertised as default if a driver doesn't specify
modifiers.

v2:
 - rebase to the latest master branch (5.16.0+)
    + "drm/plane: Make format_mod_supported truly optional" patch [1]
   [1] https://patchwork.freedesktop.org/patch/467940/?series=98255&rev=3

v3:
 - change the order as follows:
   1. add fb_modifiers_not_supported flag
   2. add default modifiers
   3. remove allow_fb_modifiers flag

v5:
 - change default_modifiers array from non-static to static
 - remove terminator in default_modifiers array
 - use ARRAY_SIZE to get the format_modifier_count
 - update sanity check in plane init func to use the
   fb_modifiers_not_supported
 - modify kernel docs

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220128060836.11216-3-etom@igel.co.jp
drivers/gpu/drm/drm_plane.c
include/drm/drm_plane.h