drm/vc4: Add fragment shader threading support
authorJonas Pfeil <pfeiljonas@gmx.de>
Mon, 7 Nov 2016 23:18:39 +0000 (00:18 +0100)
committerEric Anholt <eric@anholt.net>
Wed, 16 Nov 2016 21:25:26 +0000 (13:25 -0800)
commitc778cc5df944291dcdb1ca7a6bb781fbc22550c5
tree98fc974a019af9af6975499fc68c267f78a42f34
parent3a62234680d86efa0239665ed8a0e908f1aef147
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>
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