From: Sui Jingfeng <sui.jingfeng@linux.dev>
To: Lucas Stach <l.stach@pengutronix.de>,
Russell King <linux+etnaviv@armlinux.org.uk>,
Christian Gmeiner <christian.gmeiner@gmail.com>,
David Airlie <airlied@gmail.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [etnaviv-next v13 7/7] drm/etnaviv: Add support for vivante GPU cores attached via PCI(e)
Date: Wed, 7 Feb 2024 23:22:20 +0800 [thread overview]
Message-ID: <ad282cac-1455-4063-aa47-400c9ac07851@linux.dev> (raw)
In-Reply-To: <ZcNO9aZwWzyYs-Rv@phenom.ffwll.local>
Hi,
On 2024/2/7 17:35, Daniel Vetter wrote:
> On Wed, Feb 07, 2024 at 01:27:59AM +0800, Sui Jingfeng wrote:
>> The component helper functions are the glue, which is used to bind multiple
>> GPU cores to a virtual master platform device. Which is fine and works well
>> for the SoCs who contains multiple GPU cores.
>>
>> The problem is that usperspace programs (such as X server and Mesa) will
>> search the PCIe device to use if it is exist. In other words, usperspace
>> programs open the PCIe device with higher priority. Creating a virtual
>> master platform device for PCI(e) GPUs is unnecessary, as the PCI device
>> has been created by the time drm/etnaviv is loaded.
>>
>> we create virtual platform devices as a representation for the vivante GPU
>> ip core. As all of subcomponent are attached via the PCIe master device,
>> we reflect this hardware layout by binding all of the virtual child to the
>> the real master.
>>
>> Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
> Uh so my understanding is that drivers really shouldn't create platform
> devices of their own.
>
Yes,
At least for DT-based systems, this driver can be modified
to let the core to create the virtual master for us. We don't
have to create platform devices by our own(refer to the drm/etnaviv
driver).
I means that we could put the following example device node
into the .dts file.
gpu_2d: gpu@A0000 {
compatible = "vivante,gc";
reg = <0xA0000 0x4000>;
};
gpu_3d: gpu@90000 {
compatible = "vivante,gc";
reg = <0x90000 0x4000>;
};
gpu@0 {
compatible = "etnaviv";
cores = <&gpu_2d &gpu_3d>;
dma-coherent;
dma-mask = <0xffffffff>
virtual_master;
};
But now, I'm afraid it's too late. Because the DTS/DTB may already have been
burned into board's BIOS for years. I guess, nowadays, modifying(changes)
this driver have to take the backward compatibility constraint into consideration.
Since we only have one chance to form the spec, that happens when this driver was
initially merged. Apparently, we miss it.
next prev parent reply other threads:[~2024-02-07 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 17:27 [etnaviv-next v13 0/7] drm/etnaviv: Add driver wrapper for vivante GPUs attached on PCI(e) device Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 1/7] drm/etnaviv: Add a helper function to get clocks Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 2/7] drm/etnaviv: Add constructor and destructor for the etnaviv_drm_private struct Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 3/7] drm/etnaviv: Embed struct drm_device in struct etnaviv_drm_private Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 4/7] drm/etnaviv: Add support for cached coherent caching mode Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 5/7] drm/etnaviv: Replace the '&pdev->dev' with 'dev' Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 6/7] drm/etnaviv: Update the implement of etnaviv_create_platform_device() Sui Jingfeng
2024-02-06 17:27 ` [etnaviv-next v13 7/7] drm/etnaviv: Add support for vivante GPU cores attached via PCI(e) Sui Jingfeng
2024-02-07 9:35 ` Daniel Vetter
2024-02-07 15:22 ` Sui Jingfeng [this message]
2024-02-08 15:27 ` Maxime Ripard
2024-02-09 11:02 ` Daniel Vetter
2024-02-09 15:15 ` Maxime Ripard
2024-02-09 16:25 ` Sui Jingfeng
2024-02-13 14:38 ` Maxime Ripard
2024-02-13 15:48 ` Sui Jingfeng
2024-02-14 4:54 ` Sui Jingfeng
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=ad282cac-1455-4063-aa47-400c9ac07851@linux.dev \
--to=sui.jingfeng@linux.dev \
--cc=airlied@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--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®