Skip to content

Fixes for vc4 hotplug rework

Danilo Krummrich dri-devel lkml 3 versions – Applied

Status from this message: Applied to drm/drm-misc (drm-misc-next).

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v24 patches 2 repliesSuperseded
  3. v13 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- vc4_plane: Actually protect entire functions to increase readability (Maxime)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4drm/vc4: hdmi: unlock mutex when device is unpluggeddrivers/gpu/drm/vc4/vc4_hdmi.c+5 -20 replies
2/4drm/vc4: plane: protect device resources after removaldrivers/gpu/drm/vc4/vc4_plane.c+20 -00 replies
3/4drm/vc4: crtc: protect device resources after removaldrivers/gpu/drm/vc4/vc4_crtc.c+40 -10 replies
4/4drm/vc4: hvs: protect drm_print_regset32()drivers/gpu/drm/vc4/vc4_hvs.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH drm-misc-next v3 0/4] Fixes for vc4 hotplug rework

Hi,

I've found a few potential issues left after the hotplug rework.

In vc4_hdmi.c we're missing two mutex_unlock() calls when the device is unplugged.

vc4_crtc and vc4_plane seem to miss some drm_dev_enter()/drm_dev_exit() calls to protect against resource access after the device/driver is unbound, but the DRM potentially isn't freed yet and userspace can still call into the driver.

Changes in v2:
- Use drm_device pointer from struct drm_plane (Maxime)
- Protect entire functions to increase readability (Maxime)
- Add another patch to fix an uncovered MMIO access in vc4_hvs.c

Changes in v3:
- vc4_plane: Actually protect entire functions to increase readability (Maxime)

Danilo Krummrich (4):
drm/vc4: hdmi: unlock mutex when device is unplugged drm/vc4: plane: protect device resources after removal drm/vc4: crtc: protect device resources after removal drm/vc4: hvs: protect drm_print_regset32()

 drivers/gpu/drm/vc4/vc4_crtc.c  | 41 ++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/vc4/vc4_hdmi.c  |  7 ++++--
 drivers/gpu/drm/vc4/vc4_hvs.c   |  4 ++--
 drivers/gpu/drm/vc4/vc4_plane.c | 20 ++++++++++++++++
 4 files changed, 67 insertions(+), 5 deletions(-)

base-commit: 4d07b0bc403403438d9cf88450506240c5faf92f

Signature · 1 line
2.37.2