mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
drm: introduce fb_modifiers_not_supported flag in mode_config
If only linear modifier is advertised, since there are many drivers that only linear supported, the DRM core should handle this rather than open-coding in every driver. However, there are legacy drivers such as radeon that do not support modifiers but infer the actual layout of the underlying buffer. Therefore, a new flag fb_modifiers_not_supported is introduced for these legacy drivers, and allow_fb_modifiers is replaced with this new flag. v3: - 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() v4: - modify kernel docs v5: - modify kernel docs Signed-off-by: Tomohito Esaki <etom@igel.co.jp> Acked-by: Harry Wentland <harry.wentland@amd.com> 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-2-etom@igel.co.jp
This commit is contained in:
committed by
Daniel Vetter
parent
9987151a90
commit
2af104290d
@@ -7828,6 +7828,9 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
if (modifiers == NULL)
|
||||
adev_to_drm(dm->adev)->mode_config.fb_modifiers_not_supported = true;
|
||||
|
||||
res = drm_universal_plane_init(adev_to_drm(dm->adev), plane, possible_crtcs,
|
||||
&dm_plane_funcs, formats, num_formats,
|
||||
modifiers, plane->type, NULL);
|
||||
|
||||
Reference in New Issue
Block a user