€•`€Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/pt_BR/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/gpu/vc4”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ$drm/vc4 Broadcom VC4 Graphics Driver”h]”hŒ$drm/vc4 Broadcom VC4 Graphics Driver”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ5/var/lib/git/docbuild/linux/Documentation/gpu/vc4.rst”h´KubhŒ paragraph”“”)”}”(hŒÙThe Broadcom VideoCore 4 (present in the Raspberry Pi) contains a OpenGL ES 2.0-compatible 3D engine called V3D, and a highly configurable display output pipeline that supports HDMI, DSI, DPI, and Composite TV output.”h]”hŒÙThe Broadcom VideoCore 4 (present in the Raspberry Pi) contains a OpenGL ES 2.0-compatible 3D engine called V3D, and a highly configurable display output pipeline that supports HDMI, DSI, DPI, and Composite TV output.”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒT/var/lib/git/docbuild/linux/Documentation/gpu/vc4:5: ./drivers/gpu/drm/vc4/vc4_drv.c”h´Khh·h²hubhÌ)”}”(hXGThe 3D engine also has an interface for submitting arbitrary compute shader-style jobs using the same shader processor as is used for vertex and fragment shaders in GLES 2.0. However, given that the hardware isn't able to expose any standard interfaces like OpenGL compute shaders or OpenCL, it isn't supported by this driver.”h]”hXKThe 3D engine also has an interface for submitting arbitrary compute shader-style jobs using the same shader processor as is used for vertex and fragment shaders in GLES 2.0. However, given that the hardware isn’t able to expose any standard interfaces like OpenGL compute shaders or OpenCL, it isn’t supported by this driver.”…””}”(hhÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒT/var/lib/git/docbuild/linux/Documentation/gpu/vc4:5: ./drivers/gpu/drm/vc4/vc4_drv.c”h´K hh·h²hubh¶)”}”(hhh]”(h»)”}”(hŒDisplay Hardware Handling”h]”hŒDisplay Hardware Handling”…””}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhëh²hh³hÊh´K ubhÌ)”}”(hŒ»This section covers everything related to the display hardware including the mode setting infrastructure, plane, sprite and cursor handling and display, output probing and related topics.”h]”hŒ»This section covers everything related to the display hardware including the mode setting infrastructure, plane, sprite and cursor handling and display, output probing and related topics.”…””}”(hhüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhëh²hubh¶)”}”(hhh]”(h»)”}”(hŒPixel Valve (DRM CRTC)”h]”hŒPixel Valve (DRM CRTC)”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KubhÌ)”}”(hŒûIn VC4, the Pixel Valve is what most closely corresponds to the DRM's concept of a CRTC. The PV generates video timings from the encoder's clock plus its configuration. It pulls scaled pixels from the HVS at that timing, and feeds it to the encoder.”h]”hŒÿIn VC4, the Pixel Valve is what most closely corresponds to the DRM’s concept of a CRTC. The PV generates video timings from the encoder’s clock plus its configuration. It pulls scaled pixels from the HVS at that timing, and feeds it to the encoder.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:18: ./drivers/gpu/drm/vc4/vc4_crtc.c”h´Khj h²hubhÌ)”}”(hŒÏHowever, the DRM CRTC also collects the configuration of all the DRM planes attached to it. As a result, the CRTC is also responsible for writing the display list for the HVS channel that the CRTC will use.”h]”hŒÏHowever, the DRM CRTC also collects the configuration of all the DRM planes attached to it. As a result, the CRTC is also responsible for writing the display list for the HVS channel that the CRTC will use.”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:18: ./drivers/gpu/drm/vc4/vc4_crtc.c”h´K hj h²hubhÌ)”}”(hXBThe 2835 has 3 different pixel valves. pv0 in the audio power domain feeds DSI0 or DPI, while pv1 feeds DS1 or SMI. pv2 in the image domain can feed either HDMI or the SDTV controller. The pixel valve chooses from the CPRMAN clocks (HSM for HDMI, VEC for SDTV, etc.) according to which output type is chosen in the mux.”h]”hXBThe 2835 has 3 different pixel valves. pv0 in the audio power domain feeds DSI0 or DPI, while pv1 feeds DS1 or SMI. pv2 in the image domain can feed either HDMI or the SDTV controller. The pixel valve chooses from the CPRMAN clocks (HSM for HDMI, VEC for SDTV, etc.) according to which output type is chosen in the mux.”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:18: ./drivers/gpu/drm/vc4/vc4_crtc.c”h´Khj h²hubhÌ)”}”(hXFor power management, the pixel valve's registers are all clocked by the AXI clock, while the timings and FIFOs make use of the output-specific clock. Since the encoders also directly consume the CPRMAN clocks, and know what timings they need, they are the ones that set the clock.”h]”hXFor power management, the pixel valve’s registers are all clocked by the AXI clock, while the timings and FIFOs make use of the output-specific clock. Since the encoders also directly consume the CPRMAN clocks, and know what timings they need, they are the ones that set the clock.”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:18: ./drivers/gpu/drm/vc4/vc4_crtc.c”h´Khj h²hubeh}”(h]”Œpixel-valve-drm-crtc”ah ]”h"]”Œpixel valve (drm crtc)”ah$]”h&]”uh1hµhhëh²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒHVS”h]”hŒHVS”…””}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj_h²hh³hÊh´KubhÌ)”}”(hX^The Hardware Video Scaler (HVS) is the piece of hardware that does translation, scaling, colorspace conversion, and compositing of pixels stored in framebuffers into a FIFO of pixels going out to the Pixel Valve (CRTC). It operates at the system clock rate (the system audio clock gate, specifically), which is much higher than the pixel clock rate.”h]”hX^The Hardware Video Scaler (HVS) is the piece of hardware that does translation, scaling, colorspace conversion, and compositing of pixels stored in framebuffers into a FIFO of pixels going out to the Pixel Valve (CRTC). It operates at the system clock rate (the system audio clock gate, specifically), which is much higher than the pixel clock rate.”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:24: ./drivers/gpu/drm/vc4/vc4_hvs.c”h´Khj_h²hubhÌ)”}”(hŒÏThere is a single global HVS, with multiple output FIFOs that can be consumed by the PVs. This file just manages the resources for the HVS, while the vc4_crtc.c code actually drives HVS setup for each CRTC.”h]”hŒÏThere is a single global HVS, with multiple output FIFOs that can be consumed by the PVs. This file just manages the resources for the HVS, while the vc4_crtc.c code actually drives HVS setup for each CRTC.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:24: ./drivers/gpu/drm/vc4/vc4_hvs.c”h´Khj_h²hubeh}”(h]”Œhvs”ah ]”h"]”Œhvs”ah$]”h&]”uh1hµhhëh²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒ HVS planes”h]”hŒ HVS planes”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj–h²hh³hÊh´KubhÌ)”}”(hŒAEach DRM plane is a layer of pixels being scanned out by the HVS.”h]”hŒAEach DRM plane is a layer of pixels being scanned out by the HVS.”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒW/var/lib/git/docbuild/linux/Documentation/gpu/vc4:30: ./drivers/gpu/drm/vc4/vc4_plane.c”h´Khj–h²hubhÌ)”}”(hXBAt atomic modeset check time, we compute the HVS display element state that would be necessary for displaying the plane (giving us a chance to figure out if a plane configuration is invalid), then at atomic flush time the CRTC will ask us to write our element state into the region of the HVS that it has allocated for us.”h]”hXBAt atomic modeset check time, we compute the HVS display element state that would be necessary for displaying the plane (giving us a chance to figure out if a plane configuration is invalid), then at atomic flush time the CRTC will ask us to write our element state into the region of the HVS that it has allocated for us.”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒW/var/lib/git/docbuild/linux/Documentation/gpu/vc4:30: ./drivers/gpu/drm/vc4/vc4_plane.c”h´K hj–h²hubeh}”(h]”Œ hvs-planes”ah ]”h"]”Œ hvs planes”ah$]”h&]”uh1hµhhëh²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒ HDMI encoder”h]”hŒ HDMI encoder”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÍh²hh³hÊh´K"ubhÌ)”}”(hŒ®The HDMI core has a state machine and a PHY. On BCM2835, most of the unit operates off of the HSM clock from CPRMAN. It also internally uses the PLLH_PIX clock for the PHY.”h]”hŒ®The HDMI core has a state machine and a PHY. On BCM2835, most of the unit operates off of the HSM clock from CPRMAN. It also internally uses the PLLH_PIX clock for the PHY.”…””}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:36: ./drivers/gpu/drm/vc4/vc4_hdmi.c”h´K hjÍh²hubhÌ)”}”(hŒ{HDMI infoframes are kept within a small packet ram, where each packet can be individually enabled for including in a frame.”h]”hŒ{HDMI infoframes are kept within a small packet ram, where each packet can be individually enabled for including in a frame.”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:36: ./drivers/gpu/drm/vc4/vc4_hdmi.c”h´KhjÍh²hubhÌ)”}”(hXHDMI audio is implemented entirely within the HDMI IP block. A register in the HDMI encoder takes SPDIF frames from the DMA engine and transfers them over an internal MAI (multi-channel audio interconnect) bus to the encoder side for insertion into the video blank regions.”h]”hXHDMI audio is implemented entirely within the HDMI IP block. A register in the HDMI encoder takes SPDIF frames from the DMA engine and transfers them over an internal MAI (multi-channel audio interconnect) bus to the encoder side for insertion into the video blank regions.”…””}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:36: ./drivers/gpu/drm/vc4/vc4_hdmi.c”h´KhjÍh²hubhÌ)”}”(hŒêThe driver's HDMI encoder does not yet support power management. The HDMI encoder's power domain and the HSM/pixel clocks are kept continuously running, and only the HDMI logic and packet ram are powered off/on at disable/enable time.”h]”hŒîThe driver’s HDMI encoder does not yet support power management. The HDMI encoder’s power domain and the HSM/pixel clocks are kept continuously running, and only the HDMI logic and packet ram are powered off/on at disable/enable time.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:36: ./drivers/gpu/drm/vc4/vc4_hdmi.c”h´KhjÍh²hubhÌ)”}”(hŒ[The driver does not yet support CEC control, though the HDMI encoder block has CEC support.”h]”hŒ[The driver does not yet support CEC control, though the HDMI encoder block has CEC support.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒV/var/lib/git/docbuild/linux/Documentation/gpu/vc4:36: ./drivers/gpu/drm/vc4/vc4_hdmi.c”h´KhjÍh²hubeh}”(h]”Œ hdmi-encoder”ah ]”h"]”Œ hdmi encoder”ah$]”h&]”uh1hµhhëh²hh³hÊh´K"ubh¶)”}”(hhh]”(h»)”}”(hŒ DSI encoder”h]”hŒ DSI encoder”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj1h²hh³hÊh´K(ubhÌ)”}”(hŒŠBCM2835 contains two DSI modules, DSI0 and DSI1. DSI0 is a single-lane DSI controller, while DSI1 is a more modern 4-lane DSI controller.”h]”hŒŠBCM2835 contains two DSI modules, DSI0 and DSI1. DSI0 is a single-lane DSI controller, while DSI1 is a more modern 4-lane DSI controller.”…””}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:42: ./drivers/gpu/drm/vc4/vc4_dsi.c”h´Khj1h²hubhÌ)”}”(hŒzMost Raspberry Pi boards expose DSI1 as their "DISPLAY" connector, while the compute module brings both DSI0 and DSI1 out.”h]”hŒ~Most Raspberry Pi boards expose DSI1 as their “DISPLAY†connector, while the compute module brings both DSI0 and DSI1 out.”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:42: ./drivers/gpu/drm/vc4/vc4_dsi.c”h´K hj1h²hubhÌ)”}”(hŒŠThis driver has been tested for DSI1 video-mode display only currently, with most of the information necessary for DSI0 hopefully present.”h]”hŒŠThis driver has been tested for DSI1 video-mode display only currently, with most of the information necessary for DSI0 hopefully present.”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:42: ./drivers/gpu/drm/vc4/vc4_dsi.c”h´Khj1h²hubeh}”(h]”Œ dsi-encoder”ah ]”h"]”Œ dsi encoder”ah$]”h&]”uh1hµhhëh²hh³hÊh´K(ubh¶)”}”(hhh]”(h»)”}”(hŒ DPI encoder”h]”hŒ DPI encoder”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjwh²hh³hÊh´K.ubhÌ)”}”(hŒThe VC4 DPI hardware supports MIPI DPI type 4 and Nokia ViSSI signals. On BCM2835, these can be routed out to GPIO0-27 with the ALT2 function.”h]”hŒThe VC4 DPI hardware supports MIPI DPI type 4 and Nokia ViSSI signals. On BCM2835, these can be routed out to GPIO0-27 with the ALT2 function.”…””}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:48: ./drivers/gpu/drm/vc4/vc4_dpi.c”h´Khjwh²hubeh}”(h]”Œ dpi-encoder”ah ]”h"]”Œ dpi encoder”ah$]”h&]”uh1hµhhëh²hh³hÊh´K.ubh¶)”}”(hhh]”(h»)”}”(hŒVEC (Composite TV out) encoder”h]”hŒVEC (Composite TV out) encoder”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjŸh²hh³hÊh´K4ubhÌ)”}”(hŒ=The VEC encoder generates PAL or NTSC composite video output.”h]”hŒ=The VEC encoder generates PAL or NTSC composite video output.”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:54: ./drivers/gpu/drm/vc4/vc4_vec.c”h´KhjŸh²hubhÌ)”}”(hŒ¤TV mode selection is done by an atomic property on the encoder, because a drm_mode_modeinfo is insufficient to distinguish between PAL and PAL-M or NTSC and NTSC-J.”h]”hŒ¤TV mode selection is done by an atomic property on the encoder, because a drm_mode_modeinfo is insufficient to distinguish between PAL and PAL-M or NTSC and NTSC-J.”…””}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³ŒU/var/lib/git/docbuild/linux/Documentation/gpu/vc4:54: ./drivers/gpu/drm/vc4/vc4_vec.c”h´K hjŸh²hubeh}”(h]”Œvec-composite-tv-out-encoder”ah ]”h"]”Œvec (composite tv out) encoder”ah$]”h&]”uh1hµhhëh²hh³hÊh´K4ubeh}”(h]”Œdisplay-hardware-handling”ah ]”h"]”Œdisplay hardware handling”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)”}”(hhh]”(h»)”}”(hŒ KUnit Tests”h]”hŒ KUnit Tests”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÞh²hh³hÊh´K:ubhÌ)”}”(hŒPThe VC4 Driver uses KUnit to perform driver-specific unit and integration tests.”h]”hŒPThe VC4 Driver uses KUnit to perform driver-specific unit and integration tests.”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K