linux-bl808/drivers/gpu/drm/arm/display/komeda
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
..
d71 drm/komeda: Add event handling for EMPTY/FULL 2019-12-27 11:38:44 +08:00
komeda_color_mgmt.c drm/komeda: Add drm_ctm_to_coeffs() 2019-11-14 10:31:27 +08:00
komeda_color_mgmt.h drm/komeda: Add drm_ctm_to_coeffs() 2019-11-14 10:31:27 +08:00
komeda_crtc.c drm/komeda: Add runtime_pm support 2019-12-27 13:45:44 +08:00
komeda_dev.c drm/komeda: Add runtime_pm support 2019-12-27 13:45:44 +08:00
komeda_dev.h drm/komeda: Add event handling for EMPTY/FULL 2019-12-27 11:38:44 +08:00
komeda_drv.c drm/komeda: mark PM functions as __maybe_unused 2020-03-06 11:25:58 +08:00
komeda_event.c drm/komeda: Add event handling for EMPTY/FULL 2019-12-27 11:38:44 +08:00
komeda_format_caps.c
komeda_format_caps.h
komeda_framebuffer.c
komeda_framebuffer.h
komeda_kms.c drm/komeda: use devm_drm_dev_alloc 2020-04-28 16:04:00 +02:00
komeda_kms.h
komeda_pipeline.c
komeda_pipeline.h drm/komeda: Adds gamma and color-transform support for DOU-IPS 2019-11-14 10:39:00 +08:00
komeda_pipeline_state.c drm-misc-next for v5.6: 2019-12-17 13:57:54 +01:00
komeda_plane.c
komeda_private_obj.c
komeda_wb_connector.c
Makefile drm/komeda: Remove CONFIG_KOMEDA_ERROR_PRINT 2019-11-12 11:46:29 +00:00