linux_dsm_epyc7002/include/drm
Daniel Vetter c3b790ea07 drm: Manage drm_mode_config_init with drmm_
drm_mode_config_cleanup is idempotent, so no harm in calling this
twice. This allows us to gradually switch drivers over by removing
explicit drm_mode_config_cleanup calls.

With this step it's now also possible that (at least for simple
drivers) automatic resource cleanup can be done correctly without a
drm_driver->release hook. Therefore allow this now in
devm_drm_dev_init().

Also with drmm_ explicit drm_driver->release hooks are kinda not the
best option: Drivers can always just register their current release
hook with drmm_add_action, but even better they could split them up to
simplify the unwinding for the driver load failure case. So deprecate
that hook to discourage future users.

v2: Fixup the example in the kerneldoc too.

v3:
- For paranoia, double check that minor->dev == dev in the release
  hook, because I botched the pointer math in the drmm library.
- Call drm_mode_config_cleanup when drmm_add_action fails, we'd be
  missing some mutex_destroy and ida_cleanup otherwise (Laurent)

v4: Add a drmm_add_action_or_reset (like devm_ has) to encapsulate this
pattern (Noralf).

v5: Fix oversight in the new drmm_add_action_or_reset macro (Noralf)

v4: Review from Sam:
- drmm_mode_config_init wrapper (also suggested by Thomas)
- improve commit message, explain better why ->relase is deprecated

v5:
- Make drmm_ the main function, with the old one as compat wrapper
  (Sam)
- Add FIXME comments to drm_mode_config_cleanup/init() that drivers
  shouldn't use these anymore.
