From: Jeffrey Hugo <quic_jhugo@quicinc.com>
To: Tomeu Vizoso <tomeu@tomeuvizoso.net>, <linux-kernel@vger.kernel.org>
Cc: Oded Gabbay <ogabbay@kernel.org>,
Lucas Stach <l.stach@pengutronix.de>,
Russell King <linux+etnaviv@armlinux.org.uk>,
Christian Gmeiner <christian.gmeiner@gmail.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
<etnaviv@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/etnaviv: Create an accel device node if compute-only
Date: Thu, 25 Apr 2024 12:59:22 -0600 [thread overview]
Message-ID: <8c55dba5-6308-685e-13da-e728197d8101@quicinc.com> (raw)
In-Reply-To: <20240424063753.3740664-1-tomeu@tomeuvizoso.net>
On 4/24/2024 12:37 AM, Tomeu Vizoso wrote:
> If we expose a render node for NPUs without rendering capabilities, the
> userspace stack will offer it to compositors and applications for
> rendering, which of course won't work.
>
> Userspace is probably right in not questioning whether a render node
> might not be capable of supporting rendering, so change it in the kernel
> instead by exposing a /dev/accel node.
>
> Before we bring the device up we don't know whether it is capable of
> rendering or not (depends on the features of its blocks), so first try
> to probe a rendering node, and if we find out that there is no rendering
> hardware, abort and retry with an accel node.
>
> Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
> Cc: Oded Gabbay <ogabbay@kernel.org>
I hope Oded chimes in as Accel maintainer. I think Airlie/Vetter had
also previously mentioned they'd have opinions on what is Accel vs DRM.
This gets a nack from me in its current state. This is not a strong
nack, and I don't want to discourage you. I think there is a path forward.
The Accel subsystem documentation says that accel drivers will reside in
drivers/accel/ but this does not.
Also, the commit text for "accel: add dedicated minor for accelerator
devices" mentions -
"for drivers that
declare they handle compute accelerator, using a new driver feature
flag called DRIVER_COMPUTE_ACCEL. It is important to note that this
driver feature is mutually exclusive with DRIVER_RENDER. Devices that
want to expose both graphics and compute device char files should be
handled by two drivers that are connected using the auxiliary bus
framework."
I don't see any of that happening here (two drivers connected by aux
bus, one in drivers/accel).
I think this is the first case we've had of a combo DRM/Accel usecase,
and so there isn't an existing example to refer you to on how to
structure things. I think you are going to be the first example where
we figure all of this out.
On a more implementation note, ioctls for Accel devices should not be
marked DRM_RENDER_ALLOW. Seems like your attempt to reuse as much of
the code as possible trips over this.
-Jeff
next prev parent reply other threads:[~2024-04-25 18:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 6:37 Tomeu Vizoso
2024-04-25 11:32 ` Christian Gmeiner
2024-04-26 5:36 ` Tomeu Vizoso
2024-04-25 18:59 ` Jeffrey Hugo [this message]
2024-04-26 6:10 ` Tomeu Vizoso
2024-05-09 13:53 ` Tomeu Vizoso
2024-05-09 14:41 ` Oded Gabbay
2024-06-26 7:26 ` Daniel Vetter
2024-06-26 8:42 ` Dmitry Baryshkov
2024-06-26 17:49 ` Daniel Vetter
2024-05-10 8:34 ` Lucas Stach
2024-05-20 7:39 ` Tomeu Vizoso
2024-05-20 11:19 ` Daniel Stone
2024-06-12 14:26 ` Tomeu Vizoso
2024-06-17 17:01 ` Tomeu Vizoso
2024-06-26 7:28 ` Daniel Vetter
2024-06-26 8:28 ` Lucas Stach
2024-06-26 10:39 ` Daniel Stone
2024-06-26 17:52 ` Daniel Vetter
2024-06-26 19:26 ` Daniel Stone
2024-06-28 9:43 ` Tomeu Vizoso
2024-06-28 9:54 ` Daniel Stone
2024-06-28 17:47 ` Daniel Vetter
2024-05-20 9:24 ` Tomeu Vizoso
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=8c55dba5-6308-685e-13da-e728197d8101@quicinc.com \
--to=quic_jhugo@quicinc.com \
--cc=airlied@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=daniel@ffwll.ch \
--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=ogabbay@kernel.org \
--cc=tomeu@tomeuvizoso.net \
/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®