1*61046927SAndroid Build Coastguard WorkerV3D 2*61046927SAndroid Build Coastguard Worker=== 3*61046927SAndroid Build Coastguard Worker 4*61046927SAndroid Build Coastguard WorkerMesa's V3D graphics driver stack includes a `conformant GLES3.1 5*61046927SAndroid Build Coastguard Workerdriver 6*61046927SAndroid Build Coastguard Worker<https://www.khronos.org/conformance/adopters/conformant-products/opengles#submission_882>`__ 7*61046927SAndroid Build Coastguard Workercalled V3D and a Vulkan graphics driver called V3DV, notably 8*61046927SAndroid Build Coastguard Workerused on the Raspberry Pi 4 and Raspberry Pi 5. 9*61046927SAndroid Build Coastguard Worker 10*61046927SAndroid Build Coastguard WorkerThe V3D Mesa drivers communicate directly with the `V3D 11*61046927SAndroid Build Coastguard Worker<https://www.kernel.org/doc/html/latest/gpu/v3d.html>`__ kernel DRM 12*61046927SAndroid Build Coastguard Workerdriver for scheduling GPU commands. Additionally, on the Raspberry Pi 13*61046927SAndroid Build Coastguard Worker4 and 5, the kernel uses the VC4 DRM driver for display support, so Mesa 14*61046927SAndroid Build Coastguard Workerexposes a ``vc4_dri.so`` using the kmsro helpers to do 15*61046927SAndroid Build Coastguard Workerbehind-the-scenes buffer management between the two kernel drivers, 16*61046927SAndroid Build Coastguard Workerwhile executing rendering on the V3D kernel module. 17*61046927SAndroid Build Coastguard Worker 18*61046927SAndroid Build Coastguard WorkerInitial development work was done on the Broadcom 7268 (V3D 3.3) and 19*61046927SAndroid Build Coastguard Worker7278 (V3D 4.1). Development since then has been on V3D 4.2 (Raspberry 20*61046927SAndroid Build Coastguard WorkerPi 4), and V3D 7.1 (Raspberry Pi 5). When the support for V3D 7.1 21*61046927SAndroid Build Coastguard Workerlanded, the support for 3.3 and 4.1 was dropped as it was not tested 22*61046927SAndroid Build Coastguard Workeranymore (see `MR#25851 23*61046927SAndroid Build Coastguard Worker<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25851>`__) 24*61046927SAndroid Build Coastguard WorkerBroadcom's reference software platforms do not make use of the open 25*61046927SAndroid Build Coastguard Workersource V3D stack, but porting a particular hardware implementation to 26*61046927SAndroid Build Coastguard Workeruse it would still be possible. 27*61046927SAndroid Build Coastguard Worker 28*61046927SAndroid Build Coastguard WorkerHardware Documentation 29*61046927SAndroid Build Coastguard Worker---------------------- 30*61046927SAndroid Build Coastguard Worker 31*61046927SAndroid Build Coastguard WorkerBroadcom never released a public specification for the V3D 3.x or 4.x 32*61046927SAndroid Build Coastguard Workerseries. 33*61046927SAndroid Build Coastguard Worker 34*61046927SAndroid Build Coastguard WorkerFor driver developers, Broadcom publicly released a `specification 35*61046927SAndroid Build Coastguard Worker<https://docs.broadcom.com/doc/12358545>`__ PDF for the 21553, which 36*61046927SAndroid Build Coastguard Workeris closely related to the VC4 GPU present in the Raspberry Pi. They 37*61046927SAndroid Build Coastguard Workeralso released a `snapshot <https://docs.broadcom.com/docs/12358546>`__ 38*61046927SAndroid Build Coastguard Workerof a corresponding Android graphics driver. That graphics driver was 39*61046927SAndroid Build Coastguard Workerported to Raspbian for a demo, but was not expected to have ongoing 40*61046927SAndroid Build Coastguard Workerdevelopment. 41*61046927SAndroid Build Coastguard Worker 42*61046927SAndroid Build Coastguard WorkerDevelopers with NDA access with Broadcom or Raspberry Pi can get 43*61046927SAndroid Build Coastguard Workeraccess to the V3D architecture specification for documentation of the 44*61046927SAndroid Build Coastguard WorkerGPU's programming model. There is also a C++ software simulator 45*61046927SAndroid Build Coastguard Workercalled simpenrose, and the Mesa driver includes a backend 46*61046927SAndroid Build Coastguard Worker(``src/broadcom/drm-shim/``) to use simpenrose from an x86 system with 47*61046927SAndroid Build Coastguard Workerthe i915 graphics driver with all of the VC4 rendering commands 48*61046927SAndroid Build Coastguard Workeremulated on simpenrose and memcpyed to the real GPU. Note that 49*61046927SAndroid Build Coastguard Workersimpenrose's API drifts over time, so you need to be synced up with 50*61046927SAndroid Build Coastguard Workerwhatever version Mesa was last being developed against. 51