drm/vc4: Fix races when the CS reads from render targets.
authorEric Anholt <eric@anholt.net>
Tue, 27 Sep 2016 16:03:13 +0000 (09:03 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 6 Oct 2016 18:53:50 +0000 (11:53 -0700)
commit7edabee06a5622190d59689a64f5e17d1c343cc3
treeae271f8f9fc2af7cdbf9b9bf84e17f99180a388d
parent57b9f569447c4ab7b2a7e34a13e468311db4cd64
drm/vc4: Fix races when the CS reads from render targets.

With the introduction of bin/render pipelining, the previous job may
not be completed when we start binning the next one.  If the previous
job wrote our VBO, IB, or CS textures, then the binning stage might
get stale or uninitialized results.

Fixes the major rendering failure in glmark2 -b terrain.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs")
Cc: stable@vger.kernel.org
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_gem.c
drivers/gpu/drm/vc4/vc4_render_cl.c
drivers/gpu/drm/vc4/vc4_validate.c