summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_screen.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-11-23 09:53:44 -0500
committerRob Clark <[email protected]>2016-11-30 12:25:48 -0500
commit8c56789f60526282564dfbbf1d4f0f80df12839a (patch)
treef43114e2ca5d77e898a623bfd920b3cb4cfe4d0d /src/gallium/drivers/freedreno/freedreno_screen.c
parent728e2c4d38b2c03ad1fdc997bef70e646ada9fe4 (diff)
freedreno: make gmem tile size alignment configurable
a5xx seems to prefer 64 pixel alignment, in at least some cases. Make this configurable per generation. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_screen.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index fb35742f2c0..f6ec5763f76 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -672,6 +672,12 @@ fd_screen_create(struct fd_device *dev)
goto fail;
}
+ if (screen->gpu_id >= 500) {
+ screen->gmem_alignment = 64;
+ } else {
+ screen->gmem_alignment = 32;
+ }
+
/* NOTE: don't enable reordering on a2xx, since completely untested.
* Also, don't enable if we have too old of a kernel to support
* growable cmdstream buffers, since memory requirement for cmdstream