From 82a64af907da1eb6cef4b6e010788a4b7aa57faf Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 25 Jan 2020 11:10:38 -0800 Subject: [PATCH 1/1] freedreno: constify fd_vsc_pipe Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a2xx/fd2_gmem.c | 2 +- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 4 ++-- src/gallium/drivers/freedreno/a4xx/fd4_gmem.c | 4 ++-- src/gallium/drivers/freedreno/a5xx/fd5_gmem.c | 4 ++-- src/gallium/drivers/freedreno/a6xx/fd6_gmem.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c index 4119e19a358..a548e9e946c 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c @@ -609,7 +609,7 @@ fd2_emit_tile_init(struct fd_batch *batch) OUT_RING(ring, 0x0000018C); for (int i = 0; i < gmem->num_vsc_pipes; i++) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; float off_x, off_y, mul_x, mul_y; /* const to tranform from [-1,1] to bin coordinates for this pipe diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 6a9f6433c3d..5f4ee32008b 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -786,7 +786,7 @@ update_vsc_pipe(struct fd_batch *batch) OUT_RELOCW(ring, fd3_ctx->vsc_size_mem, 0, 0, 0); /* VSC_SIZE_ADDRESS */ for (i = 0; i < 8; i++) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; if (!ctx->vsc_pipe_bo[i]) { ctx->vsc_pipe_bo[i] = fd_bo_new(ctx->dev, 0x40000, @@ -1019,7 +1019,7 @@ fd3_emit_tile_renderprep(struct fd_batch *batch, const struct fd_tile *tile) } if (use_hw_binning(batch)) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; struct fd_bo *pipe_bo = ctx->vsc_pipe_bo[tile->p]; assert(pipe->w && pipe->h); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c index 52e020d1aa6..fb825267ca7 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c @@ -571,7 +571,7 @@ update_vsc_pipe(struct fd_batch *batch) OUT_PKT0(ring, REG_A4XX_VSC_PIPE_CONFIG_REG(0), 8); for (i = 0; i < 8; i++) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; OUT_RING(ring, A4XX_VSC_PIPE_CONFIG_REG_X(pipe->x) | A4XX_VSC_PIPE_CONFIG_REG_Y(pipe->y) | A4XX_VSC_PIPE_CONFIG_REG_W(pipe->w) | @@ -767,7 +767,7 @@ fd4_emit_tile_renderprep(struct fd_batch *batch, const struct fd_tile *tile) uint32_t y2 = tile->yoff + tile->bin_h - 1; if (use_hw_binning(batch)) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; struct fd_bo *pipe_bo = ctx->vsc_pipe_bo[tile->p]; assert(pipe->w && pipe->h); diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c index 8897d7735aa..05aa119c9ba 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c @@ -277,7 +277,7 @@ update_vsc_pipe(struct fd_batch *batch) OUT_PKT4(ring, REG_A5XX_VSC_PIPE_CONFIG_REG(0), 16); for (i = 0; i < 16; i++) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; OUT_RING(ring, A5XX_VSC_PIPE_CONFIG_REG_X(pipe->x) | A5XX_VSC_PIPE_CONFIG_REG_Y(pipe->y) | A5XX_VSC_PIPE_CONFIG_REG_W(pipe->w) | @@ -435,7 +435,7 @@ fd5_emit_tile_prep(struct fd_batch *batch, const struct fd_tile *tile) A5XX_RB_RESOLVE_CNTL_2_Y(y2)); if (use_hw_binning(batch)) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; struct fd_bo *pipe_bo = ctx->vsc_pipe_bo[tile->p]; OUT_PKT7(ring, CP_WAIT_FOR_ME, 0); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c index 09407de90a3..0b96741787c 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c @@ -358,7 +358,7 @@ update_vsc_pipe(struct fd_batch *batch) OUT_PKT4(ring, REG_A6XX_VSC_PIPE_CONFIG_REG(0), 32); for (i = 0; i < 32; i++) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[i]; OUT_RING(ring, A6XX_VSC_PIPE_CONFIG_REG_X(pipe->x) | A6XX_VSC_PIPE_CONFIG_REG_Y(pipe->y) | A6XX_VSC_PIPE_CONFIG_REG_W(pipe->w) | @@ -839,7 +839,7 @@ fd6_emit_tile_prep(struct fd_batch *batch, const struct fd_tile *tile) set_scissor(ring, x1, y1, x2, y2); if (use_hw_binning(batch)) { - struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; + const struct fd_vsc_pipe *pipe = &gmem->vsc_pipe[tile->p]; OUT_PKT7(ring, CP_WAIT_FOR_ME, 0); -- 2.30.2