Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8761b4f
gallium/va: add the termux-va wire protocol mirror and daemon client
lfdevs Aug 29, 2026
3ca4063
gallium/va: add the termux-va bridge screen/pipe wrappers and codec
lfdevs Aug 29, 2026
2bd5409
gallium/va: wire the termux-va bridge into driver init and the build
lfdevs Aug 29, 2026
b00096a
ci, docs: build the branch tar.gz with the VA bridge and document it
lfdevs Aug 29, 2026
c63a427
gallium/va: create the termux-va bridge vscreen with GPU backend sele…
lfdevs Aug 29, 2026
3e09c41
gallium/va: stabilize the Termux VA bridge and software fallback
lfdevs Aug 30, 2026
8fc78af
docs/va: document tested Termux VA backends
lfdevs Aug 31, 2026
9467eac
gallium/va: fix termux-va frame export and playback
lfdevs Aug 31, 2026
477d3c1
gallium/va: harden termux-va KGSL frame handoff
lfdevs Sep 4, 2026
3662a2c
gallium/va: fix KGSL H.264 frame handoff
lfdevs Sep 5, 2026
f42222f
gallium/va: fix High-profile H.264 CSD synthesis
lfdevs Sep 5, 2026
d49a79d
gallium/va: stabilize H.264 PPS reference defaults
lfdevs Sep 5, 2026
bfed970
gallium/va: add HEVC Main decode bridge
lfdevs Sep 5, 2026
bca0216
gallium/va: preserve HEVC SPS RPS count
lfdevs Sep 5, 2026
6d1d606
gallium/va: add AV1 decode bridge
lfdevs Sep 6, 2026
00d0a41
gallium/va: fix AV1 surface reuse and frame handoff
lfdevs Sep 6, 2026
5dcea88
gallium/va: infer H.264 PPS reference defaults
lfdevs Sep 6, 2026
e1217f6
gallium/va: support DRM-less KGSL containers
lfdevs Sep 6, 2026
84fc50f
gallium/va: fix KGSL video decode in DRM-less PRoot containers
lfdevs Sep 8, 2026
78d47ed
termux-va: add Wayland DRM shim for KGSL PRoot
lfdevs Sep 9, 2026
c03ec93
termux-va: allow disabling AV1 profile advertisement
lfdevs Sep 22, 2026
289d425
termux-va: handle hidden VP9 reference frames
lfdevs Sep 22, 2026
3a65f2f
gallium/va: stabilize synthesized H.264 PPS defaults
lfdevs Sep 22, 2026
c1cdcaf
gallium/va: add per-codec decode disable switches
lfdevs Sep 22, 2026
352f7c4
gallium/va: use stable H.264 PPS reference defaults
lfdevs Sep 22, 2026
14c3658
termux-va: handle GBM DRM capability probes on KGSL
lfdevs Sep 22, 2026
09c3fae
termux-va: Support Mali in the Wayland DRM shim
lfdevs Sep 24, 2026
71aef98
termux-va: expose AVC and HEVC hardware encoding
lfdevs Oct 3, 2026
b65710f
termux-va: Fix VAAPI fence synchronization in PRoot
lfdevs Oct 3, 2026
e14fffd
termux-va: forward encoder rate control to termux-va
lfdevs Oct 3, 2026
93183a7
termux-va: avoid shared linear binds on the explicit software backend
lfdevs Oct 4, 2026
3196b28
termux-va: expose VP9 encoding through termux-va
lfdevs Oct 4, 2026
7573b8c
termux-va: fix Chromium NV12 encoding and decoder teardown
lfdevs Oct 7, 2026
6c957f9
freedreno/a6xx: refresh bound sampler views before texture cache lookup
lfdevs Oct 8, 2026
8cd58be
egl/dri2: preserve KGSL EGL device for hardware acceleration
lfdevs Oct 9, 2026
a7d6548
va/av1: fix reconstructed bitstream for Pixel MediaCodec
lfdevs Oct 10, 2026
f4a3993
gallium/va: fix AV1 end-of-stream hangs in termux-va bridge
lfdevs Oct 11, 2026
8c09527
gallium/va: adapt AV1 reconstruction for Pixel C2 decoders
lfdevs Oct 11, 2026
5687335
gallium/va: fix termux-va H.264 and HEVC bootstrap decoding
lfdevs Oct 12, 2026
ffe54f8
gallium/va: fix AV1 tile sizes and Pixel frame reconstruction
lfdevs Oct 12, 2026
45a6a2c
gallium/va: Drain terminal reordered AVC and HEVC frames
lfdevs Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -165,7 +168,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -271,7 +277,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -375,7 +384,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -494,7 +506,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -598,7 +613,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -702,7 +720,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -775,6 +796,7 @@ jobs:
python3-Mako python3-packaging python3-yaml python3-ply \
libffi-devel \
libzstd-devel \
libva-devel \
glslang

