From cea7264d8f97545ba5bc1a7c98245d507de8093c Mon Sep 17 00:00:00 2001 From: Qiang Yu <yuq825@gmail.com> Date: Tue, 4 Dec 2018 22:54:15 +0800 Subject: [PATCH] lima: move shift_w/h/max into conditional update Signed-off-by: Qiang Yu <yuq825@gmail.com> --- src/gallium/drivers/lima/lima_state.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/lima/lima_state.c b/src/gallium/drivers/lima/lima_state.c index 145b98a473666..24080a6130be1 100644 --- a/src/gallium/drivers/lima/lima_state.c +++ b/src/gallium/drivers/lima/lima_state.c @@ -61,16 +61,16 @@ lima_set_framebuffer_state(struct pipe_context *pctx, fb->width = framebuffer->width; fb->height = framebuffer->height; - fb->shift_h = 0; - fb->shift_w = 0; - fb->shift_max = 0; - int width = align(framebuffer->width, 16) >> 4; int height = align(framebuffer->height, 16) >> 4; if (fb->tiled_w != width || fb->tiled_h != height) { fb->tiled_w = width; fb->tiled_h = height; + fb->shift_h = 0; + fb->shift_w = 0; + fb->shift_max = 0; + int limit = ctx->plb_max_blk; while ((width * height) > limit) { if (width >= height) { -- GitLab