€•„Œ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Œ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)”…””}”(hhùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hhö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 Khhö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.”…””}”(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 K hhö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.”…””}”(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 Khhö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.”…””}”(hj4hž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 Khhö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”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjKhž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.”…””}”(hj\hž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 KhjKhž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.”…””}”(hjkhž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 KhjKhž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”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhž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.”…””}”(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 Khjhž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.”…””}”(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 K hjhž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.”…””}”(hjLhž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 Khjhž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”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjchž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.”…””}”(hjthž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 Khjchž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