summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a5xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-05-16 08:37:50 -0400
committerRob Clark <[email protected]>2017-05-16 16:34:21 -0400
commitdafc2f1887e192376a176bbd2bb346ad48fc13ae (patch)
tree5f1831ad3193e0cdfb1c0e3279bd53f715d26740 /src/gallium/drivers/freedreno/a5xx
parentda9a1cb8a684cf4a30e6c292a80e7cab4c89482d (diff)
freedreno/gmem: fix hw binning hangs with large render targets
On all 3 gens, we have 4 bits for width and height in the VSC pipe config. And overflow results in setting width and/or height to zero which causes hangs. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a5xx')
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_gmem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
index 1a451811451..7fb0191fed8 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
@@ -212,6 +212,12 @@ use_hw_binning(struct fd_batch *batch)
{
struct fd_gmem_stateobj *gmem = &batch->ctx->gmem;
+ if ((gmem->maxpw * gmem->maxph) > 32)
+ return false;
+
+ if ((gmem->maxpw > 15) || (gmem->maxph > 15))
+ return false;
+
return fd_binning_enabled && ((gmem->nbins_x * gmem->nbins_y) > 2) &&
(batch->num_draws > 0);
}