[PATCH v7 0/9] v7 drm: writeback: clean up writeback connector initialization

John Harrison <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Drivers using drm_writeback_connector_init() / _with_encoder() don't
perform cleanup in a manner similar to drmm_writeback_connector_init()
(see drm_writeback_connector_cleanup()). Migrate all existing drivers
to use drmm_writeback_connector_init(), drop
drm_writeback_connector_init() and drm_writeback_connector::encoder
(it's unused afterwards).

This series leaves former drm_writeback_connector_init_with_encoder()
(renamed to drm_writeback_connector_init as a non-managed counterpart
for drmm_writeback_connector_init()). It is supposed to be used by
drivers which can not use drmm functions (like Intel). However I think
it would be better to drop it completely.

NB: Patch set written by Dmitry B but taken over by John H at v7 due to
time pressures.

---
Changes in v7 (by John Harrison):
- Fix missing parameter in drmm_kfree
- Fix leaking error paths
- Fix kernel docs
- Add typecast to drmm_zalloc_obj(s)
- Drop extra obsolete cleanup call in vc4

Changes in v6:
- Dropped applied patch
- Implemented suggestion by Alex to use drmm allocation for the
  writeback connector.
- Link to v5: https://patch.msgid.link/[email protected]

Changes in v5:
- Rebased on top of drm-misc-next
- Expanded commit message for msm patch, describing devm vs drmm issues (Laurent)
- Expanded commit messages, describing why the drivers are converted to
  drmm_writeback_connector_init() (Laurent)
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Rebase on top of drm-misc-next, dropping applied patch.
- Added a note regarding memory leak in the AMDGPU driver.
- Fixed a devm vs drmm issue in the msm/dpu driver.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Fixed subject prefix for the rcar-du patch (Jessica Zhang)
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Switched to drm_crtc_mask() where applicable (Louis Chauvet)
- Link to v1: https://lore.kernel.org/r/[email protected]

To: Maarten Lankhorst <[email protected]>
To: Maxime Ripard <[email protected]>
To: Thomas Zimmermann <[email protected]>
To: David Airlie <[email protected]>
To: Simona Vetter <[email protected]>
To: Harry Wentland <[email protected]>
To: Leo Li <[email protected]>
To: Rodrigo Siqueira <[email protected]>
To: Alex Deucher <[email protected]>
To: Christian König <[email protected]>
To: Liviu Dudau <[email protected]>
To: Laurent Pinchart <[email protected]>
To: Tomi Valkeinen <[email protected]>
To: Kieran Bingham <[email protected]>
To: Geert Uytterhoeven <[email protected]>
To: Magnus Damm <[email protected]>
To: Dave Stevenson <[email protected]>
To: Maíra Canal <[email protected]>
To: Raspberry Pi Kernel Maintenance <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

Dmitry Baryshkov (9):
  drm/managed: implement managed versions of kzalloc_obj/objs()
  drm/amd/display: use drmm allocation for writeback connector
  drm/amd/display: use drmm_writeback_connector_init()
  drm/komeda: use drmm_writeback_connector_init()
  drm/mali: use drmm_writeback_connector_init()
  drm: renesas: rcar-du: use drmm_writeback_connector_init()
  drm/vc4: use drmm_writeback_connector_init()
  drm: writeback: drop excess connector initialization functions
  drm: writeback: rename drm_writeback_connector_init_with_encoder()

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  7 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c  | 18 +++--
 .../arm/display/komeda/komeda_wb_connector.c  | 37 ++++++----
 drivers/gpu/drm/arm/malidp_mw.c               | 26 ++++---
 drivers/gpu/drm/drm_writeback.c               | 71 +++----------------
 .../drm/renesas/rcar-du/rcar_du_writeback.c   | 22 ++++--
 drivers/gpu/drm/vc4/vc4_txp.c                 | 18 ++---
 include/drm/drm_managed.h                     | 23 ++++++
 include/drm/drm_writeback.h                   | 22 +-----
 9 files changed, 106 insertions(+), 138 deletions(-)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.