linux/drivers/gpu/drm
Daniel Vetter f96306f989 drm: manage drm_minor cleanup with drmm_
The cleanup here is somewhat tricky, since we can't tell apart the
allocated minor index from 0. So register a cleanup action first, and
if the index allocation fails, unregister that cleanup action again to
avoid bad mistakes.

The kdev for the minor already handles NULL, so no problem there.

Hence add drmm_remove_action() to the drm_managed library.

v2: Make pointer math around void ** consistent with what Laurent
suggested.

v3: Use drmm_add_action_or_reset and remove drmm_remove_action. Noticed
because of some questions from Thomas. This also means we need to move
the drmm_add_action_or_reset helper earlier in the series.

v4: Uh ... fix slightly embarrassing bug CI spotted.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200324203936.3330994-1-daniel.vetter@ffwll.ch
2020-03-26 15:37:31 +01:00
..
amd Merge tag 'amd-drm-next-5.7-2020-03-19' of git://people.freedesktop.org/~agd5f/linux into drm-next 2020-03-20 12:54:51 +10:00
arc drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
arm drm/<drivers>: Use drmm_add_final_kfree 2020-03-26 15:26:52 +01:00
armada drm/<drivers>: Use drmm_add_final_kfree 2020-03-26 15:26:52 +01:00
aspeed
ast drm/ast: Use simple encoder 2020-03-02 09:22:43 +01:00
atmel-hlcdc drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
bochs drm/bochs: add drm_driver.release callback. 2020-02-12 10:24:08 +01:00
bridge drm/bridge: dw-hdmi: rework csc related functions 2020-03-24 21:14:38 +01:00
cirrus drm/cirrus: Use drmm_add_final_kfree 2020-03-26 15:18:06 +01:00
etnaviv Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2020-03-26 15:11:04 +01:00
exynos drm/exynos: Use mode->clock instead of reverse calculating it from the vrefresh 2020-03-18 12:11:44 +09:00
fsl-dcu drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
gma500 drm/gma500: Sanitize possible_clones 2020-03-18 18:38:27 +02:00
hisilicon drm/hisilicon: Drop unused #include 2020-03-18 14:28:11 +01:00
i2c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
i810 drm/i810: Don't include <drm/drm_pci.h> 2019-12-05 08:44:12 +01:00
i915 drm/i915: Use drmm_add_final_kfree 2020-03-26 15:17:43 +01:00
imx drm/imx: Remove the bogus possible_clones setup 2020-03-18 18:38:27 +02:00
ingenic drm/ingenic: Use drmm_add_final_kfree 2020-03-26 15:26:52 +01:00
lib
lima drm/lima: add trace point for tasks 2020-03-22 09:57:21 +08:00
mcde drm/mcde: Use drmm_add_final_kfree 2020-03-26 15:26:29 +01:00
mediatek Mediatek DRM Next for Linux 5.7 2020-03-20 13:08:38 +10:00
meson drm/meson: Add YUV420 output support 2020-03-10 10:51:24 +01:00
mga drm/mga: Don't include <drm/drm_pci.h> 2019-12-05 08:44:16 +01:00
mgag200 drm/mgag200: Use simple encoder 2020-03-02 09:22:49 +01:00
msm drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
mxsfb drm/panel: decouple connector from drm_panel 2019-12-09 22:57:26 +01:00
nouveau drm-misc-next for 5.7: 2020-03-19 11:01:58 +10:00
omapdrm drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
panel drm/panel-simple: Fix dotclock for Logic PD Type 28 2020-03-11 16:42:32 +02:00
panfrost drm-misc-next for 5.7: 2020-03-12 12:42:56 +10:00
pl111 drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
qxl drm/qxl: Use drmm_add_final_kfree 2020-03-26 14:50:05 +01:00
r128 drm/r128: Don't include <drm/drm_pci.h> 2019-12-05 08:44:23 +01:00
radeon drm: Remove drm dp mst destroy_connector callbacks 2020-03-11 16:53:17 -04:00
rcar-du drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
rockchip drm/rockchip: Add support for afbc 2020-03-23 12:45:26 +01:00
savage drm/savage: Don't include <drm/drm_pci.h> 2019-12-05 08:44:34 +01:00
scheduler drm/sched: implement and export drm_sched_pick_best 2020-03-16 16:21:32 -04:00
selftests drm/modes: Make sure to parse valid rotation value from cmdline 2020-02-12 18:32:54 +01:00
shmobile
sis drm/sis: Don't include <drm/drm_pci.h> 2019-12-05 08:44:55 +01:00
sti drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
stm drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
sun4i drm/sun4i: Sort includes in VI and UI layer code 2020-03-24 21:13:35 +01:00
tdfx drm/tdfx: Don't include <drm/drm_pci.h> 2019-12-05 08:45:01 +01:00
tegra Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2020-03-26 15:11:04 +01:00
tidss drm/tidss: Use drmm_add_final_kfree 2020-03-26 15:18:17 +01:00
tilcdc drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
tiny drm/gm12u320: Use drmm_add_final_kfree 2020-03-26 15:26:52 +01:00
ttm drm-misc-next for 5.7: 2020-03-19 11:01:58 +10:00
tve200 drm: get drm_bridge_panel connector via helper 2019-12-09 22:57:26 +01:00
udl drm/udl: Use drmm_add_final_kfree 2020-03-26 14:49:58 +01:00
v3d drm/v3d: Use drmm_add_final_kfree 2020-03-26 15:18:11 +01:00
vboxvideo drm/<drivers>: Use drmm_add_final_kfree 2020-03-26 15:26:52 +01:00
vc4 drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
vgem drm/vgem: Use drmm_add_final_kfree 2020-03-26 15:26:51 +01:00
via Merge branch 'akpm' (patches from Andrew) 2020-01-31 12:16:36 -08:00
virtio drm/virtio: fix OOB in virtio_gpu_object_create 2020-03-19 12:00:24 +01:00
vkms drm/vkms: Use drmm_add_final_kfree 2020-03-26 15:26:51 +01:00
vmwgfx drm/vmwgfx: Use vmwgfx version 2.18 to signal SM5 compatibility 2020-03-23 22:48:57 +01:00
xen drm: Set final_kfree in drm_dev_alloc 2020-03-26 14:49:37 +01:00
zte drm/zte: plane_state->fb iff plane_state->crtc 2020-01-28 15:43:58 +01:00
drm_agpsupport.c drm: use DIV_ROUND_UP helper macro for calculations 2019-11-04 18:17:36 +01:00
drm_atomic_helper.c drm/bridge: Add the necessary bits to support bus format negotiation 2020-01-31 16:39:53 +01:00
drm_atomic_state_helper.c drm/atomic-helper: fix kerneldoc 2020-02-15 13:21:22 +01:00
drm_atomic_uapi.c drm/atomic: Spell CRTC consistently 2019-12-22 11:13:00 +01:00
drm_atomic.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_auth.c drm/auth: Drop master_create/destroy hooks 2020-01-29 09:14:11 +01:00
drm_blend.c
drm_bridge_connector.c drm: Add helper to create a connector for a chain of bridges 2020-02-26 13:31:41 +02:00
drm_bridge.c drm: Add helper to create a connector for a chain of bridges 2020-02-26 13:31:41 +02:00
drm_bufs.c drm: bufs: Clean up documentation 2020-03-16 09:26:18 +01:00
drm_cache.c
drm_client_modeset.c Linux 5.6-rc5 2020-03-11 07:27:21 +10:00
drm_client.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_color_mgmt.c drm: Inline drm_color_lut_extract() 2019-11-29 21:29:17 +02:00
drm_connector.c drm/edid: Fix DispID tile parsing for override EDID 2020-03-18 17:52:36 +02:00
drm_context.c drm: context: Clean up documentation 2020-03-16 09:23:55 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: drop unused drm_crtc callback 2020-02-15 21:15:17 +01:00
drm_crtc_internal.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c drm/crc: Actually allow to change the crc source 2020-01-28 16:49:22 +01:00
drm_debugfs.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_dma.c drm: fix parameters documentation style in drm_dma 2020-01-18 10:33:12 +01:00
drm_dp_aux_dev.c drm/dp_mst: Add MST support to DP DPCD R/W functions 2020-01-09 18:07:46 -05:00
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c UAPI Changes: 2020-03-19 10:40:27 +10:00
drm_dp_mst_topology_internal.h
drm_dp_mst_topology.c drm-misc-next for 5.7: 2020-03-19 11:01:58 +10:00
drm_drv.c drm: manage drm_minor cleanup with drmm_ 2020-03-26 15:37:31 +01:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Fix DispID tile parsing for override EDID 2020-03-18 17:52:36 +02:00
drm_encoder_slave.c
drm_encoder.c drm/bridge: Make the bridge chain a double-linked list 2019-12-09 10:03:01 +01:00
drm_fb_cma_helper.c drm/fb-cma-helpers: Fix include issue 2020-01-09 17:33:41 +01:00
drm_fb_helper.c drm: Remove unused arg from drm_fb_helper_init 2020-03-06 14:19:57 +01:00
drm_file.c drm: Nerf drm_global_mutex BKL for good drivers 2020-02-11 15:03:09 +01:00
drm_flip_work.c
drm_format_helper.c drm/format_helper: Dual licence the file in GPL 2 and MIT 2020-02-17 10:27:13 +01:00
drm_fourcc.c drm/fourcc: Fill out all block sizes for P210 2019-11-28 11:19:32 +01:00
drm_framebuffer.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c drm/core: Add drm_afbc_framebuffer and a corresponding helper 2020-03-18 11:22:05 +01:00
drm_gem_shmem_helper.c drm/shmem: drop pgprot_decrypted() 2020-03-02 07:13:19 +01:00
drm_gem_ttm_helper.c drm/ttm: fix mmap refcounting 2019-11-15 08:00:08 +01:00
drm_gem_vram_helper.c drm/vram-helper: remove unneeded #if defined/endif guards. 2020-03-23 15:56:59 +01:00
drm_gem.c drm: Correct a typo in a function comment 2020-03-18 14:50:08 +01:00
drm_hashtab.c
drm_hdcp.c drm/hdcp: optimizing the srm handling 2020-03-04 06:33:00 +05:30
drm_internal.h drm: add managed resources tied to drm_device 2020-03-26 14:49:13 +01:00
drm_ioc32.c
drm_ioctl.c drm: Add getfb2 ioctl 2020-01-14 16:22:17 -05:00
drm_irq.c drm/irq: remove check on dev->dev_private 2020-02-11 18:39:47 +02:00
drm_kms_helper_common.c
drm_lease.c
drm_legacy_misc.c
drm_legacy.h
drm_lock.c drm: lock: Clean up documentation 2020-03-16 09:27:09 +01:00
drm_managed.c drm: manage drm_minor cleanup with drmm_ 2020-03-26 15:37:31 +01:00
drm_memory.c
drm_mipi_dbi.c drm/mipi_dbi: Use drmm_add_final_kfree in all drivers 2020-03-26 14:49:51 +01:00
drm_mipi_dsi.c drm/dsi: add helpers for DSI compression mode and PPS packets 2019-11-07 15:00:16 +02:00
drm_mm.c drm/mm: Remove redundant assignment in drm_mm_reserve_node 2020-03-10 10:25:07 +00:00
drm_mode_config.c drm: Skip drm_mode_config_validate() for !modeset 2020-03-18 20:37:22 +02:00
drm_mode_object.c drm/property: Enforce more lifetime rules 2019-11-04 18:17:36 +01:00
drm_modes.c drm/modes: Make sure to parse valid rotation value from cmdline 2020-02-12 18:32:54 +01:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm: of: Add drm_of_lvds_get_dual_link_pixel_order 2019-12-18 02:40:16 +02:00
drm_panel_orientation_quirks.c
drm_panel.c drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time 2019-12-17 20:39:33 +01:00
drm_pci.c drm: Make drm_pci_agp_init legacy 2020-03-09 09:22:50 +00:00
drm_plane_helper.c
drm_plane.c
drm_prime.c drm: share address space for dma bufs 2019-12-06 11:18:11 +01:00
drm_print.c drm/print: convert debug category macros into an enum 2019-11-14 14:08:57 +02:00
drm_probe_helper.c drm: Stop accessing encoder->bridge directly 2019-12-09 10:02:45 +01:00
drm_property.c drm: limit to INT_MAX in create_blob ioctl 2019-12-04 19:44:13 -08:00
drm_rect.c drm/rect: update kerneldoc for drm_rect_clip_scaled() 2019-11-28 13:15:43 +01:00
drm_scatter.c drm: prevent a harmless integer overflow in drm_legacy_sg_alloc() 2020-02-29 00:16:12 +01:00
drm_scdc_helper.c
drm_self_refresh_helper.c drm/atomic: fix self-refresh helpers crtc state dereference 2019-11-06 13:00:21 -05:00
drm_simple_kms_helper.c drm/simple-kms: Fix documentation for drm_simple_encoder_init() 2020-03-06 09:24:29 +01:00
drm_syncobj.c drm/syncobj: Add documentation for timeline syncobj 2020-01-20 14:22:21 +01:00
drm_sysfs.c drm: sysfs: Use scnprintf() for avoiding potential buffer overflow 2020-03-11 14:54:09 +01:00
drm_trace_points.c
drm_trace.h
drm_vblank.c drm/vblank: Fix documentation of VBLANK timestamp helper 2020-03-06 09:24:54 +01:00
drm_vm.c drm: drm_vm: Use fallthrough; 2020-03-18 14:48:34 +01:00
drm_vma_manager.c
drm_vram_helper_common.c
drm_writeback.c
Kconfig drm: unbreak the DRM menu, broken by DRM_EXPORT_FOR_TESTS 2020-03-06 11:15:43 +00:00
Makefile drm: add managed resources tied to drm_device 2020-03-26 14:49:13 +01:00