All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: yocto-patches@lists.yoctoproject.org
Subject: Re: [meta-rockchip][PATCH v3] add support for upstream RKNPU/RKNN/Rocket HW AI accelerator
Date: Thu, 26 Nov 2026 18:15:17 -0500	[thread overview]
Message-ID: <awi9hSqATkNygf9A@localhost.localdomain> (raw)
In-Reply-To: <55a86d60-8777-4e99-b953-9bc733242fca@cherry.de>

On Thu 2026-11-26 @ 11:02:36 AM, Quentin Schulz wrote:
> 
> 
> On 11/26/26 5:09 AM, Trevor Woerner wrote:
> > From: Quentin Schulz <quentin.schulz@cherry.de>
> > 
> > This adds support for the NPU (Neural Processing Unit) found on the
> > RK3588(S).
> > 
> > The NPU is supported by a kernel driver (CONFIG_DRM_ACCEL_ROCKET),
> > Device Tree nodes (so not all RK3588 devices supported upstream
> > necessarily have the NPU declared properly!) and a userspace driver in
> > mesa (teflon delegate with rocket gallium driver).
> > 
> > This adds a config fragment for linux-rockchip kernels such that the
> > disabled-by-default Rocket driver is built and enables the Rocket
> > gallium mesa driver with the teflon delegate, but only when the user
> > requests its support.
> > 
> > This was tested by running the following:
> > 
> > """
> > wget https://gitlab.freedesktop.org/mesa/mesa/-/raw/main/src/gallium/frontends/teflon/tests/classification.py
> > 
> > TEFLON_DEBUG=verbose python3 classification.py \
> > 	     -i /usr/share/label_image/grace_hopper.bmp \
> > 	     -m /usr/share/label_image/mobilenet_v1_1.0_224_quant.tflite \
> > 	     -l /usr/share/label_image/labels_mobilenet_quant_v1_224.txt \
> > 	     -e /usr/lib/libteflon.so
> > """
> > 
> > from an image built with meta-tensorflow's tensorflow-lite, mesa's
> > libteflon, meta-openembedded's python3-pillow and OE-Core's
> > python3-numpy packages.
> > 
> > Note that the Aarch64 RK35xx SoCs all have an NPU, but only RK3588's is
> > currently supported in the kernel.
> > 
> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> > AI-Generated: codex/claude-opus 5.5 (max)
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> > changes in v3:
> > - rebase onto current master; it needed git am --3way against the kernel
> >    config fragment list
> > - gate the fragment and the mesa PACKAGECONFIG with
> >    bb.utils.to_boolean(d.getVar(...)) rather than oe.utils.vartrue().
> >    vartrue() passes the variable name as a string literal, which
> >    bitbake's code parser does not track, so the do_kernel_configme
> >    signature did not change when ENABLE_UPSTREAM_RKNPU was toggled and
> >    nothing rebuilt in either direction. This idiom is tracked and matches
> >    the other knobs in the layer
> > - drop the kernel version from the README note, which said v7.0 while
> >    the layer builds 7.2
> 
> Why I added the kernel version is because "at the time of writing" means
> nothing to the user unless they go dig into the git history, then compare
> the date to the one in openembedded-core, and then check the linux-yocto
> kernel recipe version at that point in time.
> 
> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>

I restored your v7.0 parenthetical, added your Reviewed-by tag, and
otherwise merged this v3 to meta-rockchip, master branch. Thanks!

> Thanks!
> Quentin

      reply	other threads:[~2026-11-26 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  4:09 [meta-rockchip][PATCH v3] add support for upstream RKNPU/RKNN/Rocket HW AI accelerator Trevor Woerner
2026-11-26 10:02 ` Quentin Schulz
2026-11-26 23:15   ` Trevor Woerner [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=awi9hSqATkNygf9A@localhost.localdomain \
    --to=twoerner@gmail.com \
    --cc=quentin.schulz@cherry.de \
    --cc=yocto-patches@lists.yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.