mirror_ubuntu-kernels/drivers/gpu/drm/vc4
Danilo Krummrich 6acb416bf4
drm/vc4: plane: protect device resources after removal
(Hardware) resources which are bound to the driver and device lifecycle
must not be accessed after the device and driver are unbound.

However, the DRM device isn't freed as long as the last user closed it,
hence userspace can still call into the driver.

Therefore protect the critical sections which are accessing those
resources with drm_dev_enter() and drm_dev_exit().

Fixes: 9872c7a319 ("drm/vc4: plane: Switch to drmm_universal_plane_alloc()")
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220824161327.330627-3-dakr@redhat.com
2022-08-25 09:44:25 +02:00
..
Kconfig drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_crtc.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_debugfs.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_dpi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_drv.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_drv.h drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_dsi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_fence.c
vc4_gem.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_hdmi_phy.c drm/vc4: hdmi: Rename pixel_rate variable 2022-03-24 13:43:59 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Add MISC_CONTROL register for vc4 2022-06-28 14:56:08 +02:00
vc4_hdmi.c drm/vc4: hdmi: unlock mutex when device is unplugged 2022-08-25 09:44:25 +02:00
vc4_hdmi.h drm/vc4: hdmi: Switch to DRM-managed kfree to build regsets 2022-07-13 10:46:10 +02:00
vc4_hvs.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_irq.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_kms.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
vc4_packet.h
vc4_perfmon.c drm/vc4: perfmon: Add missing mutex_destroy 2022-07-13 10:46:13 +02:00
vc4_plane.c drm/vc4: plane: protect device resources after removal 2022-08-25 09:44:25 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: drop unexpected word "the" in the comments 2022-06-22 09:22:55 +02:00
vc4_render_cl.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_trace_points.c
vc4_trace.h drm/vc4: add tracepoints for CL submissions 2022-03-17 15:12:25 +01:00
vc4_txp.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_v3d.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_validate_shaders.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_validate.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_vec.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00