arch/arm64/boot/dts/nvidia/tegra210.dtsi | 14 +- drivers/gpu/drm/tegra/Makefile | 1 + drivers/gpu/drm/tegra/drm.c | 2 + drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/nvjpg.c | 329 +++++++++++++++++++++++++++++++ 5 files changed, 346 insertions(+), 1 deletion(-)
Hello,
This series adds support for the NVJPG hardware accelerator found in the
Tegra210 SoC.
The kernel driver is essentially a copy of the NVDEC driver as both
engines are Falcon-based.
For the userspace part I have written a Mesa Gallium backend [1] that,
while still very much experimental, works in decoding images with VA-API.
I have been using ffmpeg to call VA-API with the following command:
ffmpeg -v verbose -hwaccel vaapi -hwaccel_device /dev/dri/renderD129 -i <input.jpg> -pix_fmt bgra -f fbdev /dev/fb0
which decodes <input.jpg> and shows the result in the framebuffer.
The firmware for the engine can be obtained from a Linux for Tegra
distribution. Due to the way the Gallium implementation works for Tegra
the GPU also needs to be enabled.
Thanks!
Diogo
To: Thierry Reding <thierry.reding@gmail.com>
To: Mikko Perttunen <mperttunen@nvidia.com>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
To: Jonathan Hunter <jonathanh@nvidia.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
[1]: https://gitlab.freedesktop.org/d.ivo/mesa/-/tree/diogo/vaapi_gl?ref_type=heads
---
Changes in v3:
- [01/03]: Properly handle dma_alloc_coherent error path
- Link to v2: https://lore.kernel.org/r/20250611-diogo-nvjpg-v2-0-01f8c76ea90f@tecnico.ulisboa.pt
Changes in v2:
- [01/03]: Remove reset handling, set clk rate to max
- [02/03]: Explicitly mention Tegra210 in the commit subject
- [03/03]: Explicitly mention Tegra210 in the commit subject
- Link to v1: https://lore.kernel.org/r/20250606-diogo-nvjpg-v1-0-5f2c36feeb39@tecnico.ulisboa.pt
---
Diogo Ivo (3):
drm/tegra: Add NVJPG driver
arm64: tegra: Add Tegra210 NVJPG power-domain node
arm64: tegra: Add NVJPG node for Tegra210 platforms
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 14 +-
drivers/gpu/drm/tegra/Makefile | 1 +
drivers/gpu/drm/tegra/drm.c | 2 +
drivers/gpu/drm/tegra/drm.h | 1 +
drivers/gpu/drm/tegra/nvjpg.c | 329 +++++++++++++++++++++++++++++++
5 files changed, 346 insertions(+), 1 deletion(-)
---
base-commit: d0b3b7b22dfa1f4b515fd3a295b3fd958f9e81af
change-id: 20250605-diogo-nvjpg-e0d4c57126c5
Best regards,
--
Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
On Mon, Jun 30, 2025 at 09:48:41AM +0100, Diogo Ivo wrote: > Hello, > > This series adds support for the NVJPG hardware accelerator found in the > Tegra210 SoC. > > The kernel driver is essentially a copy of the NVDEC driver as both > engines are Falcon-based. > > For the userspace part I have written a Mesa Gallium backend [1] that, > while still very much experimental, works in decoding images with VA-API. > > I have been using ffmpeg to call VA-API with the following command: > > ffmpeg -v verbose -hwaccel vaapi -hwaccel_device /dev/dri/renderD129 -i <input.jpg> -pix_fmt bgra -f fbdev /dev/fb0 > > which decodes <input.jpg> and shows the result in the framebuffer. > > The firmware for the engine can be obtained from a Linux for Tegra > distribution. Due to the way the Gallium implementation works for Tegra > the GPU also needs to be enabled. > > Thanks! > > Diogo > > To: Thierry Reding <thierry.reding@gmail.com> > To: Mikko Perttunen <mperttunen@nvidia.com> > To: David Airlie <airlied@gmail.com> > To: Simona Vetter <simona@ffwll.ch> > To: Jonathan Hunter <jonathanh@nvidia.com> > To: Philipp Zabel <p.zabel@pengutronix.de> > To: Rob Herring <robh@kernel.org> > To: Krzysztof Kozlowski <krzk+dt@kernel.org> > To: Conor Dooley <conor+dt@kernel.org> > Cc: linux-kernel@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: linux-tegra@vger.kernel.org > Cc: devicetree@vger.kernel.org > Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt> > > [1]: https://gitlab.freedesktop.org/d.ivo/mesa/-/tree/diogo/vaapi_gl?ref_type=heads Dave, Simona, This doesn't add new userspace ABI and instead reuses the same ABI that we use for VIC and NVDEC, but it does technically add a new driver for one of the multimedia engines. Given that we have Diogo's VA-API work on gitlab, I think all of the criteria are met to exercise this. If you don't have any objections, I'd like to apply this for the upcoming release. Thanks, Thierry
On 04/07/2025 10:04, Thierry Reding wrote: > On Mon, Jun 30, 2025 at 09:48:41AM +0100, Diogo Ivo wrote: >> Hello, >> >> This series adds support for the NVJPG hardware accelerator found in the >> Tegra210 SoC. >> >> The kernel driver is essentially a copy of the NVDEC driver as both >> engines are Falcon-based. >> >> For the userspace part I have written a Mesa Gallium backend [1] that, >> while still very much experimental, works in decoding images with VA-API. >> >> I have been using ffmpeg to call VA-API with the following command: >> >> ffmpeg -v verbose -hwaccel vaapi -hwaccel_device /dev/dri/renderD129 -i <input.jpg> -pix_fmt bgra -f fbdev /dev/fb0 >> >> which decodes <input.jpg> and shows the result in the framebuffer. >> >> The firmware for the engine can be obtained from a Linux for Tegra >> distribution. Due to the way the Gallium implementation works for Tegra >> the GPU also needs to be enabled. >> >> Thanks! >> >> Diogo >> >> To: Thierry Reding <thierry.reding@gmail.com> >> To: Mikko Perttunen <mperttunen@nvidia.com> >> To: David Airlie <airlied@gmail.com> >> To: Simona Vetter <simona@ffwll.ch> >> To: Jonathan Hunter <jonathanh@nvidia.com> >> To: Philipp Zabel <p.zabel@pengutronix.de> >> To: Rob Herring <robh@kernel.org> >> To: Krzysztof Kozlowski <krzk+dt@kernel.org> >> To: Conor Dooley <conor+dt@kernel.org> >> Cc: linux-kernel@vger.kernel.org >> Cc: dri-devel@lists.freedesktop.org >> Cc: linux-tegra@vger.kernel.org >> Cc: devicetree@vger.kernel.org >> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt> >> >> [1]: https://gitlab.freedesktop.org/d.ivo/mesa/-/tree/diogo/vaapi_gl?ref_type=heads > > Dave, Simona, > > This doesn't add new userspace ABI and instead reuses the same ABI that > we use for VIC and NVDEC, but it does technically add a new driver for > one of the multimedia engines. > > Given that we have Diogo's VA-API work on gitlab, I think all of the > criteria are met to exercise this. > > If you don't have any objections, I'd like to apply this for the > upcoming release. We would like to merge this for v6.19 and so please let us know if you have any objections. For the series ... Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Cheers Jon -- nvpublic
© 2016 - 2026 Red Hat, Inc.