- name: Cache ccache
Expand Down Expand Up @@ -818,7 +840,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down Expand Up @@ -923,7 +948,10 @@ jobs:
--prefix=/usr \
-Dplatforms=x11,wayland \
-Dgallium-drivers=freedreno,zink,virgl,llvmpipe \
-Dgallium-va=disabled \
-Dgallium-va=enabled \
-Dtermux-va-bridge=enabled \
-Dtermux-va-wayland-shim=enabled \
-Dvideo-codecs=all \
-Dgallium-mediafoundation=disabled \
-Dvulkan-drivers=freedreno \
-Dvulkan-layers= \
Expand Down
102 changes: 102 additions & 0 deletions docs/envvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,108 @@ VA-API environment variables

enable MPEG4 for VA-API, disabled by default.

termux-va bridge environment variables
--------------------------------------

The termux-va bridge forwards VA-API video decoding over a Unix socket to
the termux-va daemon running in Termux (Android MediaCodec hardware
decode). See :doc:`termux-va`.

.. envvar:: TERMUX_VA_BRIDGE

``1``/``true`` forces the bridge on, ``0``/``false`` forces it off.
When unset, the bridge activates automatically if ``TERMUX_VA_SOCKET``
or ``TERMUX_VA_SOCKET_DIR`` is set, or if the default endpoint exists
as a socket.

.. envvar:: TERMUX_VA_SOCKET

Full path of the daemon's Unix socket file, overriding the default
``/tmp/termux-va/termux-va.sock`` (the container-side view of the
Termux ``$TMPDIR/termux-va/`` shared-tmp directory).

.. envvar:: TERMUX_VA_SOCKET_DIR

Directory containing the socket; ``termux-va.sock`` is appended.
Takes effect when ``TERMUX_VA_SOCKET`` is unset. The same two
variables are understood by the daemon itself, so one setting covers
both ends.

.. envvar:: TERMUX_VA_GPU_BACKEND

selects how the bridge creates the underlying screen that hosts the
decode surfaces:

- ``auto`` (default): try the stock loader and fall back to llvmpipe. The KGSL alias is not attempted automatically.
- ``kgsl``: force the KGSL Freedreno alias. GPU submission uses
``/dev/kgsl-3d0`` while the handed fd remains the control/identity fd.
EGL and GLX loader selection follows this value, so
``MESA_LOADER_DRIVER_OVERRIDE=kgsl`` and ``FD_FORCE_KGSL=1`` are not
required separately.
- ``drm``: use stock loader selection only.
- ``sw``: use llvmpipe only; no GPU is needed for the CPU frame-copy paths.

.. envvar:: TERMUX_VA_DISABLE_AVC

set to ``1``, ``true`` or ``on`` to hide the H.264/AVC profiles from
libva. ``TERMUX_VA_DISABLE_H264`` is accepted as a compatibility alias.

.. envvar:: TERMUX_VA_DISABLE_HEVC

set to ``1``, ``true`` or ``on`` to hide the HEVC Main profile from libva.

.. envvar:: TERMUX_VA_DISABLE_VP9

set to ``1``, ``true`` or ``on`` to hide the VP9 Profile 0 profile from
libva.

.. envvar:: TERMUX_VA_DISABLE_AV1

set to ``1``, ``true`` or ``on`` to hide the AV1 Main profile from libva.
This is useful when Android exposes only a software MediaCodec component
for AV1, so applications can use their native software decoder instead.

.. envvar:: DMD_WANT_SHM

set to ``0`` to disable the memfd shared-memory frame transport
(zero-copy) and always receive frames inline on the socket. The
``DMD_`` prefix is kept for compatibility with the upstream protocol
tooling.

.. envvar:: TERMUX_VA_PIPELINE_DEPTH

sets the bridge's normal pending-picture depth to a value from 2 to 32
(default 6).
When shared-memory transport is enabled, the value is clamped to the
daemon's ``SHM_SLOTS`` limit.

.. envvar:: DMD_VA_CPU_COPY

controls how staged frames are copied into bridge surfaces. On the KGSL
backend CPU-mapped writes are enabled by default to make the cache handoff
to a separate Vulkan/KGSL importer explicit. Set to ``0``, ``false`` or
``off`` to retain the asynchronous Gallium ``texture_subdata`` path; set
to any other non-empty value to force CPU copies.

.. envvar:: DMD_VA_CONTIGUOUS_DMABUF

controls the NV12 surface layout exported to consumers. Set to ``1``,
``true`` or ``on`` to place both planes in one dma-buf, or to ``0`` (or any
other value) to retain separate plane objects. When unset, the bridge
automatically selects the single-object layout for a KGSL-only container
that has no DRM render node; this is required by Chromium's current native
pixmap importer. ``TERMUX_VA_CONTIGUOUS_DMABUF`` is an alias.

.. envvar:: DMD_VA_LOG

set to ``1`` to enable the bridge's daemon-client logging on stderr.

.. envvar:: LIBVA_DRIVER_NAME

set to ``termuxva`` to make libva load the bridge through the
``termuxva_drv_video.so`` megadriver symlink (recommended; automatic
driver discovery does not know the bridge).

VC4 driver environment variables
--------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Linux, FreeBSD, and other operating systems.
isaspec
rusticl
android
termux-va
macos
Linux Kernel Drivers <https://www.kernel.org/doc/html/latest/gpu/>

Expand Down
Loading