[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <curkiddhkz6k4rtbxxmmmm4oqyjzvda3xc2bc5c6dmq2c5qgkk@z6cwzap2hwgy>
Date: Wed, 10 Sep 2025 22:42:50 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Suraj Kandpal <suraj.kandpal@...el.com>
Cc: kernel-list@...pberrypi.com, amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-arm-msm@...r.kernel.org, freedreno@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, ankit.k.nautiyal@...el.com,
arun.r.murthy@...el.com, uma.shankar@...el.com, jani.nikula@...el.com,
harry.wentland@....com, siqueira@...lia.com, alexander.deucher@....com,
christian.koenig@....com, airlied@...il.com, simona@...ll.ch,
liviu.dudau@....com, maarten.lankhorst@...ux.intel.com,
mripard@...nel.org, robin.clark@....qualcomm.com,
abhinav.kumar@...ux.dev, tzimmermann@...e.de,
jessica.zhang@....qualcomm.com, sean@...rly.run,
marijn.suijten@...ainline.org,
laurent.pinchart+renesas@...asonboard.com, mcanal@...lia.com,
dave.stevenson@...pberrypi.com,
tomi.valkeinen+renesas@...asonboard.com,
kieran.bingham+renesas@...asonboard.com, louis.chauvet@...tlin.com
Subject: Re: [PATCH 1/7] drm: writeback: Refactor drm_writeback_connector
structure
On Tue, Sep 09, 2025 at 03:36:43PM +0530, Suraj Kandpal wrote:
> Some drivers cannot work with the current design where the connector
> is embedded within the drm_writeback_connector such as Intel and
> some drivers that can get it working end up adding a lot of checks
> all around the code to check if it's a writeback conenctor or not,
> this is due to the limitation of inheritance in C.
> To solve this we move the drm_writeback_connector within the
Please take a look at Documentation/process/submitting-patches.rst:
s/we //g, etc.
> drm_connector and remove the drm_connector base which was in
> drm_writeback_connector. We also make this drm_writeback_connector
> a union with hdmi connector to save memory and since a connector can
> never be both writeback and hdmi it should serve us well.
> We do all other requireda modifications that come with these changes
> along with addition of new function which returns the drm_connector
> when drm_writeback_connector is present.
> We also modify drivers using the drm_writeback_connector to
> allow them to use this connector without breaking them.
> The drivers modified here are amd, komeda, mali, vc4, vkms,
> rcar_du, msm
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@...el.com>
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +-
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +-
> .../drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 8 +--
> .../gpu/drm/arm/display/komeda/komeda_crtc.c | 6 +-
> .../gpu/drm/arm/display/komeda/komeda_kms.h | 6 +-
> .../arm/display/komeda/komeda_wb_connector.c | 8 +--
> drivers/gpu/drm/arm/malidp_crtc.c | 2 +-
> drivers/gpu/drm/arm/malidp_drv.h | 2 +-
> drivers/gpu/drm/arm/malidp_hw.c | 6 +-
> drivers/gpu/drm/arm/malidp_mw.c | 8 +--
> drivers/gpu/drm/drm_writeback.c | 33 ++++++---
> .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 +-
> drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 16 +++--
> drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.h | 4 +-
> .../gpu/drm/renesas/rcar-du/rcar_du_crtc.h | 4 +-
> .../drm/renesas/rcar-du/rcar_du_writeback.c | 19 ++---
> drivers/gpu/drm/vc4/vc4_txp.c | 14 ++--
> drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
> drivers/gpu/drm/vkms/vkms_drv.h | 2 +-
> drivers/gpu/drm/vkms/vkms_writeback.c | 13 ++--
> include/drm/drm_connector.h | 70 +++++++++++++++++--
> include/drm/drm_writeback.h | 68 ++----------------
> 22 files changed, 163 insertions(+), 137 deletions(-)
>
> @@ -2305,6 +2366,7 @@ struct drm_connector {
> * @cec: CEC-related data.
> */
> struct drm_connector_cec cec;
> +
Probably a refactoring leftover.
> };
>
> #define obj_to_connector(x) container_of(x, struct drm_connector, base)
--
With best wishes
Dmitry
Powered by blists - more mailing lists