]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 11:02:04 +0000 (05:02 -0600)
commit17ec8f95eddc1d0ba2560ed25256e6ca417638c2
treeae9741227e465491aeb2d1148e2edbb4570ae99a
parent3cf02960bc4def449050e7a65802611f550e20fb
drm/vc4: Fix races when the CS reads from render targets.

commit 7edabee06a5622190d59689a64f5e17d1c343cc3 upstream.

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")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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