From: Mark Yacoub <markyacoub@chromium.org> To: Daniel Stone <daniel@fooishbar.org> Cc: "Michel Dänzer" <michel@daenzer.net>, "amd-gfx list" <amd-gfx@lists.freedesktop.org>, "Maling list - DRI developers" <dri-devel@lists.freedesktop.org>, "Deucher, Alexander" <alexander.deucher@amd.com>, "Mark Yacoub" <markyacoub@google.com> Subject: Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane. Date: Wed, 24 Mar 2021 10:58:17 -0400 [thread overview] Message-ID: <CAJUqKUqQ0yrxpr+QVRXYXMk1hBRNByD0TP6mM0oLY54jDZimbw@mail.gmail.com> (raw) In-Reply-To: <CAPj87rP+WkUPbS3yyGGfy0SRm_hsnCCUav99Dg2Q+tXCiJ5D+A@mail.gmail.com> On Wed, Mar 24, 2021 at 8:10 AM Daniel Stone <daniel@fooishbar.org> wrote: > > On Wed, 24 Mar 2021 at 10:53, Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> wrote: >> >> On Wed, Mar 24, 2021 at 11:13 AM Michel Dänzer <michel@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". So you mean it would make more sense to be more explicit in handling DRM_FORMAT_MOD_INVALID as an incoming modifier (which will, just like DRM_FORMAT_MOD_LINEAR, will return true in dm_plane_format_mod_supported)? >> >> >> 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Mark Yacoub <markyacoub@chromium.org> To: Daniel Stone <daniel@fooishbar.org> Cc: "Michel Dänzer" <michel@daenzer.net>, "amd-gfx list" <amd-gfx@lists.freedesktop.org>, "Maling list - DRI developers" <dri-devel@lists.freedesktop.org>, "Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>, "Deucher, Alexander" <alexander.deucher@amd.com>, "Mark Yacoub" <markyacoub@google.com> Subject: Re: [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane. Date: Wed, 24 Mar 2021 10:58:17 -0400 [thread overview] Message-ID: <CAJUqKUqQ0yrxpr+QVRXYXMk1hBRNByD0TP6mM0oLY54jDZimbw@mail.gmail.com> (raw) In-Reply-To: <CAPj87rP+WkUPbS3yyGGfy0SRm_hsnCCUav99Dg2Q+tXCiJ5D+A@mail.gmail.com> On Wed, Mar 24, 2021 at 8:10 AM Daniel Stone <daniel@fooishbar.org> wrote: > > On Wed, 24 Mar 2021 at 10:53, Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> wrote: >> >> On Wed, Mar 24, 2021 at 11:13 AM Michel Dänzer <michel@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". So you mean it would make more sense to be more explicit in handling DRM_FORMAT_MOD_INVALID as an incoming modifier (which will, just like DRM_FORMAT_MOD_LINEAR, will return true in dm_plane_format_mod_supported)? >> >> >> 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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-03-24 14:58 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-10 16:14 [PATCH] drm/amdgpu: Ensure that the modifier requested is supported by plane Mark Yacoub 2021-03-10 16:14 ` Mark Yacoub 2021-03-22 15:17 ` Mark Yacoub 2021-03-22 15:17 ` Mark Yacoub 2021-03-23 15:02 ` Alex Deucher 2021-03-23 15:02 ` Alex Deucher 2021-03-23 15:32 ` Mark Yacoub 2021-03-23 15:32 ` Mark Yacoub 2021-03-24 10:13 ` Michel Dänzer 2021-03-24 10:13 ` Michel Dänzer 2021-03-24 10:53 ` Bas Nieuwenhuizen 2021-03-24 10:53 ` Bas Nieuwenhuizen 2021-03-24 12:10 ` Daniel Stone 2021-03-24 12:10 ` Daniel Stone 2021-03-24 14:58 ` Mark Yacoub [this message] 2021-03-24 14:58 ` Mark Yacoub 2021-03-24 15:25 ` Daniel Stone 2021-03-24 15:25 ` Daniel Stone 2021-03-24 15:32 ` Mark Yacoub 2021-03-24 15:32 ` Mark Yacoub 2021-03-23 15:08 ` Bas Nieuwenhuizen 2021-03-23 15:08 ` Bas Nieuwenhuizen 2021-03-23 15:34 ` Mark Yacoub 2021-03-23 15:34 ` Mark Yacoub
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAJUqKUqQ0yrxpr+QVRXYXMk1hBRNByD0TP6mM0oLY54jDZimbw@mail.gmail.com \ --to=markyacoub@chromium.org \ --cc=alexander.deucher@amd.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=daniel@fooishbar.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=markyacoub@google.com \ --cc=michel@daenzer.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.