]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Use srcu to protect drm_device.unplugged
authorNoralf Trønnes <noralf@tronnes.org>
Wed, 28 Mar 2018 07:38:35 +0000 (10:38 +0300)
committerOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Thu, 29 Mar 2018 10:19:20 +0000 (13:19 +0300)
commit2cc8bdd8c4f46b97d156c3f6ec7a6a1e12e13d07
treeabe48e9b35c199bf691b02efc40a5291f2391b40
parent83e57719a1a6592d556f49817d4584f780585dbb
drm: Use srcu to protect drm_device.unplugged

Use srcu to protect drm_device.unplugged in a race free manner.
Drivers can use drm_dev_enter()/drm_dev_exit() to protect and mark
sections preventing access to device resources that are not available
after the device is gone.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Tested-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1522222715-11814-1-git-send-email-andr2000@gmail.com
drivers/gpu/drm/drm_drv.c
include/drm/drm_device.h
include/drm/drm_drv.h