-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vc4 loops support #1597
vc4 loops support #1597
Conversation
We were doing this with manual firmware calls before, but to backport runtime PM we want to be using a proper power domain. Signed-off-by: Eric Anholt <[email protected]>
This may actually get us a feature that the closed driver didn't have: turning off the GPU in between rendering jobs, while the V3D device is still opened by the client. There may be some tuning to be applied here to use autosuspend so that we don't bounce the device's power so much, but in steady-state GPU-bound rendering we keep the power on (since we keep multiple jobs outstanding) and even if we power cycle on every job we can still manage at least 680 fps. More importantly, though, runtime PM will allow us to power off the device to do a GPU reset. v2: Switch #ifdef to CONFIG_PM not CONFIG_PM_SLEEP (caught by kbuild test robot) Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit 001bdb5)
This gets us functional GPU reset again, like we had until a refactor at merge time. Tested with a little patch to stuff in a broken binner job every 100 frames. Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit 36cb625)
Signed-off-by: Eric Anholt <[email protected]>
The force-connected started out because I didn't know how to read the HPD pin successfully, which required the hpd_active_low check and getting the correct active level into the DTs. It stayed because we don't have the Pi3's HPD line exposed to Linux, so this was the only way to bring up graphics on it. However, with the DSI panel support now present, users want to be able to run DSI-only systems, and forcing HDMI on is interfering with default screen configurations. Work around the Pi3's missing HPD by probing the DDC on I2C and see if it's present at all. Signed-off-by: Eric Anholt <[email protected]>
I've tested it builds for Pi1/Pi2 and Neverball still runs. @pelwell there's a couple of device tree changes - okay with you? |
The hpd-gpios change bothers me a bit - yes it was the wrong pin, but bcm2708_common.dtsi still specifies GPIO 46 for hpd, albeit with the opposite sense. Are you happy that this is OK? |
Oh, we shouldn't have the HPD in the common file, since it's not common. |
The HPD is quite board-specific, so we need to set it in the per-board DT.
It's actually off on the GPIO expander, which I don't think we have access to. Signed-off-by: Eric Anholt <[email protected]>
As I extend the driver to support different V3D revisions, userspace needs to know what version it's targeting. This is most easily detected using the V3D identity registers. v2: Make sure V3D is runtime PM on when reading the registers. v3: Switch to a 64-bit param value (suggested by Rob Clark in review) Signed-off-by: Eric Anholt <[email protected]> Acked-by: Daniel Vetter <[email protected]> (v2) Reviewed-by: Rob Clark <[email protected]> (v3, over irc) (cherry picked from commit af71379) v4: Squashed in "drm/vc4: Fix handling of a pm_runtime_get_sync() success case."
Reduces the argument count for some of the functions, and will be used more with the upcoming looping support. Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit d0566c2)
This isn't used yet, it's just a first step toward loop validation. During the main parsing of instructions, we need to know when we hit a new basic block so that we can reset validated state. v2: Fix a stray semicolon after an if block. (caught by kbuild test). Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit 93aa9ae)
We're already checking that branch instructions are between the start of the shader and the proper PROG_END sequence. The other thing we need to make branching safe is to verify that the shader doesn't read past the end of the uniforms stream. To do that, we require that at any basic block reading uniforms have the following instructions: load_imm temp, <next offset within uniform stream> add unif_addr, temp, unif The instructions are generated by userspace, and the kernel verifies that the load_imm is of the expected offset, and that the add adds it to a uniform. We track which uniform in the stream that is, and at draw call time fix up the uniform stream to have the address of the start of the shader's uniforms at that location. Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit 6d45c81)
Userspace needs to know if it can create shaders that do branching. Otherwise, for backwards compatibility with old kernels it needs to lower if statements to conditional assignments. Signed-off-by: Eric Anholt <[email protected]> (cherry picked from commit 7363cee)
This came from the initial bringup code, which always idled the GPU and always reset the overflow. That massively increases the size of the working set when you're doing lots of small draws, though, as is common on X desktops or piglit. Signed-off-by: Eric Anholt <[email protected]>
If you managed to exceed the limit to switch to vmalloc, we'd use the wrong free. Signed-off-by: Eric Anholt <[email protected]> Fixes: d5b1a78 ("drm/vc4: Add support for drawing 3D frames.") Cc: [email protected]
We'd end up NULL pointer dereferencing because we didn't take the error path out in the parent. Fixes igt vc4_lookup_fail test. Signed-off-by: Eric Anholt <[email protected]> Fixes: d5b1a78 ("drm/vc4: Add support for drawing 3D frames.") Cc: [email protected]
Overflow memory handling is tricky: While it's still referenced by the BPO registers, we want to keep it from being freed. When we are putting a new set of overflow memory in the registers, we need to assign the old one to the last rendering job using it. We were looking at "what's currently running in the binner", but since the bin/render submission split, we may end up with the binner completing and having no new job while the renderer is still processing. So, if we don't find a bin job at all, look at the highest-seqno (last) render job to attach our overflow to. Signed-off-by: Eric Anholt <[email protected]> Fixes: ca26d28 ("drm/vc4: improve throughput by pipelining binning and rendering jobs") Cc: [email protected]
71e9d2f
to
eed3547
Compare
That looks better. Merge away. |
See: raspberrypi/linux#1596 kernel: drm/vc4: vc4 loops support See: raspberrypi/linux#1597 kernel: Add cm3 dts file See: raspberrypi/linux#1595 kernel: net: ethernet: enc28j60: add device tree support kernel: enc28j60: Fix race condition in enc28j60 driver See: raspberrypi/linux#1385 firmware: platform: Don't swap audio L&R if using GPIOs 12&13 See: http://github.com/raspberrypi/linux/issues/1473 firmware: hdmi: Increase muting before resolution change firmware: board_info: Add cm3-specific dtb file firmware: Ensure extended part of vg_spath is zeroed See: raspberrypi/linux#943
See: raspberrypi/linux#1596 kernel: drm/vc4: vc4 loops support See: raspberrypi/linux#1597 kernel: Add cm3 dts file See: raspberrypi/linux#1595 kernel: net: ethernet: enc28j60: add device tree support kernel: enc28j60: Fix race condition in enc28j60 driver See: raspberrypi/linux#1385 firmware: platform: Don't swap audio L&R if using GPIOs 12&13 See: http://github.com/raspberrypi/linux/issues/1473 firmware: hdmi: Increase muting before resolution change firmware: board_info: Add cm3-specific dtb file firmware: Ensure extended part of vg_spath is zeroed See: raspberrypi/linux#943
- kernel: config: Enable SENSORS_LM75 See: #508 - kernel: config: Enable SERIAL_SC16IS7XX See: raspberrypi/linux#1594 - kernel: snd-bcm2835: Don't allow responses from VC to be interrupted by user signals See: raspberrypi/linux#1560 - kernel: Merge many vc4 changes from drm-vc4-next-2016-07-15 See: raspberrypi/linux#1596 - kernel: drm/vc4: vc4 loops support See: raspberrypi/linux#1597 - kernel: Add cm3 dts file See: raspberrypi/linux#1595 - kernel: net: ethernet: enc28j60: add device tree support - kernel: enc28j60: Fix race condition in enc28j60 driver See: raspberrypi/linux#1385 - firmware: platform: Don't swap audio L&R if using GPIOs 12&13 See: http://github.com/raspberrypi/linux/issues/1473 - firmware: hdmi: Increase muting before resolution change - firmware: board_info: Add cm3-specific dtb file - firmware: Ensure extended part of vg_spath is zeroed See: raspberrypi/linux#943 - kernel: config: Enable SERIAL_SC16IS7XX_SPI See: raspberrypi/linux#1594 - kernel: Added Overlay for Microchip MCP23S08/17 SPI gpio expanders See: raspberrypi/linux#1566 - kernel: BCM270X_DT: Add audio_pins to CM dtb - kernel: BCM270X_DT: Don't enable UART0 in CM3 dtb - kernel: overlays: Add audremap overlay - kernel: overlays: Add swap_lr and enable_jack to audremap See: raspberrypi/linux#1473 - firmware: Raspi[Still|Vid]Yuv: Add option for just saving luma See: raspberrypi/userland#170 - firmware: RaspiVidYuv: Add option of saving RGB data - firmware: Only change I2C/GPIO pin functions when needed - firmware: platform: Redo the audio remapping logic See: raspberrypi/linux#1473 - kernel: overlays: added sc16is750 UART over I2C See: raspberrypi/linux#1617 - kernel: config: Add CONFIG_IPVLAN module See: raspberrypi/linux#1612 - kernel: config: Add CONFIG_VXLAN module See: raspberrypi/linux#1614 - firmware: platform: Make the default UART0 clock 48MHz for all Pis See: raspberrypi/linux#1601 See: #643 - firmware: cacheasm: Enable workaround for unwanted sdram write after flush/invalidate See: raspberrypi/linux#943 - firmware: vchiq_arm: Fix return value of vchiq_initialise See: raspberrypi/userland#331 - firmware: Revert temp: Ensure extended part of vg_spath is zeroed See: raspberrypi/linux#943 - firmware: MMAL: Support MMAL_ENCODING_xxx_SLICE formats - firmware: arm_display: Add bitmapped icons for warning conditions See: #367 - firmware: deinterlace: Avoid frame doubling with progressive frames See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2412845#pid2412845 - kernel: config: Enable SENSORS_INA2XX module See: raspberrypi/linux#1632 - kernel: overlays: Add dpi18 overlay See: raspberrypi/linux#1634 - kernel: brcmfmac: do not use internal roaming engine by default See: http://projectable.me/optimize-my-pi-wi-fi/ - firmware: arm_display: Fix alpha of warning icons See: #367 - firmware: mmal: Advertise sliced formats in MMAL_PARAMETER_SUPPORTED_ENCODINGS - firmware: IL Resize: Accept strides greater than the minimum - firmware: vmcs_host: Poll for multiple dispmanx messages - firmware: VCHI clients: Poll for messages until empty See: https://discourse.osmc.tv/t/april-update-causes-system-freezes/15361/183 - firmware: tvservice/cecservice: Make unexpected messages more fatal - kernel: drm/vc4: Allow some more signals to be packed with uniform resets See: raspberrypi/linux#1636 - kernel: Rpi 4.4.y firmware kms See: raspberrypi/linux#1637 - firmware: tvservice/cecservice: We only care about unexpected message sizes - firmware: khronos: Avoid starting khronos service when vc4-kms-v3d is active - firmeare: arm_loader: Enable fake_vsync_isr when fkms overlay is used See: raspberrypi/linux#1637 - firmware: vcdbg: Add support for vchiq debugging
See: raspberrypi/linux#1596 kernel: drm/vc4: vc4 loops support See: raspberrypi/linux#1597 kernel: Add cm3 dts file See: raspberrypi/linux#1595 kernel: net: ethernet: enc28j60: add device tree support kernel: enc28j60: Fix race condition in enc28j60 driver See: raspberrypi/linux#1385 firmware: platform: Don't swap audio L&R if using GPIOs 12&13 See: http://github.com/raspberrypi/linux/issues/1473 firmware: hdmi: Increase muting before resolution change firmware: board_info: Add cm3-specific dtb file firmware: Ensure extended part of vg_spath is zeroed See: raspberrypi/linux#943
This is a followon to rpi-4.4.y-vc4-backports (and can supercede it) that also brings in runtime PM for V3D, GLSL loops support, and also includes a brief detour to improve HDMI detection and a couple other bugfixes.