From: "mripard@kernel.org" <mripard@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: "liviu.dudau@arm.com" <liviu.dudau@arm.com>,
"Kandpal, Suraj" <suraj.kandpal@intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
"kernel-list@raspberrypi.com" <kernel-list@raspberrypi.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"freedreno@lists.freedesktop.org"
<freedreno@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org"
<intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
"Murthy, Arun R" <arun.r.murthy@intel.com>,
"Shankar, Uma" <uma.shankar@intel.com>,
"Nikula, Jani" <jani.nikula@intel.com>,
"harry.wentland@amd.com" <harry.wentland@amd.com>,
"siqueira@igalia.com" <siqueira@igalia.com>,
"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"robin.clark@oss.qualcomm.com" <robin.clark@oss.qualcomm.com>,
"abhinav.kumar@linux.dev" <abhinav.kumar@linux.dev>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"jessica.zhang@oss.qualcomm.com"
<jessica.zhang@oss.qualcomm.com>,
"sean@poorly.run" <sean@poorly.run>,
"marijn.suijten@somainline.org" <marijn.suijten@somainline.org>,
"mcanal@igalia.com" <mcanal@igalia.com>,
"dave.stevenson@raspberrypi.com"
<dave.stevenson@raspberrypi.com>,
"tomi.valkeinen+renesas@ideasonboard.com"
<tomi.valkeinen+renesas@ideasonboard.com>,
"kieran.bingham+renesas@ideasonboard.com"
<kieran.bingham+renesas@ideasonboard.com>,
"louis.chauvet@bootlin.com" <louis.chauvet@bootlin.com>
Subject: Re: [RFC PATCH 1/8] drm: writeback: Refactor drm_writeback_connector structure
Date: Tue, 19 Aug 2025 11:03:52 +0200 [thread overview]
Message-ID: <wr76vyag2osox2xf7ducnkiaanzk2k5ehd2ahnoyqdm5qiywlk@penf4v5bvg5z> (raw)
In-Reply-To: <hc6f6wgsnauh72cowocpm55tikejhiha5z4mgufeq7v6gb2qml@kmgfd26bigos>
[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]
Hi,
On Sat, Aug 16, 2025 at 01:20:53AM +0300, Dmitry Baryshkov wrote:
> On Thu, Aug 14, 2025 at 05:13:54PM +0100, liviu.dudau@arm.com wrote:
> > Hi,
> >
> > On Wed, Aug 13, 2025 at 10:04:22AM +0000, Kandpal, Suraj wrote:
> > > > > > };
> > > > >
> > > > > I still don't like that. This really doesn't belong here. If anything,
> > > > > the drm_connector for writeback belongs to drm_crtc.
> > > >
> > > > Why? We already have generic HDMI field inside drm_connector. I am really
> > > > hoping to be able to land DP parts next to it. In theory we can have a DVI-
> > > > specific entry there (e.g. with the subconnector type).
> > > > The idea is not to limit how the drivers subclass those structures.
> > > >
> > > > I don't see a good case why WB should deviate from that design.
> > > >
> > > > > If the issue is that some drivers need a custom drm_connector
> > > > > subclass, then I'd rather turn the connector field of
> > > > > drm_writeback_connector into a pointer.
> > > >
> > > > Having a pointer requires additional ops in order to get drm_connector from
> > > > WB code and vice versa. Having drm_connector_wb inside drm_connector
> > > > saves us from those ops (which don't manifest for any other kind of structure).
> > > > Nor will it take any more space since union will reuse space already taken up by
> > > > HDMI part.
> > > >
> > > > >
> > >
> > > Seems like this thread has died. We need to get a conclusion on the design.
> > > Laurent do you have any issue with the design given Dmitry's explanation as to why this
> > > Design is good for drm_writeback_connector.
> >
> > I'm with Laurent here. The idea for drm_connector (and a lot of drm structures) are to
> > be used as base "classes" for extended structures. I don't know why HDMI connector ended
> > up inside drm_connector as not all connectors have HDMI functionality, but that's a cleanup
> > for another day.
>
> Maybe Maxime can better comment on it, but I think it was made exactly
> for the purpose of not limiting the driver's design. For example, a lot
> of drivers subclass drm_connector via drm_bridge_connector. If
> struct drm_connector_hdmi was a wrapper around struct drm_connector,
> then it would have been impossible to use HDMI helpers for bridge
> drivers, while current design freely allows any driver to utilize
> corresponding library code.
That's exactly why we ended up like this. With that design, we wouldn't
have been able to "inherit" two connector "classes": bridge_connector is
one, intel_connector another one.
See here for the rationale:
https://lore.kernel.org/dri-devel/ZOTDKHxn2bOg+Xmg@phenom.ffwll.local/
I don't think the "but we'll bloat drm_connector" makes sense either.
There's already a *lot* of things that aren't useful to every connector
(fwnode, display_info, edid in general, scaling, vrr, etc.)
And it's not like we allocate more than a handful of them during a
system's life.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2025-08-19 9:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 9:26 [RFC PATCH 0/8] Refactor drm_writeback_connector structure Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 1/8] drm: writeback: " Suraj Kandpal
2025-08-11 9:44 ` Laurent Pinchart
2025-08-11 10:22 ` Dmitry Baryshkov
2025-08-11 11:15 ` Laurent Pinchart
2025-08-11 11:19 ` Kandpal, Suraj
2025-08-11 13:26 ` Dmitry Baryshkov
2025-08-13 10:04 ` Kandpal, Suraj
2025-08-13 12:00 ` Laurent Pinchart
2025-08-14 16:13 ` liviu.dudau
2025-08-15 22:20 ` Dmitry Baryshkov
2025-08-19 9:03 ` mripard [this message]
2025-08-25 6:26 ` Kandpal, Suraj
2025-08-25 9:26 ` Dmitry Baryshkov
2025-08-26 15:48 ` mripard
2025-08-26 16:08 ` Dmitry Baryshkov
2025-08-27 6:34 ` mripard
2025-08-11 11:16 ` Kandpal, Suraj
2025-08-11 10:13 ` Dmitry Baryshkov
2025-08-11 11:12 ` Kandpal, Suraj
2025-08-11 10:28 ` Dmitry Baryshkov
2025-08-11 11:14 ` Kandpal, Suraj
2025-08-11 9:27 ` [RFC PATCH 2/8] drm/amd/display: Adapt amd writeback to new drm_writeback_connector Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 3/8] drm/arm/komeda: Adapt komeda " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 4/8] drm/arm/mali: Adapt mali " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 5/8] drm/vc4: Adapt vc4 " Suraj Kandpal
2025-08-11 9:27 ` [RFC PATCH 6/8] drm/vkms: Adapt vkms " Suraj Kandpal
2025-08-11 9:51 ` Louis Chauvet
2025-08-11 11:23 ` Kandpal, Suraj
2025-08-11 14:33 ` Louis Chauvet
2025-08-11 9:27 ` [RFC PATCH 7/8] drm/rcar_du: " Suraj Kandpal
2025-08-11 9:40 ` Laurent Pinchart
2025-08-11 9:47 ` Kandpal, Suraj
2025-08-11 9:46 ` Louis Chauvet
2025-08-11 9:27 ` [RFC PATCH 8/8] drm/msm/dpu: Adapt dpu " Suraj Kandpal
2025-08-11 10:26 ` Dmitry Baryshkov
2025-08-11 11:15 ` Kandpal, Suraj
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=wr76vyag2osox2xf7ducnkiaanzk2k5ehd2ahnoyqdm5qiywlk@penf4v5bvg5z \
--to=mripard@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ankit.k.nautiyal@intel.com \
--cc=arun.r.murthy@intel.com \
--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=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=kernel-list@raspberrypi.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.org \
--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=marijn.suijten@somainline.org \
--cc=mcanal@igalia.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=suraj.kandpal@intel.com \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=uma.shankar@intel.com \
/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).