Re: [PATCH v6 0/9] Fix cursor planes with virtualized drivers

From: Simon Ser
Date: Mon Oct 23 2023 - 04:19:22 EST


On Monday, October 23rd, 2023 at 10:14, Albert Esteve <aesteve@xxxxxxxxxx> wrote:

> On Mon, Oct 23, 2023 at 9:55 AM Simon Ser <contact@xxxxxxxxxxx> wrote:
>
> > On Monday, October 23rd, 2023 at 09:46, Albert Esteve <aesteve@xxxxxxxxxx> wrote:
> >
> > > Link to the IGT test covering this patch (already merged):
> > > https://lists.freedesktop.org/archives/igt-dev/2023-July/058427.html
> >
> > Hmm. IGT should not be merged before the kernel, because as long as the
> > kernel is not merged there might be some uAPI changes.
>
> Right, but uAPI header was not updated on the IGT side. As per suggestion of the
> maintainers, I added a static variable that matches the definition on this patch:
> https://lists.freedesktop.org/archives/igt-dev/2023-August/058803.html
>
> +/**
> + * Clients which do set cursor hotspot and treat the cursor plane
> + * like a mouse cursor should set this property.
> + */
> +#define LOCAL_DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6
>
> Once this patch gets upstreamed, the localized definition will be removed,
> replaced by the real one.

What if this patch gets delayed and another patch using the same number
is merged into the kernel first? What if someone finds a design flaw in
the uAPI and it needs to be completely changed? The IGT test would then
be completely broken.

As a rule of thumb: never merge user-space patches before kernel. As
soon as the kernel part is merged, it's fine to locally copy definitions
if desirable.

> > > Mutter patch:
> > > https://lists.freedesktop.org/archives/igt-dev/2023-July/058427.html
> >
> > Seems like this link is same as IGT? Copy-pasta fail maybe?
>
> Ah yes, my bad, this is the correct link:
> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3337

Thanks!