[Freedreno] [PATCH v2 00/13] drm/msm/dpu: use managed memory allocations
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Fri Jul 7 23:12:38 UTC 2023
Please excuse me for sending v2 on the same day, it fixes erorr paths
for drmm allocation code.
In a lots of places in DPU driver memory is allocated by using the
kzalloc and then manually freed using kfree. However thes memory chunks
have a well-defined life cycle. They are either a part of the driver's
runtime and can be devm_kzalloc'ed or are exposed to userspace via the
DRM objects and thus can be drmm_alloc'ed. Implement corresponding
runtime resource manangement for the DPU driver.
Dependencies: [1].
[1] https://patchwork.freedesktop.org/series/118839/
Changes since v1:
- Fix error handling for some of drmm_foo_alloc() functions, which
return error pointer in case of an error rather than typical NULL.
Dmitry Baryshkov (13):
drm/msm/dpu: cleanup dpu_kms_hw_init error path
drm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error
handling
drm/msm/dpu: use devres-managed allocation for interrupts data
drm/msm/dpu: use devres-managed allocation for VBIF data
drm/msm/dpu: use devres-managed allocation for MDP TOP
drm/msm/dpu: use devres-managed allocation for HW blocks
drm/msm/dpu: drop unused dpu_plane::lock
drm/msm/dpu: remove QoS teardown on plane destruction
drm/msm/dpu: use drmm-managed allocation for dpu_plane
drm/msm/dpu: use drmm-managed allocation for dpu_crtc
drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys
drm/msm/dpu: drop dpu_encoder_phys_ops::destroy
drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 25 ++----
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 77 ++++------------
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 10 +--
.../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 15 +---
.../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 13 +--
.../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 21 +----
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 19 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 16 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 12 ++-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 10 ++-
.../gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c | 7 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 16 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | 12 +--
.../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 14 ++-
.../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 11 +--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 15 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 12 +--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 14 ++-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h | 12 +--
.../gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 14 ++-
.../gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.h | 13 +--
.../gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 14 ++-
.../gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 13 +--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 15 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 7 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 17 ++--
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h | 8 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 14 ++-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h | 8 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 14 ++-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h | 12 +--
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 51 ++++-------
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 -
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 59 +++---------
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 90 +++----------------
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 11 +--
36 files changed, 216 insertions(+), 476 deletions(-)
--
2.39.2
More information about the Freedreno
mailing list