From: Krzysztof Kozlowski <krzk@kernel.org>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Luca Leonardo Scorcia <l.scorcia@gmail.com>,
linux-mediatek@lists.infradead.org
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
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 Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
CK Hu <ck.hu@mediatek.com>, Jitao shi <jitao.shi@mediatek.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes
Date: Tue, 17 Nov 2026 17:00:26 +0100 [thread overview]
Message-ID: <94ed1340-94bd-49ee-ba31-9bb63164c89a@kernel.org> (raw)
In-Reply-To: <63da5790-984b-4760-8e92-85b5d2269b30@collabora.com>
On 17/11/2026 15:21, AngeloGioacchino Del Regno wrote:
>
>>>
>>> Any advice on how to possibly resolve this without rewriting the entire thing?
>>>
>>> Mapping that by mmio address in the driver seems too stupid/dirty/bad/etc.
>>
>> Driver needs that, so why exactly stupid?
>
> Really feels like going back to the days when devicetree was not a thing and all of
> the MMIOs (on ARM at least) were added into a mach file.
Well, adding an alias just to tell that device node with MMIO address
0xdeadbeef is ID 0 is very similar, just placed differently. The
"aliases" are the mapping between MMIO and ID. Driver code also can do
the mapping between MMIO and ID.
>
> >
>> You do not represent any
>> actual hardware information in DT with these aliases.
>
> That depends on how you see it (as in, on the point of view), really, because well
> technically the second ReadDMA IP is ... not the ... primary, as it's the secondary
> one - as much as the third DPI is not the primary one (even though DRM can make it
> so that it can be used as a primary output, but that's a software thing, not HW).
>
> So... well, with that point of view... those aliases *are* representing information
> about the hardware.
>
> But I know that you're not complaining just about this, and this reply is not a way
> to argue all that much, just a bit of thinking out loud.
Being simply "second" is not alone useful information. It's pointless,
it does not matter neither to hardware nor to drivers. If it matters,
then probably that "second" has some other meaning and it maps to an
actual hardware topology difference, then often it deserves its own
compatible or property, depending on the difference.
>
> >
>> You want to tell
>> drivers how drivers should behave - that's not a job for DT,
>
> I want to tell drivers what is the first or the second or the third hardware
> instance of the same IP, I don't want to tell drivers how drivers should behave
> from devicetree.
> The drivers are behaving differently with different hardware (read as: hardware
> that is *physically* located in front of something else, or somewhere else anyway)
> as in with different hardware instances.
Then alias is not the way to represent these differences.
>
>> that's job
>> for driver data. Of course if there is smarter way than MMIO->ID, I am
>> all in.
>
> You can't imagine how much I was hoping for you to say something about an
> alternative solution to that.
>
> As I said, it feels a bit like pre-DT times, but what I get from you is that this
> is cleaner than just adding information about the real hardware instance number in
> devicetree (no that's not just MediaTek, qcom also had similar issues as you said).
Sure, I understand. This is an workaround and might be less applicable
here. It might be possible that your hardware needs a dedicated
property. Unfortunately, this cannot be a custom per-device alias.
Best regards,
Krzysztof
prev parent reply other threads:[~2026-11-17 16:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 11:38 [PATCH v2 0/4] Add support for the mt8167 display pipeline Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 1/4] dt-bindings: display: mediatek: dpi: Add compatible for mt8167 Luca Leonardo Scorcia
2026-09-25 13:24 ` Krzysztof Kozlowski
2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-16 15:01 ` Chun-Kuang Hu
2026-11-17 12:52 ` Krzysztof Kozlowski
2026-11-17 13:26 ` Luca Leonardo Scorcia
2026-11-17 15:09 ` Krzysztof Kozlowski
2026-09-21 11:38 ` [PATCH v2 2/4] drm/mediatek: Add support for mt8167 Digital Parallel Interface Luca Leonardo Scorcia
2026-11-16 15:05 ` Chun-Kuang Hu
2026-09-21 11:38 ` [PATCH v2 3/4] soc: mediatek: mt8167-mmsys: add routes for all display paths Luca Leonardo Scorcia
2026-09-21 11:38 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8167: Add DRM nodes Luca Leonardo Scorcia
2026-11-17 12:35 ` Krzysztof Kozlowski
2026-11-17 12:53 ` AngeloGioacchino Del Regno
2026-11-17 12:55 ` Krzysztof Kozlowski
2026-11-17 13:00 ` AngeloGioacchino Del Regno
2026-11-17 13:12 ` Krzysztof Kozlowski
2026-11-17 14:21 ` AngeloGioacchino Del Regno
2026-11-17 16:00 ` Krzysztof Kozlowski [this message]
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=94ed1340-94bd-49ee-ba31-9bb63164c89a@kernel.org \
--to=krzk@kernel.org \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=ck.hu@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jitao.shi@mediatek.com \
--cc=krzk+dt@kernel.org \
--cc=l.scorcia@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--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®