mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC v2 0/6] DRM revoke support
@ 2013-10-21 22:33 David Herrmann
  2013-10-21 22:33 ` [RFC v2 1/6] percpu_rw_semaphore: export symbols for modules David Herrmann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: David Herrmann @ 2013-10-21 22:33 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel, Dave Airlie, David Herrmann

Hi

This is the 2nd revision of reliable unplug support for DRM. As revoke support
for the generic VFS layer is still not even close to being merged, this fixes
the generic DRM layer to handle unplugged devices gracefully.

This series fixes the DRM core to track any running f_ops. During device
unplugging (which is the same as revoke()) we mark a device as unplugged so no
new f_ops are started. Then we wait for running f_ops to finish and then close
all open files (and leave just dummies behind). Now we can unregister the device
without waiting for userspace to call close() on all fds.

Any comments are welcome. Drivers which provide their own f_ops need to be
fixed, other than that this is already working. Tested with udl locally. Running
applications get poll(HUP) or SIGBUS for mmaps depending on what they're doing
if they access the device after unplugging.

Thanks
David

David Herrmann (6):
  percpu_rw_semaphore: export symbols for modules
  percpu_rw_semaphore: add percpu_down_read_trylock()
  drm: split drm_release()
  drm: make dev->unplugged reliable
  drm: make drm_dev_unregister() immediate
  drm: zap mmaps for dead devices

 drivers/gpu/drm/Kconfig             |   1 +
 drivers/gpu/drm/drm_drv.c           |   5 +-
 drivers/gpu/drm/drm_fops.c          | 111 ++++++++++++++-------
 drivers/gpu/drm/drm_gem.c           |  10 +-
 drivers/gpu/drm/drm_stub.c          | 192 ++++++++++++++++++++++++++++++------
 drivers/gpu/drm/drm_vm.c            |   3 +-
 drivers/gpu/drm/udl/udl_connector.c |   2 +-
 drivers/gpu/drm/udl/udl_drv.c       |   2 +-
 drivers/gpu/drm/udl/udl_fb.c        |   4 +-
 include/drm/drmP.h                  |  27 +++--
 include/linux/percpu-rwsem.h        |   1 +
 lib/Makefile                        |   2 +-
 lib/percpu-rwsem.c                  |  27 +++++
 13 files changed, 296 insertions(+), 91 deletions(-)

-- 
1.8.4.1


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

end of thread, other threads:[~2013-10-21 22:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21 22:33 [RFC v2 0/6] DRM revoke support David Herrmann
2013-10-21 22:33 ` [RFC v2 1/6] percpu_rw_semaphore: export symbols for modules David Herrmann
2013-10-21 22:33 ` [RFC v2 2/6] percpu_rw_semaphore: add percpu_down_read_trylock() David Herrmann
2013-10-21 22:33 ` [RFC v2 3/6] drm: split drm_release() David Herrmann
2013-10-21 22:33 ` [RFC v2 4/6] drm: make dev->unplugged reliable David Herrmann
2013-10-21 22:33 ` [RFC v2 5/6] drm: make drm_dev_unregister() immediate David Herrmann
2013-10-21 22:33 ` [RFC v2 6/6] drm: zap mmaps for dead devices David Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome