drm/vc4: Add fragment shader threading support
authorJonas Pfeil <pfeiljonas@gmx.de>
Mon, 7 Nov 2016 23:18:39 +0000 (00:18 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 9 Mar 2017 17:52:37 +0000 (17:52 +0000)
commitdab785645e03fc00b665a69e209a8a1f19f6dfd2
tree86a9b9bfdc8b8f27528dc9d0ae36f58bbc69065e
parent0b68e6bfd1f2a687eb845462c8bdb3e81e8622e4
drm/vc4: Add fragment shader threading support

FS threading brings performance improvements of 0-20% in glmark2.

The validation code checks for thread switch signals and ensures that
the registers of the other thread are not touched, and that our clamps
are not live across thread switches.  It also checks that the
threading and branching instructions do not interfere.

(Original patch by Jonas, changes by anholt for style cleanup,
removing validation the kernel doesn't need to do, and adding the flag
for userspace).

v2: Minor style fixes from checkpatch.

Signed-off-by: Jonas Pfeil <pfeiljonas@gmx.de>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit c778cc5df944291dcdb1ca7a6bb781fbc22550c5)
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_validate.c
drivers/gpu/drm/vc4/vc4_validate_shaders.c
include/uapi/drm/vc4_drm.h