WSL2-Linux-Kernel/drivers/gpu/drm/arm
Daniel Vetter 843ef624a4 drm/komeda: use devm_drm_dev_alloc
Komeda uses the component framework, which does open/close a new
devres group around all the bind callbacks. Which means we can use
devm_ functions for managing the drm_device cleanup, with leaking
stuff in case of deferred probes or other reasons to unbind
components, or the component_master.

Also note that this fixes a double-free in the probe unroll code, bot
drm_dev_put and kfree(kms) result in the kms allocation getting freed.

Aside: komeda_bind could be cleaned up a lot, devm_kfree is a bit
redundant. Plus I'm not clear on why there's suballocations for
mdrv->mdev and mdrv->kms. Plus I'm not sure the lifetimes are correct
with all that devm_kzalloc usage ... That structure layout is also the
reason why komeda still uses drm_device->dev_private and can't easily
be replaced with a proper container_of upcasting. I'm pretty sure that
there's endless amounts of hotunplug/hotremove bugs in there with all
the unprotected dereferencing of drm_device->dev_private.

Reviewed-by: James Qian Wang <james.qian.wang@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mihail Atanassov <mihail.atanassov@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-33-daniel.vetter@ffwll.ch
2020-04-28 16:04:00 +02:00
..
display drm/komeda: use devm_drm_dev_alloc 2020-04-28 16:04:00 +02:00
Kconfig drm/komeda: komeda_dev/pipeline/component definition and initialzation 2019-01-14 11:09:23 +00:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
hdlcd_crtc.c drm/arm: drop use of drmP.h 2019-08-14 18:31:15 +02:00
hdlcd_drv.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
hdlcd_drv.h drm/arm/hdlcd: Use drm_fb_cma_fbdev_init/fini() 2018-07-31 16:31:50 +01:00
hdlcd_regs.h
malidp_crtc.c drm/arm: drop use of drmP.h 2019-08-14 18:31:15 +02:00
malidp_drv.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
malidp_drv.h drm/arm: drop use of drmP.h 2019-08-14 18:31:15 +02:00
malidp_hw.c drm/arm/mali-dp: Add display QoS interface configuration for Mali DP500 2019-10-08 16:13:36 +01:00
malidp_hw.h drm/arm/mali-dp: Add display QoS interface configuration for Mali DP500 2019-10-08 16:13:36 +01:00
malidp_mw.c drm/arm/mali: make malidp_mw_connector_helper_funcs static 2019-12-20 15:23:51 +00:00
malidp_mw.h drm: mali-dp: Add writeback connector 2018-07-05 15:19:03 +01:00
malidp_planes.c drm/malidp: plane_state->fb iff plane_state->crtc 2019-12-17 17:26:08 +01:00
malidp_regs.h drm/arm/mali-dp: Add display QoS interface configuration for Mali DP500 2019-10-08 16:13:36 +01:00