linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] drm: Add mode resource leasing
@ 2017-04-01 17:08 Keith Packard
  2017-04-01 17:08 ` [PATCH 1/4] drm: Add new LEASE debug level Keith Packard
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Keith Packard @ 2017-04-01 17:08 UTC (permalink / raw)
  To: linux-kernel, Dave Airlie; +Cc: Keith Packard, dri-devel

Here's a first cut of the proposed mode resource leasing code. What
this does is allow an application to create a new drm_master which
"leases" resources from an existing drm_master. This new drm_master
can do whatever it likes with the resources it was granted, including
setting modes, performing page_flip operations etc.

This can be used to run multiple compositors on the same GPU, each
driving its own set of outputs. Examples of this include multi-user
setups and virtual reality environments.

Because setting modes can consume 'hidden' resources within the GPU,
it isn't entirely clear that letting multiple processes perform mode
setting is a good idea or not. A process doing the usual
test/render/commit sequence may find that the commit fails because
some other process consumed necessary resources after the test was
invoked. Daniel Vetter suggested that perhaps some kind of locking
mechanism across this sequence might help, but that can lead to
problems when a process fails to unlock. If someone wants to come up
with a reasonable scheme here, that'd be great.

For now, I'll be working on the assumption that the lease holder will
not set any modes, which will avoid the problematic case described above.

The series is broken into four patches in an attempt to make review a
bit easier.

The trickiest bit of the code was in creating the new drm_master,
which involved allocating a new file and fd and getting those
initialized with the right reference counts on all of the related data
structures. It "seems" to work, but it would be nice if someone with
more experience in that part of the kernel could take a look at
it. That's in the fourth patch.

The third patch hooks the lease checks into the other ioctls; that
could use some review to make sure I didn't miss any needed checks.

-keith

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2017-04-29  6:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).