diff options
author | Rob Clark <robclark@freedesktop.org> | 2018-07-22 11:44:15 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2018-07-30 12:18:58 -0400 |
commit | fcbf206aa293af2d478e48dc45e4e8b3af0e7737 (patch) | |
tree | 8629a29aec6fd8691ebeafa7df6f7085febe4786 /freedreno/msm | |
parent | 4519db23ef716f37f804485f50955c26c38a6ae6 (diff) | |
download | libdrm-fcbf206aa293af2d478e48dc45e4e8b3af0e7737.tar.gz libdrm-fcbf206aa293af2d478e48dc45e4e8b3af0e7737.tar.bz2 libdrm-fcbf206aa293af2d478e48dc45e4e8b3af0e7737.zip |
freedreno: add fd_ringbuffer_new_object()
Add new API for reusable "state objects" which can be re-used multiple
times. Backend implementation for msm will follow. (Probably not
needed to support this for any device that uses kgsl backend, since this
is mostly useful for a5xx+.)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno/msm')
-rw-r--r-- | freedreno/msm/msm_priv.h | 2 | ||||
-rw-r--r-- | freedreno/msm/msm_ringbuffer.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/freedreno/msm/msm_priv.h b/freedreno/msm/msm_priv.h index 88ac3aa4..776859a4 100644 --- a/freedreno/msm/msm_priv.h +++ b/freedreno/msm/msm_priv.h @@ -68,7 +68,7 @@ drm_private struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio); drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, - uint32_t size); + uint32_t size, enum fd_ringbuffer_flags flags); struct msm_bo { struct fd_bo base; diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index a87e1b9a..9812d58b 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -583,11 +583,13 @@ static const struct fd_ringbuffer_funcs funcs = { }; drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, - uint32_t size) + uint32_t size, enum fd_ringbuffer_flags flags) { struct msm_ringbuffer *msm_ring; struct fd_ringbuffer *ring; + assert(!flags); + msm_ring = calloc(1, sizeof(*msm_ring)); if (!msm_ring) { ERROR_MSG("allocation failed"); |