linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Sascha Hauer <s.hauer@pengutronix.de>, David Airlie <airlied@linux.ie>
Cc: devicetree@vger.kernel.org,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Peter Geis <pgwipeout@gmail.com>,
	Sandy Huang <hjc@rock-chips.com>,
	dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	Michael Riesch <michael.riesch@wolfvision.net>,
	kernel@pengutronix.de, Andy Yan <andy.yan@rock-chips.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 01/23] drm/encoder: Add of_graph port to struct drm_encoder
Date: Wed, 09 Feb 2022 13:12:45 +0200	[thread overview]
Message-ID: <87fsospa36.fsf@intel.com> (raw)
In-Reply-To: <20220209100736.GV18637@pengutronix.de>

On Wed, 09 Feb 2022, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> David, Daniel,
>
> I'll need a word from you regarding this patch. It's needed in patch
> 22/23 in this series.
> vop2_crtc_atomic_enable() needs to control the mux which routes the
> display output to the different encoders. Which encoder is used is
> described in the of_graph port, so I need a way to identify the encoder
> in the device tree.

I think the question is how useful is this going to be in general. IMO
we should not be adding members that are useful in a single driver only.

For example i915 wraps encoders with:

	struct intel_encoder {
		struct drm_encoder base;

		/* i915 specific stuff here*/
	};

So that we can add stuff of our own there. Of course, it does mean a
bunch of overhead for the first time you need to do it. But adding
driver specific stuff to struct drm_encoder adds overhead for everyone.

All that said, *I* don't know how useful the port member would be in
drivers that use device tree. Maybe it's worth it.

BR,
Jani.

>
> Sascha
>
> On Wed, Feb 09, 2022 at 10:53:28AM +0100, Sascha Hauer wrote:
>> Add a device node to drm_encoder which corresponds with the port node
>> in the DT description of the encoder. This allows drivers to find the
>> of_graph link between a crtc and an encoder.
>> 
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>> ---
>>  include/drm/drm_encoder.h | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h
>> index 6e91a0280f31..3acd054b1eb3 100644
>> --- a/include/drm/drm_encoder.h
>> +++ b/include/drm/drm_encoder.h
>> @@ -99,6 +99,8 @@ struct drm_encoder {
>>  	struct drm_device *dev;
>>  	struct list_head head;
>>  
>> +	struct device_node *port;
>> +
>>  	struct drm_mode_object base;
>>  	char *name;
>>  	/**
>> -- 
>> 2.30.2
>> 
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-02-09 11:14 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:53 [PATCH v5 00/23] drm/rockchip: RK356x VOP2 support Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 01/23] drm/encoder: Add of_graph port to struct drm_encoder Sascha Hauer
2022-02-09 10:07   ` Sascha Hauer
2022-02-09 11:12     ` Jani Nikula [this message]
2022-02-10 11:52       ` Sascha Hauer
2022-02-10 15:22         ` Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 02/23] drm/rockchip: dw_hdmi: Do not leave clock enabled in error case Sascha Hauer
2022-02-09 10:03   ` Heiko Stübner
2022-02-09  9:53 ` [PATCH v5 03/23] drm/rockchip: dw_hdmi: rename vpll clock to reference clock Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 04/23] dt-bindings: display: rockchip: dw-hdmi: use "ref" as clock name Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 05/23] arm64: dts: rockchip: rk3399: rename HDMI ref clock to 'ref' Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 06/23] drm/rockchip: dw_hdmi: add rk3568 support Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 07/23] dt-bindings: display: rockchip: dw-hdmi: Add compatible for rk3568 HDMI Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 08/23] drm/rockchip: dw_hdmi: add regulator support Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 09/23] dt-bindings: display: rockchip: dw-hdmi: Add " Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 10/23] drm/rockchip: dw_hdmi: Add support for hclk Sascha Hauer
2022-02-15 19:50   ` Dmitry Osipenko
2022-02-09  9:53 ` [PATCH v5 11/23] dt-bindings: display: rockchip: dw-hdmi: Add additional clock Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 12/23] drm/rockchip: dw_hdmi: Use auto-generated tables Sascha Hauer
2022-02-09 10:06   ` Heiko Stübner
2022-02-09  9:53 ` [PATCH v5 13/23] drm/rockchip: dw_hdmi: drop mode_valid hook Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 14/23] drm/rockchip: dw_hdmi: Set cur_ctr to 0 always Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 15/23] drm/rockchip: dw_hdmi: add default 594Mhz clk for 4K@60hz Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 16/23] dt-bindings: display: rockchip: dw-hdmi: Make unwedge pinctrl optional Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 17/23] arm64: dts: rockchip: rk356x: Add VOP2 nodes Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 18/23] arm64: dts: rockchip: rk356x: Add HDMI nodes Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 19/23] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Sascha Hauer
2022-02-10  0:10   ` Johan Jonker
2022-02-10 11:47     ` Sascha Hauer
2022-02-10 13:15       ` Johan Jonker
2022-02-10 13:37         ` Sascha Hauer
2022-02-10 13:51           ` Heiko Stübner
2022-02-09  9:53 ` [PATCH v5 20/23] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 21/23] drm/rockchip: Make VOP driver optional Sascha Hauer
2022-02-09  9:53 ` [PATCH v5 23/23] dt-bindings: display: rockchip: Add binding for VOP2 Sascha Hauer
2022-02-09 18:56   ` Rob Herring
2022-02-09 17:44 ` Aw: [PATCH v5 00/23] drm/rockchip: RK356x VOP2 support Frank Wunderlich
     [not found] ` <20220209095350.2104049-23-s.hauer@pengutronix.de>
2022-02-09 20:13   ` Aw: [PATCH v5 22/23] drm: rockchip: Add VOP2 driver Frank Wunderlich
2022-02-15 19:47   ` Dmitry Osipenko
2022-02-15 19:47   ` Dmitry Osipenko
2022-02-15 19:47   ` Dmitry Osipenko
2022-02-16 10:39   ` Dmitry Osipenko
2022-02-16 11:22     ` Sascha Hauer
2022-02-16 12:23       ` Dmitry Osipenko

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=87fsospa36.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=andy.yan@rock-chips.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=s.hauer@pengutronix.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).