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