From: Daniel Vetter <daniel@ffwll.ch>
To: Keith Packard <keithp@keithp.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm: Check mode object lease status in all master ioctl paths
Date: Mon, 3 Apr 2017 09:49:51 +0200 [thread overview]
Message-ID: <20170403074951.o44ofppjoigutff2@phenom.ffwll.local> (raw)
In-Reply-To: <864ly6kbpf.fsf@hiro.keithp.com>
On Sun, Apr 02, 2017 at 09:37:16AM -0700, Keith Packard wrote:
> Daniel Vetter <daniel@ffwll.ch> writes:
>
> > I think it'd be good if we could consolidate all the lease checking into
> > drm_mode_object_find (respectively __drm_mode_object_find). We'd need to
> > wire up the fpriv to be able to do that, but we could upstream that patch
> > right away before anything else. That should take care of most of the
> > checks in this patch here.
>
> That's a good idea.
>
> > There's a few things on top:
> > - filtering the various bitmasks. I think you have most, but we could
> > perhaps upstream the helpers for these.
>
> Yeah, would be nice to get hooks in place soon to avoid rebase
> adventures later. I guess that would involve shipping a stub drm_lease.h
> for now?
I think we should see how far wiring drm_file *fpriv through the lookup
functions gets us, but yeah we probably need a stub drm_lease.h for
filtering. For the interface maybe pass a drm_file *fpriv for all the
filtering functions, and deref into fpriv->master or whatever on the
implementation. That gives us all the freedom to filter however we want
really.
> > - filtering object lists (essentially getresources and getplanes ioctls).
> > - filtering implicit objects in the legacy ioctl. E.g. page_flip done
> > through atomic doesn't just need the CRTC id, but also the id of the
> > primary plane plus of the FB_ID atomic property. Similarly for all the
> > other legacy ioctls. I think we want to make sure there's no difference
> > here in behaviour.
>
> Oh, all of the implicit resource access from the legacy ioctls. Yeah,
> that will take a bit of research to identify all of them.
>
> > Especially for the last one it might be simplest to outright disallow all
> > legacy ioctl and require that sub-drm_master nodes only get access to the
> > read-only GET* ioctl (they get that anyway, even when they're not the
> > current master), plus atomic. Makes it a _lot_ easier to implement.
> > Downside is that amdgpu _really_ needs to land atomic asap :-)
>
> I'd like to avoid that particular dependency as amdgpu is something of a
> requirement for this particular project...
Figured so :-) Otoh I've heard that atomic for amdgpu is happening for
real now. Although Harry told me I need to wait a few more weeks before
they're ready to present the rewritten stuff and get my feedback ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-04-03 7:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-01 17:08 [PATCH 0/4] drm: Add mode resource leasing Keith Packard
2017-04-01 17:08 ` [PATCH 1/4] drm: Add new LEASE debug level Keith Packard
2017-04-01 17:08 ` [PATCH 2/4] drm: Add drm_object lease infrastructure Keith Packard
2017-04-02 13:38 ` Daniel Vetter
2017-04-02 16:31 ` Keith Packard
2017-04-10 5:16 ` Michel Dänzer
2017-04-02 17:51 ` Daniel Vetter
2017-04-02 19:59 ` Keith Packard
2017-04-01 17:08 ` [PATCH 3/4] drm: Check mode object lease status in all master ioctl paths Keith Packard
2017-04-02 13:19 ` Daniel Vetter
2017-04-02 16:37 ` Keith Packard
2017-04-03 7:49 ` Daniel Vetter [this message]
2017-04-10 1:06 ` Keith Packard
2017-04-01 17:08 ` [PATCH 4/4] drm: Add four ioctls for managing drm mode object leases Keith Packard
2017-04-02 13:23 ` Daniel Vetter
2017-04-02 16:44 ` Keith Packard
2017-04-29 6:06 ` [PATCH 0/5] drm: Add mode resource leasing [v2] Keith Packard
2017-04-29 6:06 ` [PATCH 1/5] drm: Pass struct drm_file * to __drm_mode_object_find Keith Packard
2017-04-29 6:06 ` [PATCH 2/5] drm: Add new LEASE debug level Keith Packard
2017-04-29 6:07 ` [PATCH 3/5] drm: Add drm_object lease infrastructure [v2] Keith Packard
2017-04-29 6:07 ` [PATCH 4/5] drm: Check mode object lease status in all master ioctl paths [v2] Keith Packard
2017-04-29 6:07 ` [PATCH 5/5] drm: Add three ioctls for managing drm mode object leases [v2] Keith Packard
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=20170403074951.o44ofppjoigutff2@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®