]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/tinydrm: Use drm_dev_enter/exit()
authorNoralf Trønnes <noralf@tronnes.org>
Mon, 25 Feb 2019 14:42:32 +0000 (15:42 +0100)
committerNoralf Trønnes <noralf@tronnes.org>
Mon, 4 Mar 2019 14:32:21 +0000 (15:32 +0100)
commit9d5645ad1b979c99326e13ac51e1826ffe60aaec
tree31513f9a5bd35f5b572ef7bdd3d91870607b05a0
parent2afd9fcba6b168ab4fa5c38680f98147a745d31c
drm/tinydrm: Use drm_dev_enter/exit()

This protects device resources from use after device removal.

There are 3 ways for driver-device unbinding to happen:
- The driver module is unloaded causing the driver to be unregistered.
  This can't happen as long as there are open file handles because a
  reference is taken on the module.
- The device is removed (Device Tree overlay unloading).
  This can happen at any time.
- The driver sysfs unbind file can be used to unbind the driver from the
  device. This can happen any time.

v2: Since drm_atomic_helper_shutdown() has to be called after
    drm_dev_unplug() we don't want do block ->disable after unplug.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190225144232.20761-8-noralf@tronnes.org
drivers/gpu/drm/tinydrm/hx8357d.c
drivers/gpu/drm/tinydrm/ili9225.c
drivers/gpu/drm/tinydrm/ili9341.c
drivers/gpu/drm/tinydrm/mi0283qt.c
drivers/gpu/drm/tinydrm/mipi-dbi.c
drivers/gpu/drm/tinydrm/repaper.c
drivers/gpu/drm/tinydrm/st7586.c
drivers/gpu/drm/tinydrm/st7735r.c