]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Split off pci_driver.remove() tail to drm_driver.release()
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Thu, 30 May 2019 13:31:05 +0000 (15:31 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 31 May 2019 07:43:18 +0000 (08:43 +0100)
commit8b8e7d64f3dac230b890005fa2fb088413f9c180
treea4f51c77c64a43b99fb5076df05ad3062e8f48a2
parent5963d78a317bde57858f54cb4e612abb95a291ad
drm/i915: Split off pci_driver.remove() tail to drm_driver.release()

In order to support driver hot unbind, some cleanup operations, now
performed on PCI driver remove, must be called later, after all device
file descriptors are closed.

Split out those operations from the tail of pci_driver.remove()
callback and put them into drm_driver.release() which is called as soon
as all references to the driver are put.  As a result, those cleanups
will be now run on last drm_dev_put(), either still called from
pci_driver.remove() if all device file descriptors are already closed,
or on last drm_release() file operation.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190530133105.30467-1-janusz.krzysztofik@linux.intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c