All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 4/4] drm: Add getfb2 ioctl
Date: Fri, 23 Mar 2018 19:31:28 +0200	[thread overview]
Message-ID: <20180323173128.GF5453@intel.com> (raw)
In-Reply-To: <CAPj87rMAJGRDAdxy+moFmfyw6a0yqQoiD8Ttifi4_iPozJ_zLQ@mail.gmail.com>

On Fri, Mar 23, 2018 at 05:00:11PM +0000, Daniel Stone wrote:
> Hi,
> 
> On 23 March 2018 at 14:49, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> > On Fri, Mar 23, 2018 at 01:45:52PM +0000, Daniel Stone wrote:
> >> +     for (i = 0; i < ARRAY_SIZE(r->handles); i++) {
> >> +             r->handles[i] = 0;
> >> +             r->pitches[i] = 0;
> >> +             r->offsets[i] = 0;
> >> +             r->modifier[i] = DRM_FORMAT_MOD_INVALID;
> >
> > Don't we want to leave this zeroed too? For addfb2 we require any unused
> > modifier to be 0, so if someone does 'getfb2(&cmd); addfb2(&cmd);' they
> > would get an error from the addfb2().
> 
> My thinking is that since the primary userspace for this doesn't have
> symmetry with add (args for add, struct for get), that it was better
> to feed in INVALID directly. This is going to change, e.g., X server
> to:
>   modifier = (fb->flags ? DRM_MODE_FB_MODIFIERS) ? fb->modifier :
> DRM_FORMAT_MOD_INVALID;
> 
> It's a good point about the symmetry though. Do you know of direct
> non-libdrm users? Apart from igt of course ;)

Nope. Just thought that since both take the same struct it'd make some
sense. And figured it could serve as a quick sanity check to make sure
getfb outputs sane data. Or rather, if the driver accepts it back in
it can't be all bad at least.

But if you think it's not a particularly useful thing to do then I'm
certainly willing to accept that.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-03-23 17:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 13:42 [igt-dev] [PATCH 0/8] Add GetFB2 ioctl Daniel Stone
2018-03-23 13:42 ` Daniel Stone
2018-03-23 13:45 ` [PATCH 1/4] drm/i915: Use intel_fb_obj() everywhere Daniel Stone
2018-03-23 13:45   ` [PATCH 2/4] drm/i915: Move GEM BO inside drm_framebuffer Daniel Stone
2018-03-23 14:42     ` [Intel-gfx] " Ville Syrjälä
2018-03-23 14:49       ` Daniel Stone
2018-05-17 13:18         ` [Intel-gfx] " Daniel Stone
2018-03-23 13:45   ` [PATCH 3/4] drm: Reshuffle getfb error returns Daniel Stone
2018-03-23 14:43     ` Ville Syrjälä
2018-03-23 13:45   ` [PATCH 4/4] drm: Add getfb2 ioctl Daniel Stone
2018-03-23 14:49     ` Ville Syrjälä
2018-03-23 17:00       ` Daniel Stone
2018-03-23 17:31         ` Ville Syrjälä [this message]
2018-03-24 10:12           ` Daniel Stone
2018-03-23 13:45   ` [PATCH libdrm] NOMERGE: Add drmModeGetFB2 Daniel Stone
2018-03-23 13:46 ` [igt-dev] [PATCH i-g-t 1/3] tests/kms_getfb: Split property-ID get into helper Daniel Stone
2018-03-23 13:46   ` Daniel Stone
2018-03-23 13:46   ` [PATCH i-g-t 2/3] NOMERGE: Update DRM UAPI to latest kernel version Daniel Stone
2018-03-23 13:46   ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_getfb: Add getfb2 tests Daniel Stone
2018-03-23 13:46     ` Daniel Stone
2018-03-23 15:01     ` [igt-dev] " Ville Syrjälä
2018-03-23 14:53   ` [igt-dev] [PATCH i-g-t 1/3] tests/kms_getfb: Split property-ID get into helper Ville Syrjälä
2018-03-23 14:53     ` Ville Syrjälä
2018-03-23 14:55     ` [igt-dev] " Daniel Stone
2018-03-23 14:55       ` Daniel Stone
2018-03-23 13:51 ` [igt-dev] [PATCH 0/8] Add GetFB2 ioctl Daniel Stone
2018-03-23 13:51   ` Daniel Stone

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=20180323173128.GF5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@fooishbar.org \
    --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.