summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2019-05-09 20:40:24 +0800
committerQiang Yu <[email protected]>2019-05-10 16:07:40 +0800
commite2fc0c4a0cb904264606015ed4ae5942d20fdb28 (patch)
treebce7bd0dccf299d20405f1276fc46083f6fe40b6 /src
parent1b97d9c18008b4577164f2d55ac8046b1c1cf72f (diff)
lima: fix width 4096 resolution GP fail
When width=4096 and shift_w=0, block_w=0x100 which overflow the PLBU_CMD 8 bits for it. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/lima/lima_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 99b2675cb1e..6751575a1da 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -140,7 +140,7 @@ struct lima_render_state {
PLBU_CMD(((shift_min) << 28) | ((shift_h) << 16) | (shift_w), 0x1000010C)
#define PLBU_CMD_TILED_DIMENSIONS(tiled_w, tiled_h) \
PLBU_CMD((((tiled_w) - 1) << 24) | (((tiled_h) - 1) << 8), 0x10000109)
-#define PLBU_CMD_BLOCK_STRIDE(block_w) PLBU_CMD(block_w, 0x30000000)
+#define PLBU_CMD_BLOCK_STRIDE(block_w) PLBU_CMD((block_w) & 0xff, 0x30000000)
#define PLBU_CMD_ARRAY_ADDRESS(gp_stream, block_num) \
PLBU_CMD(gp_stream, 0x28000000 | ((block_num) - 1) | 1)
#define PLBU_CMD_VIEWPORT_X(v) PLBU_CMD(v, 0x10000107)