summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-01-18 15:22:27 -0500
committerRob Clark <[email protected]>2016-01-18 16:58:25 -0500
commit6062941e4dd441bb67d5db760b87ffc0509befb7 (patch)
tree6c65747d9bc0b21724d17e64f3ad7529b88adf3b /src/gallium/drivers/freedreno/a2xx
parentc03f3dd0a518a53598dcfd1ac19a453bfebcb71a (diff)
freedreno: per-generation OUT_IB packet
Some a4xx firmware doesn't implement the "PFD" (prefetch-disabled) version of the CP_INDIRECT_BUFFER packet. So allow for PFD vs PFE per generation. Switch a3xx and a4xx over to using prefetch-enabled version (which is also what blob does.. it seems only on a2xx we cannot use PFE). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_context.c1
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_emit.c14
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_emit.h2
3 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_context.c b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
index 3bed73573a6..058f8219ed5 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_context.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
@@ -109,6 +109,7 @@ fd2_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
fd2_gmem_init(pctx);
fd2_texture_init(pctx);
fd2_prog_init(pctx);
+ fd2_emit_init(pctx);
pctx = fd_context_init(&fd2_ctx->base, pscreen,
(screen->gpu_id >= 220) ? a22x_primtypes : a20x_primtypes,
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
index cc0ed59f300..4f667ab7d57 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c
@@ -446,3 +446,17 @@ fd2_emit_setup(struct fd_context *ctx)
fd_ringbuffer_flush(ring);
fd_ringmarker_mark(ctx->draw_start);
}
+
+static void
+fd2_emit_ib(struct fd_ringbuffer *ring, struct fd_ringmarker *start,
+ struct fd_ringmarker *end)
+{
+ __OUT_IB(ring, false, start, end);
+}
+
+void
+fd2_emit_init(struct pipe_context *pctx)
+{
+ struct fd_context *ctx = fd_context(pctx);
+ ctx->emit_ib = fd2_emit_ib;
+}
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.h b/src/gallium/drivers/freedreno/a2xx/fd2_emit.h
index 8ee04632091..3c146c17151 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.h
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.h
@@ -45,4 +45,6 @@ void fd2_emit_vertex_bufs(struct fd_ringbuffer *ring, uint32_t val,
void fd2_emit_state(struct fd_context *ctx, uint32_t dirty);
void fd2_emit_setup(struct fd_context *ctx);
+void fd2_emit_init(struct pipe_context *pctx);
+
#endif /* FD2_EMIT_H */