]> git.baikalelectronics.ru Git - kernel.git/commit
drm: add core support for unplugging a device (v2)
authorDave Airlie <airlied@redhat.com>
Mon, 20 Feb 2012 14:18:07 +0000 (14:18 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 15 Mar 2012 13:35:33 +0000 (13:35 +0000)
commitc39a21ddc4e3414c1ee50ce518f7bd05480392a3
tree8ab0b7541ee4f9f75397d3da190426041dc08c6e
parent58232c4be6f3fcce60369455751f7b59b868f6d6
drm: add core support for unplugging a device (v2)

Two parts to this, one is simple unplug from sysfs for the device node.

The second adds an unplugged state, if we have device opens, we
just set the unplugged state and return, if we have no device
opens we drop the drm device.

If after a lastclose we discover we are unplugged we then
drop the drm device.

v2: use an atomic for unplugged and wrap it for users,
add checks on open + mmap + ioctl entry points.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_stub.c
drivers/gpu/drm/drm_vm.c
include/drm/drmP.h