]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: Fix overflow mem unreferencing when the binner runs dry.
authorEric Anholt <eric@anholt.net>
Tue, 26 Jul 2016 20:47:14 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 20 Aug 2016 02:17:34 +0000 (19:17 -0700)
commit709531e5241436ed8d708a9f2c99ec6279f8e3cf
tree4578a372c70758751f214b566ec65757b4eee529
parenta82c7c4832c65af104024d3287667cc1522e7b28
drm/vc4: Fix overflow mem unreferencing when the binner runs dry.

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 <eric@anholt.net>
Fixes: 447903ee0e05 ("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_irq.c