- Move drmm_add_action_or_reset helper to an earlier patch.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-27-daniel.vetter@ffwll.ch
2020-03-26 15:45:43 +01:00
..
bridge drm/bridge: synopsys: dw-hdmi: allow ycbcr420 modes for >= 0x200a 2020-03-10 10:51:24 +01:00
i2c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ttm drm/ttm: rework BO delayed delete. v2 2020-02-12 13:03:27 +01:00
amd_asic_type.h drm/amdgpu: Add a kernel parameter for specifying the asic type 2019-09-16 09:54:25 -05:00
drm_agpsupport.h drm/agp: Remove unused function drm_agp_bind_pages 2019-07-15 18:11:30 +02:00
drm_atomic_helper.h drm/bridge: Add the necessary bits to support bus format negotiation 2020-01-31 16:39:53 +01:00
drm_atomic_state_helper.h drm/bridge: Add a drm_bridge_state object 2020-01-31 16:00:21 +01:00
drm_atomic_uapi.h drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00
drm_atomic.h drm/bridge: Fix the bridge kernel doc 2020-02-18 16:50:45 +01:00
drm_audio_component.h Prep patches + headers for the mei-hdcp/i915 component interfaces 2019-02-20 11:53:48 +02:00
drm_auth.h drm: make drm/drm_auth.h self contained 2019-05-27 18:05:44 +02:00
drm_blend.h drm: Add per-plane pixel blend mode property 2018-08-24 17:31:37 +01:00
drm_bridge_connector.h drm: Add helper to create a connector for a chain of bridges 2020-02-26 13:31:41 +02:00
drm_bridge.h drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
drm_cache.h MIPS: Loongson64: Rename CPU TYPES 2019-10-31 15:03:10 -07:00
drm_client.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_color_mgmt.h drm: Inline drm_color_lut_extract() 2019-11-29 21:29:17 +02:00
drm_connector.h drm: Constify topology id 2020-03-18 17:52:36 +02:00
drm_crtc_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_crtc.h drm: Add get_vblank_timestamp() to struct drm_crtc_funcs 2020-02-13 13:08:13 +01:00
drm_damage_helper.h drm/damage-helper: Add drm_atomic_helper_damage_merged() 2019-01-17 10:56:54 +01:00
drm_debugfs_crc.h drm/crc: Only report a single overflow when a CRC fd is opened 2018-07-06 14:57:03 +02:00
drm_debugfs.h drm/debugfs: remove checks for return value of drm_debugfs functions. 2020-03-18 17:32:20 +01:00
drm_device.h drm: add managed resources tied to drm_device 2020-03-26 14:49:13 +01:00
drm_displayid.h drm/edid: Swap some operands in for_each_displayid_db() 2020-03-18 17:52:36 +02:00
drm_dp_dual_mode_helper.h
drm_dp_helper.h UAPI Changes: 2020-03-19 10:40:27 +10:00
drm_dp_mst_helper.h drm/dp_mst: Convert drm_dp_mst_topology_mgr.is_waiting_for_dwn_reply to bitfield 2020-03-13 14:52:35 -04:00
drm_drv.h drm: Garbage collect drm_dev_fini 2020-03-26 15:45:36 +01:00
drm_dsc.h drm/dsc: Split DSC PPS and SDP header initialisations 2019-03-05 13:24:34 -05:00
drm_edid.h drm/edid: Name the detailed monitor range flags 2020-03-11 13:12:38 -07:00
drm_encoder_slave.h drm: remove include of drmP.h from drm_encoder_slave.h 2019-01-09 22:35:35 +01:00
drm_encoder.h drm: Validate encoder->possible_crtcs 2020-03-18 18:38:27 +02:00
drm_fb_cma_helper.h drm/fb-cma-helpers: Fix include issue 2020-01-09 17:33:41 +01:00
drm_fb_helper.h drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions 2020-03-06 14:19:58 +01:00
drm_file.h drm: Release filp before global lock 2020-01-24 17:41:34 +00:00
drm_fixed.h
drm_flip_work.h
drm_format_helper.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
drm_fourcc.h drm/fb: Extend format_info member arrays to handle four planes 2020-01-07 13:16:08 +02:00
drm_framebuffer.h drm/core: Add drm_afbc_framebuffer and a corresponding helper 2020-03-18 11:22:05 +01:00
drm_gem_cma_helper.h drm: remove drmP.h from drm_gem_cma_helper.h 2019-01-09 22:54:08 +01:00
drm_gem_framebuffer_helper.h drm/core: Add drm_afbc_framebuffer and a corresponding helper 2020-03-18 11:22:05 +01:00
drm_gem_shmem_helper.h drm/shmem: add support for per object caching flags. 2020-02-27 13:54:38 +01:00
drm_gem_ttm_helper.h drm/ttm: add drm_gem_ttm_mmap() 2019-10-17 13:59:16 +02:00
drm_gem_vram_helper.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_gem.h drm: call drm_gem_object_funcs.mmap with fake offset 2019-12-06 11:18:11 +01:00
drm_hashtab.h
drm_hdcp.h drm/hdcp: fix DRM_HDCP_2_KSV_COUNT_2_LSBITS 2020-03-04 06:35:07 +05:30
drm_ioctl.h drm/ioctl: Ditch DRM_UNLOCKED except for the legacy vblank ioctl 2019-06-21 19:13:10 +02:00
drm_irq.h
drm_lease.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
drm_legacy.h drm: Remove the dma_alloc_coherent wrapper for internal usage 2020-02-04 23:57:26 +00:00
drm_managed.h drm: Manage drm_vblank_cleanup with drmm_ 2020-03-26 15:38:17 +01:00
drm_mipi_dbi.h drm/mipi-dbi: Make mipi_dbi_command_stackbuf() data parameter const 2020-03-21 21:17:29 +01:00
drm_mipi_dsi.h drm/dsi: add helpers for DSI compression mode and PPS packets 2019-11-07 15:00:16 +02:00
drm_mm.h drm/mm: Allow drm_mm_initialized() to be used outside of the locks 2020-03-16 10:31:21 +00:00
drm_mode_config.h drm: Manage drm_mode_config_init with drmm_ 2020-03-26 15:45:43 +01:00
drm_mode_object.h drm: remove drm_mode_object_{un/reference} aliases 2018-03-19 09:09:46 -04:00
drm_modes.h drm: drop unused drm_display_mode.private 2020-02-15 21:15:46 +01:00
drm_modeset_helper_vtables.h drm: drop unused drm_crtc callback 2020-02-15 21:15:17 +01:00
drm_modeset_helper.h drm: remove drmP.h from drm_modeset_helper.h 2019-02-07 21:48:34 +01:00
drm_modeset_lock.h drm: Add drm_modeset_lock_assert_held() 2019-09-19 21:37:59 +03:00
drm_of.h drm: of: Fix linking when CONFIG_OF is not set 2020-01-09 10:40:58 +10:00
drm_panel.h drm/drm_panel: fix export of drm_panel_of_backlight, try #3 2020-01-12 21:16:30 +01:00
drm_pci.h drm/pci: Unexport drm_get_pci_dev 2020-03-06 16:08:24 +01:00
drm_pciids.h drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
drm_plane_helper.h drm: Unexport drm_plane_helper_check_update 2018-10-05 22:45:19 +02:00
drm_plane.h drm/plane: Clarify our expectations for src/dst rectangles 2019-10-10 15:49:34 +02:00
drm_prime.h drm/prime: Remove duplicate forward declaration 2019-09-16 17:32:51 +02:00
drm_print.h drm: add managed resources tied to drm_device 2020-03-26 14:49:13 +01:00
drm_probe_helper.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
drm_property.h drm: Fix kernel doc for DRM_MODE_PROP_IMMUTABLE 2018-10-03 13:05:12 -07:00
drm_rect.h drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00
drm_scdc_helper.h drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS 2019-11-04 17:58:46 +01:00
drm_self_refresh_helper.h drm/atomic: fix self-refresh helpers crtc state dereference 2019-11-06 13:00:21 -05:00
drm_simple_kms_helper.h drm/simple-kms: Add drm_simple_encoder_{init,create}() 2020-03-02 09:22:35 +01:00
drm_syncobj.h drm/syncobj: add new drm_syncobj_add_point interface v4 2019-04-01 12:05:53 +02:00
drm_sysfs.h drm: uevent for connector status change 2019-08-06 13:16:54 +05:30
drm_util.h drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig 2019-11-07 21:22:15 +00:00
drm_utils.h drm: export drm_timeout_abs_to_jiffies 2019-03-07 12:00:30 -06:00
drm_vblank.h drm: Remove legacy version of get_scanout_position() 2020-02-13 13:10:10 +01:00
drm_vma_manager.h drm: increase drm mmap_range size to 1TB 2019-04-24 16:20:23 -05:00
drm_writeback.h drm: writeback: Add job prepare and cleanup operations 2019-03-18 17:24:38 +02:00
gma_drm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
gpu_scheduler.h drm/sched: implement and export drm_sched_pick_best 2020-03-16 16:21:32 -04:00
i915_component.h drm/i915/tgl: Add additional ports for Tiger Lake 2019-07-11 16:31:14 -07:00
i915_drm.h drm: Move port definition back to i915 header 2019-08-30 14:08:26 +05:30
i915_mei_hdcp_interface.h drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_pciids.h drm/i915/cml: Separate U series pci id from origianl list. 2019-12-12 22:15:16 +02:00
intel_lpe_audio.h
intel-gtt.h drm: include kernel.h and agp_backend.h from intel-gtt.h 2019-01-02 11:37:47 +02:00
spsc_queue.h drm: move amd_gpu_scheduler into common location 2017-12-07 11:51:56 -05:00
task_barrier.h drm: Add Reusable task barrier. 2019-12-18 16:09:12 -05:00