From: Liviu Dudau <liviu.dudau@arm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: "Jani Nikula" <jani.nikula@linux.intel.com>,
"Kandpal, Suraj" <suraj.kandpal@intel.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>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Rob Clark" <robin.clark@oss.qualcomm.com>,
"Dmitry Baryshkov" <lumag@kernel.org>,
"Abhinav Kumar" <abhinav.kumar@linux.dev>,
"Jessica Zhang" <jessica.zhang@oss.qualcomm.com>,
"Sean Paul" <sean@poorly.run>,
"Marijn Suijten" <marijn.suijten@somainline.org>,
"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>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 0/8] drm: writeback: clean up writeback connector initialization
Date: Mon, 4 Aug 2025 15:43:12 +0100 [thread overview]
Message-ID: <aJDHAF69VOEHwcKO@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20250801-wb-drop-encoder-v1-0-824646042f7d@oss.qualcomm.com>
Hi,
On Fri, Aug 01, 2025 at 04:51:08PM +0300, Dmitry Baryshkov wrote:
> 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.
The intent of _init_with_encoder() was to be a special case for drivers
that use their own specific encoder and the rest use the generic function
that creates the virtual encoder inside the call. The API for
_init_with_encoder() was actually introduced 4 years after the original
patch, so that should give a hint.
drmm_writeback_connector_init() is more like _init_with_encoder() and
I don't remember reviewing it, so I'm not sure why that was considered
to be the better behaviour for the managed version. Now you're moving
all the drivers to the managed version and you have to duplicate code
in each driver to create the ENCODER_VIRTUAL encoder.
I'm not against the changes being made in the series, I just want to
see a better justification on why _init_with_encoder() behaviour is
better than the previous default that you're removing.
Best regards,
Liviu
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Dmitry Baryshkov (8):
> drm/amd/display: use drmm_writeback_connector_init()
> drm/komeda: use drmm_writeback_connector_init()
> drm/mali: use drmm_writeback_connector_init()
> drm/msm/dpu: use drmm_writeback_connector_init()
> drm/msm/dpu: 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 | 2 +-
> .../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 +++-------------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 10 +---
> .../gpu/drm/renesas/rcar-du/rcar_du_writeback.c | 23 +++++---
> drivers/gpu/drm/vc4/vc4_txp.c | 9 ++-
> include/drm/drm_writeback.h | 22 +------
> 9 files changed, 77 insertions(+), 131 deletions(-)
> ---
> base-commit: 94f208ff622b09309358abaf26d7acca0c318fae
> change-id: 20250801-wb-drop-encoder-97a0c75bd5d7
>
> Best regards,
> --
> With best wishes
> Dmitry
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
next prev parent reply other threads:[~2025-08-04 14:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 13:51 [PATCH 0/8] drm: writeback: clean up writeback connector initialization Dmitry Baryshkov
2025-08-01 13:51 ` [PATCH 1/8] drm/amd/display: use drmm_writeback_connector_init() Dmitry Baryshkov
2025-08-01 14:08 ` Louis Chauvet
2025-08-08 5:02 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 2/8] drm/komeda: " Dmitry Baryshkov
2025-08-01 14:09 ` Louis Chauvet
2025-08-08 5:02 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 3/8] drm/mali: " Dmitry Baryshkov
2025-08-01 14:08 ` Louis Chauvet
2025-08-08 5:05 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 4/8] drm/msm/dpu: " Dmitry Baryshkov
2025-08-01 14:08 ` Louis Chauvet
2025-08-08 5:02 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 5/8] " Dmitry Baryshkov
2025-08-01 14:06 ` Dmitry Baryshkov
2025-08-01 14:06 ` Geert Uytterhoeven
2025-08-01 14:08 ` Louis Chauvet
2025-08-09 7:52 ` Dmitry Baryshkov
2025-08-01 13:51 ` [PATCH 6/8] drm/vc4: " Dmitry Baryshkov
2025-08-01 14:08 ` Louis Chauvet
2025-08-08 5:03 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 7/8] drm: writeback: drop excess connector initialization functions Dmitry Baryshkov
2025-08-01 14:08 ` Louis Chauvet
2025-08-01 14:22 ` Kandpal, Suraj
2025-08-01 14:26 ` Dmitry Baryshkov
2025-08-08 5:03 ` Kandpal, Suraj
2025-08-01 13:51 ` [PATCH 8/8] drm: writeback: rename drm_writeback_connector_init_with_encoder() Dmitry Baryshkov
2025-08-01 14:07 ` Louis Chauvet
2025-08-01 14:23 ` Kandpal, Suraj
2025-08-08 5:05 ` Kandpal, Suraj
2025-08-08 5:24 ` Kandpal, Suraj
2025-08-09 7:55 ` Dmitry Baryshkov
2025-08-04 14:43 ` Liviu Dudau [this message]
2025-08-05 4:58 ` [PATCH 0/8] drm: writeback: clean up writeback connector initialization Dmitry Baryshkov
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=aJDHAF69VOEHwcKO@e110455-lin.cambridge.arm.com \
--to=liviu.dudau@arm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=harry.wentland@amd.com \
--cc=jani.nikula@linux.intel.com \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=kernel-list@raspberrypi.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=marijn.suijten@somainline.org \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
--cc=suraj.kandpal@intel.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;
as well as URLs for NNTP newsgroup(s).