From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"John Harrison" <John.Harrison@igalia.com>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
"Louis Chauvet" <louis.chauvet@bootlin.com>,
"Mihail Atanassov" <mihail.atanassov@arm.com>,
"Eric Anholt" <eric@anholt.net>,
"Rob Clark" <robin.clark@oss.qualcomm.com>,
"Brian Starkey" <brian.starkey@arm.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org
Subject: [PATCH v7 9/9] drm: writeback: drop the drmm writeback cleanup action
Date: Mon, 19 Oct 2026 16:12:35 +0300 [thread overview]
Message-ID: <20261019-wb-drop-encoder-v7-9-d4288a26eb54@oss.qualcomm.com> (raw)
In-Reply-To: <20261019-wb-drop-encoder-v7-0-d4288a26eb54@oss.qualcomm.com>
drmm_connector_init() already registers drm_connector_cleanup() as a
managed action, and that now cleans up the writeback state too. The
extra action registered by drmm_writeback_connector_init() just does the
same work a little earlier, leaving drm_connector_cleanup() nothing to
do. Drop it.
Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/drm_writeback.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
index 272012a70efe..0c5d2fbe7a7c 100644
--- a/drivers/gpu/drm/drm_writeback.c
+++ b/drivers/gpu/drm/drm_writeback.c
@@ -16,7 +16,6 @@
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
#include <drm/drm_framebuffer.h>
-#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_property.h>
#include <drm/drm_writeback.h>
@@ -303,14 +302,6 @@ void drm_writeback_connector_cleanup(struct drm_connector *connector)
spin_unlock_irqrestore(&wb_connector->job_lock, flags);
}
-static void drm_writeback_connector_cleanup_action(struct drm_device *dev,
- void *data)
-{
- struct drm_writeback_connector *wb_connector = data;
-
- drm_writeback_connector_cleanup(&wb_connector->base);
-}
-
/**
* drmm_writeback_connector_init - Initialize a writeback connector
*
@@ -321,7 +312,8 @@ static void drm_writeback_connector_cleanup_action(struct drm_device *dev,
* @formats: Array of supported pixel formats for the writeback engine
* @n_formats: Length of the formats array
*
- * This function initialize a writeback connector and register its cleanup.
+ * This function initializes a writeback connector. Cleanup is automatically
+ * handled with a call to drm_connector_cleanup() in a DRM-managed action.
*
* This function creates the writeback-connector-specific properties if they
* have not been already created, initializes the connector as
@@ -344,17 +336,8 @@ int drmm_writeback_connector_init(struct drm_device *dev,
if (ret)
return ret;
- ret = __drm_writeback_connector_init(dev, wb_connector, enc, formats,
- n_formats);
- if (ret)
- return ret;
-
- ret = drmm_add_action_or_reset(dev, drm_writeback_connector_cleanup_action,
- wb_connector);
- if (ret)
- return ret;
-
- return 0;
+ return __drm_writeback_connector_init(dev, wb_connector, enc, formats,
+ n_formats);
}
EXPORT_SYMBOL(drmm_writeback_connector_init);
--
2.47.3
next prev parent reply other threads:[~2026-10-19 13:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 13:12 [PATCH v7 0/9] drm: writeback: clean up writeback connector initialization Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 1/9] drm/amd/display: embed the writeback encoder in amdgpu_dm_wb_connector Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 2/9] drm/komeda: embed the writeback encoder in komeda_wb_connector Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 3/9] drm/mali: embed the writeback encoder in malidp_drm Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 4/9] drm: renesas: rcar-du: embed the writeback encoder in rcar_du_crtc Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 5/9] drm: writeback: drop excess connector initialization functions Dmitry Baryshkov
2026-10-19 13:12 ` [PATCH v7 6/9] drm: writeback: rename drm_writeback_connector_init_with_encoder() Dmitry Baryshkov
2026-10-20 1:22 ` Chaoyi Chen
2026-10-19 13:12 ` [PATCH v7 7/9] drm: writeback: don't destroy the shared writeback properties Dmitry Baryshkov
2026-10-20 1:28 ` Chaoyi Chen
2026-10-19 13:12 ` [PATCH v7 8/9] drm: writeback: clean up writeback connectors in drm_connector_cleanup() Dmitry Baryshkov
2026-10-19 13:12 ` Dmitry Baryshkov [this message]
2026-10-19 19:40 ` [PATCH v7 0/9] drm: writeback: clean up writeback connector initialization John Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019-wb-drop-encoder-v7-9-d4288a26eb54@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=John.Harrison@igalia.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=brian.starkey@arm.com \
--cc=christian.koenig@amd.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=geert+renesas@glider.be \
--cc=harry.wentland@amd.com \
--cc=kernel-list@raspberrypi.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=mcanal@igalia.com \
--cc=mihail.atanassov@arm.com \
--cc=mripard@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®