linux-stable/Documentation
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
..
ABI xen: branch for v5.6-rc1 2020-02-05 17:44:14 +00:00
accounting
admin-guide Merge branch 'acpi-doc' 2020-03-06 10:57:46 +01:00
arm ARM: at91: Documentation: add sam9x60 product and datasheet 2020-01-10 23:40:31 +01:00
arm64 mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() 2020-02-20 10:03:14 +00:00
block docs: block/biovecs: update the location of bio.c 2020-01-10 10:23:15 -07:00
bpf
cdrom
core-api mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
cpu-freq
crypto crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
dev-tools Documentation: kunit: fixed sphinx error in code block 2020-02-10 17:16:42 -07:00
devicetree Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2020-03-26 15:11:04 +01:00
doc-guide Documentation: build warnings related to missing blank lines after explicit markups has been fixed 2020-02-05 10:30:03 -07:00
driver-api dmaengine fixes for v5.6-rc5 2020-03-05 12:19:34 -06:00
EDID
fault-injection
fb fbdev: fbmem: allow overriding the number of bootup logos 2020-01-03 14:27:40 +01:00
features s390 updates for the 5.6 merge window #2 2020-02-05 17:33:35 +00:00
filesystems Driver core / debugfs fixes for 5.6-rc5 2020-03-08 10:39:40 -05:00
firmware-guide docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan() 2019-12-19 22:58:12 +01:00
firmware_class
fpga
gpu drm: Manage drm_mode_config_init with drmm_ 2020-03-26 15:45:43 +01:00
hid
hwmon docs: adm1177: fix a broken reference 2020-02-23 20:00:29 -08:00
i2c docs: i2c: writing-clients: properly name the stop condition 2020-01-29 22:02:09 +01:00
ia64
ide
iio
infiniband
input
isdn
kbuild kbuild: get rid of trailing slash from subdir- example 2020-02-27 10:03:27 +09:00
kernel-hacking Documentation: kernel-hacking: hacking.rst: Change reference to document namespaces.rst to symbol-namespaces.rst 2019-12-19 09:36:23 -07:00
leds
livepatch
locking docs/locking: Fix outdated section names 2020-02-05 10:21:12 -07:00
m68k
maintainer Add a maintainer entry profile for documentation 2020-01-24 09:48:39 -07:00
media media updates for v5.6-rc1 2020-01-31 14:43:23 -08:00
mic
mips
misc-devices Documentation: fix Sphinx warning in xilinx_sdfec.rst 2019-12-19 09:26:25 -07:00
netlabel
networking docs: networking: phy: Rephrase paragraph for clarity 2020-02-23 20:42:47 -08:00
nios2
nvdimm docs: nvdimm: use ReST notation for subsection 2020-01-24 09:54:42 -07:00
openrisc
parisc
PCI Documentation: PCI: Fix pci_alloc_irq_vectors() function name typo 2019-12-30 08:21:29 -06:00
pcmcia
power Documentation: power: Drop reference to interface.rst 2020-02-20 11:50:59 +01:00
powerpc powerpc updates for 5.6 2020-02-04 13:06:46 +00:00
process Documentation/process: Swap out the ambassador for Canonical 2020-02-13 15:38:41 -08:00
RCU Merge branches 'doc.2019.12.10a', 'exp.2019.12.09a', 'fixes.2020.01.24a', 'kfree_rcu.2020.01.24a', 'list.2020.01.10a', 'preempt.2020.01.24a' and 'torture.2019.12.09a' into HEAD 2020-01-24 10:37:27 -08:00
riscv It has been a relatively quiet cycle for documentation, but there's still a 2020-01-29 15:27:31 -08:00
s390
scheduler
scsi
security
sh
sound sound updates for 5.6-rc1 2020-01-28 16:26:57 -08:00
sparc
sphinx docs: Fix empty parallelism argument 2020-02-25 03:11:04 -07:00
sphinx-static
spi
target
timers
trace A handful of small documentation fixes that wandered in. 2020-02-07 13:03:10 -08:00
translations Documentation/process: Swap out the ambassador for Canonical 2020-02-13 15:38:41 -08:00
usb docs: usb: remove some broken references 2020-01-28 13:41:22 -07:00
userspace-api
virt KVM: s390: rstify new ioctls in api.rst 2020-02-24 19:28:40 +01:00
vm mm/zswap.c: add allocation hysteresis if pool limit is hit 2020-01-31 10:30:39 -08:00
w1 docs: w1: Fix a typo in omap-hdq.rst 2019-12-30 11:58:02 -07:00
watchdog
x86 docs: remove MPX from the x86 toc 2020-02-25 03:10:22 -07:00
xtensa
.gitignore
asm-annotations.rst Documentation: Call out example SYM_FUNC_* usage as x86-specific 2020-01-16 12:53:16 -07:00
atomic_bitops.txt
atomic_t.txt
bus-virt-phys-mapping.txt
Changes
CodingStyle
conf.py
COPYING-logo
crc32.txt
debugging-modules.txt
debugging-via-ohci1394.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff
futex-requeue-pi.txt
hwspinlock.txt
index.rst
io-mapping.txt
io_ordering.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
Kconfig
kobject.txt
kprobes.txt
kref.txt
logo.gif
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt smp_mb__{before,after}_atomic(): update Documentation 2020-02-04 03:05:23 +00:00
nommu-mmap.txt
percpu-rw-semaphore.txt
pi-futex.txt
preempt-locking.txt
rbtree.txt
remoteproc.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
speculation.txt
static-keys.txt
SubmittingPatches
tee.txt Documentation: tee: add AMD-TEE driver details 2020-01-04 13:49:51 +08:00
this_cpu_ops.txt
unaligned-memory-access.txt
xz.txt