[PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane.
Daniel Stone
daniel at fooishbar.org
Wed Mar 24 12:10:15 UTC 2021
On Wed, 24 Mar 2021 at 10:53, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:
> On Wed, Mar 24, 2021 at 11:13 AM Michel Dänzer <michel at daenzer.net> wrote:
>
>> No modifier support does not imply linear. It's generally signalled via
>> DRM_FORMAT_MOD_INVALID, which roughly means "tiling is determined by driver
>> specific mechanisms".
>>
>
> Doesn't quite work that way in the kernel sadly. If you don't set
> DRM_MODE_FB_MODIFIERS then the modifier fields have to be 0 (which happens
> to alias DRM_FORMAT_MOD_LINEAR and then now deprecated
> DRM_FORMAT_MOD_NONE). This is verified in shared drm code.
>
> (and all userspace code I've seen simply doesn't set DRM_MODE_FB_MODIFIERS
> if the incoming modifier is DRM_FORMAT_MOD_INVALID)
>
Yes, but even though the field is zero, the lack of the flag means it must
be treated as INVALID. If the kernel is not doing this, the kernel is
objectively wrong. (And I know it doesn't do this in most cases, because
otherwise I wouldn't be able to use this GNOME session on an Intel laptop,
where modifiers are blacklisted.)
Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210324/880c8456/attachment.htm>
More information about the amd-gfx
mailing list