linux/drivers/gpu/drm/vboxvideo
Douglas Anderson 3c4babae3c drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers
Based on grepping through the source code these drivers appear to be
missing a call to drm_atomic_helper_shutdown() at system shutdown time
and at driver remove (or unbind) time. Among other things, this means
that if a panel is in use that it won't be cleanly powered off at
system shutdown time.

The fact that we should call drm_atomic_helper_shutdown() in the case
of OS shutdown/restart and at driver remove (or unbind) time comes
straight out of the kernel doc "driver instance overview" in
drm_drv.c.

A few notes about these fixes:
- I confirmed that these drivers were all DRIVER_MODESET type drivers,
  which I believe makes this relevant.
- I confirmed that these drivers were all DRIVER_ATOMIC.
- When adding drm_atomic_helper_shutdown() to the remove/unbind path,
  I added it after drm_kms_helper_poll_fini() when the driver had
  it. This seemed to be what other drivers did. If
  drm_kms_helper_poll_fini() wasn't there I added it straight after
  drm_dev_unregister().
- This patch deals with drivers using the component model in similar
  ways as the patch ("drm: Call drm_atomic_helper_shutdown() at
  shutdown time for misc drivers")
- These fixes rely on the patch ("drm/atomic-helper:
  drm_atomic_helper_shutdown(NULL) should be a noop") to simplify
  shutdown.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> # tilcdc
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.5.I771eb4bd03d8772b19e7dcfaef3e2c167bce5846@changeid
2023-09-21 10:51:55 -07:00
..
hgsmi_base.c drm/vboxvideo/hgsmi_base: Place function names into headers 2021-06-03 13:33:09 +02:00
hgsmi_ch_setup.h
hgsmi_channels.h
hgsmi_defs.h
Kconfig
Makefile
modesetting.c drm/vboxvideo/modesetting: Provide function names for prototype headers 2021-06-03 13:33:18 +02:00
vbox_drv.c drm: Call drm_atomic_helper_shutdown() at shutdown/remove time for misc drivers 2023-09-21 10:51:55 -07:00
vbox_drv.h drm/vboxvideo: Use managed interfaces for framebuffer write combining 2021-09-23 09:26:09 +02:00
vbox_hgsmi.c
vbox_irq.c drm/vbox: Convert to Linux IRQ interfaces 2021-07-15 11:16:06 +02:00
vbox_main.c drm/vboxvideo: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
vbox_mode.c drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
vbox_ttm.c drm/vboxvideo: Use managed interfaces for framebuffer write combining 2021-09-23 09:26:09 +02:00
vboxvideo_guest.h
vboxvideo_vbe.h
vboxvideo.h drm/vboxvideo: fix repeated words in comments 2022-09-17 15:01:24 +02:00
vbva_base.c