All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Simon Ser <contact@emersion.fr>
Cc: Daniel Stone <daniels@collabora.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: pre-fill getfb2 modifier array with INVALID
Date: Mon, 15 Nov 2021 17:22:57 +0200	[thread overview]
Message-ID: <YZJ7UcXdNIvk918E@intel.com> (raw)
In-Reply-To: <D-6FSEcdyTRAZxrnW6mcb0iOVY3NfKMbT8WS7-f9Wn4i9jQ0YbmInyMwZRwb_aLzPvUSWz_KPs34RQ1tkCb3xuISVkTyjkmV5aMfGcdkQl8=@emersion.fr>

On Mon, Nov 15, 2021 at 09:18:42AM +0000, Simon Ser wrote:
> On Thursday, November 11th, 2021 at 13:50, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > On Thu, Nov 11, 2021 at 10:10:54AM +0000, Simon Ser wrote:
> > > User-space shouldn't look up the modifier array when the modifier
> > > flag is missing, but at the moment no docs make this clear (working
> > > on it). Right now the modifier array is pre-filled with zeroes, aka.
> > > LINEAR. Instead, pre-fill with INVALID to avoid footguns.
> > >
> > > This is a uAPI change, but OTOH any user-space which looks up the
> > > modifier array without checking the flag is broken already, so
> > > should be fine.
> > >
> > > Signed-off-by: Simon Ser <contact@emersion.fr>
> > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > Cc: Pekka Paalanen <ppaalanen@gmail.com>
> > > Cc: Daniel Stone <daniels@collabora.com>
> >
> > Isn't this going to break the test where we pass the get
> > getfb2 result back into addfb2?
> 
> Shouldn't be the case, since the kernel will ignore modifiers if the
> flag isn't set.

if (r->modifier[i] && !(r->flags & DRM_MODE_FB_MODIFIERS)) {
	DRM_DEBUG_KMS("bad fb modifier %llu for plane %d\n",
		r->modifier[i], i);
	return -EINVAL;
}

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-11-15 15:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 10:10 [PATCH] drm: pre-fill getfb2 modifier array with INVALID Simon Ser
2021-11-11 11:08 ` Pekka Paalanen
2021-11-11 11:49 ` Daniel Stone
2021-11-11 12:50 ` Ville Syrjälä
2021-11-15  9:18   ` Simon Ser
2021-11-15 15:22     ` Ville Syrjälä [this message]
2021-11-15 15:26       ` Simon Ser

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=YZJ7UcXdNIvk918E@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=contact@emersion.fr \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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: link
Be 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.