freedreno: rename pipe -> vsc_pipe
authorRob Clark <robdclark@gmail.com>
Thu, 24 Aug 2017 13:30:25 +0000 (09:30 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 24 Oct 2017 16:56:51 +0000 (12:56 -0400)
To add context priority support we need to have an fd_pipe per context,
rather than per-screen.  Which conflicts with existing ctx->pipe (which
is actually a visibility stream pipe (hw resource).  So just rename it.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_gmem.c

index 151ecfbf6139c097ce62da92773d6ae437b152a2..4bbbcf90ffab7c690232253ed0fa05c0d6445236 100644 (file)
@@ -778,7 +778,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 = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
 
                if (!pipe->bo) {
                        pipe->bo = fd_bo_new(ctx->dev, 0x40000,
@@ -1011,7 +1011,7 @@ fd3_emit_tile_renderprep(struct fd_batch *batch, struct fd_tile *tile)
        }
 
        if (use_hw_binning(batch)) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[tile->p];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[tile->p];
 
                assert(pipe->w * pipe->h);
 
index 49476d8636df3b4f9b9c3505f93038a5fb6246f0..ebfbcabf67daf663379e1abe2bb9569d3196ef3b 100644 (file)
@@ -569,7 +569,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 = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->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) |
@@ -578,7 +578,7 @@ update_vsc_pipe(struct fd_batch *batch)
 
        OUT_PKT0(ring, REG_A4XX_VSC_PIPE_DATA_ADDRESS_REG(0), 8);
        for (i = 0; i < 8; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                if (!pipe->bo) {
                        pipe->bo = fd_bo_new(ctx->dev, 0x40000,
                                        DRM_FREEDRENO_GEM_TYPE_KMEM);
@@ -588,7 +588,7 @@ update_vsc_pipe(struct fd_batch *batch)
 
        OUT_PKT0(ring, REG_A4XX_VSC_PIPE_DATA_LENGTH_REG(0), 8);
        for (i = 0; i < 8; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                OUT_RING(ring, fd_bo_size(pipe->bo) - 32); /* VSC_PIPE_DATA_LENGTH[i] */
        }
 }
@@ -767,7 +767,7 @@ fd4_emit_tile_renderprep(struct fd_batch *batch, struct fd_tile *tile)
        uint32_t y2 = tile->yoff + tile->bin_h - 1;
 
        if (use_hw_binning(batch)) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[tile->p];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[tile->p];
 
                assert(pipe->w * pipe->h);
 
index c623b572be5b2678e7c4ae257e9a1c4da23e6898..d8d79217d5b25682e13163db1849e884dde9aed9 100644 (file)
@@ -275,7 +275,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 = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->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) |
@@ -284,7 +284,7 @@ update_vsc_pipe(struct fd_batch *batch)
 
        OUT_PKT4(ring, REG_A5XX_VSC_PIPE_DATA_ADDRESS_LO(0), 32);
        for (i = 0; i < 16; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                if (!pipe->bo) {
                        pipe->bo = fd_bo_new(ctx->dev, 0x20000,
                                        DRM_FREEDRENO_GEM_TYPE_KMEM);
@@ -294,7 +294,7 @@ update_vsc_pipe(struct fd_batch *batch)
 
        OUT_PKT4(ring, REG_A5XX_VSC_PIPE_DATA_LENGTH_REG(0), 16);
        for (i = 0; i < 16; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                OUT_RING(ring, fd_bo_size(pipe->bo) - 32); /* VSC_PIPE_DATA_LENGTH[i] */
        }
 }
@@ -434,7 +434,7 @@ fd5_emit_tile_prep(struct fd_batch *batch, struct fd_tile *tile)
                        A5XX_RB_RESOLVE_CNTL_2_Y(y2));
 
        if (use_hw_binning(batch)) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[tile->p];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[tile->p];
 
                OUT_PKT7(ring, CP_WAIT_FOR_ME, 0);
 
index 3d0ac3a22db635ee508828c3a09aadb78766705a..e17dcf7b6849e0db54301438fd625f09dd44f22c 100644 (file)
@@ -136,8 +136,8 @@ fd_context_destroy(struct pipe_context *pctx)
 
        slab_destroy_child(&ctx->transfer_pool);
 
-       for (i = 0; i < ARRAY_SIZE(ctx->pipe); i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+       for (i = 0; i < ARRAY_SIZE(ctx->vsc_pipe); i++) {
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                if (!pipe->bo)
                        break;
                fd_bo_del(pipe->bo);
index c045661468ee2796c8e17ab2e0f4c8965be33db9..393b485a096db0d0a9f435b858dd7d945e48b204 100644 (file)
@@ -246,7 +246,7 @@ struct fd_context {
         * means we'd always have to recalc tiles ever batch)
         */
        struct fd_gmem_stateobj gmem;
-       struct fd_vsc_pipe      pipe[16];
+       struct fd_vsc_pipe      vsc_pipe[16];
        struct fd_tile          tile[512];
 
        /* which state objects need to be re-emit'd: */
index 03400717bfa211ab1a7c2abc5695d2808dc850af..9c534c4f26eb13462e48acdc0de06d170803a091 100644 (file)
@@ -226,7 +226,7 @@ calculate_tiles(struct fd_batch *batch)
        /* configure pipes: */
        xoff = yoff = 0;
        for (i = 0; i < npipes; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
 
                if (xoff >= nbins_x) {
                        xoff = 0;
@@ -246,7 +246,7 @@ calculate_tiles(struct fd_batch *batch)
        }
 
        for (; i < npipes; i++) {
-               struct fd_vsc_pipe *pipe = &ctx->pipe[i];
+               struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
                pipe->x = pipe->y = pipe->w = pipe->h = 0;
        }