1V3D
2===
3
4Mesa's ``v3d`` graphics driver stack includes a `conformant GLES3.1
5driver
6<https://www.khronos.org/conformance/adopters/conformant-products/opengles#submission_882>`__
7called ``v3d`` and a Vulkan graphics driver called ``v3dv``, notably
8used on the Raspberry Pi 4.
9
10The v3d Mesa drivers communicate directly with the `v3d
11<https://www.kernel.org/doc/html/latest/gpu/v3d.html>`__ kernel DRM
12driver for scheduling GPU commands.  Additionally, on the Raspberry Pi
134, the kernel uses the vc4 DRM driver for display support, so Mesa
14exposes a ``vc4_dri.so`` using the kmsro helpers to do
15behind-the-scenes buffer management between the two kernel drivers,
16while executing rendering on the v3d kernel module.
17
18Initial development work was done on the Broadcom 7268 (V3D 3.3) and
197278 (V3D 4.1).  Development since then has been on V3D 4.2, and
20though the 3.3 and 4.1 support continues to remain in tree, it is not
21tested any more.  Broadcom's reference software platforms do not make
22use of the open source v3d stack, but porting a particular hardware
23implementation to use it would still be possible.
24
25Hardware Documentation
26----------------------
27
28Broadcom never released a public specification for the V3D 3.x or 4.x
29series.
30
31For driver developers, Broadcom publicly released a `specification
32<https://docs.broadcom.com/doc/12358545>`__ PDF for the 21553, which
33is closely related to the vc4 GPU present in the Raspberry Pi.  They
34also released a `snapshot <https://docs.broadcom.com/docs/12358546>`__
35of a corresponding Android graphics driver.  That graphics driver was
36ported to Raspbian for a demo, but was not expected to have ongoing
37development.
38
39Developers with NDA access with Broadcom or Raspberry Pi can get
40access to the V3D architecture specification for documentation of the
41GPU's programming model.  There is also a C++ software simulator
42called simpenrose, and the Mesa driver includes a backend
43(``src/broadcom/drm-shim/``) to use simpenrose from an x86 system with
44the i915 graphics driver with all of the vc4 rendering commands
45emulated on simpenrose and memcpyed to the real GPU.  Note that
46simpenrose's API drifts over time, so you need to be syned up with
47whatever version Mesa was last being developed against.
48