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. --- 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() drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 18 ++++-- .../drm/arm/display/komeda/komeda_wb_connector.c | 30 ++++++---- drivers/gpu/drm/arm/malidp_mw.c | 25 ++++---- drivers/gpu/drm/drm_writeback.c | 69 +++------------------- .../gpu/drm/renesas/rcar-du/rcar_du_writeback.c | 22 ++++--- drivers/gpu/drm/vc4/vc4_txp.c | 9 ++- include/drm/drm_managed.h | 22 +++++++ include/drm/drm_writeback.h | 22 +------ 9 files changed, 98 insertions(+), 126 deletions(-) --- base-commit: 2afdfc658f7a7e9ee2a67ec6663922da9c799c53 change-id: 20250801-wb-drop-encoder-97a0c75bd5d7 Best regards, -- With best wishes Dmitry
