summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_ringbuffer.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-06-12 09:16:49 -0600
committerJordan Crouse <jcrouse@codeaurora.org>2017-06-19 15:50:34 -0600
commit180cb9a578d1333651912f9539ba8c2db91b3d04 (patch)
tree7d05f032053a622197d734cb1080bc0ad6eb717b /drivers/gpu/drm/msm/msm_ringbuffer.c
parentae2cb03114bd664101ff72709a534ed4ddafd012 (diff)
drm/msm: Move memptrs to msm_gpu and reorganize
Since most of the heavy lifting for managing submits lives in the msm_gpu domain it makes sense to move the memptrs so that they are globally visible and we can use them without relying on function pointers. Additionally, instead of having a single struct full of per-ring arrays, reorganize the structure and assign a sub-allocation to each ring. This simplifies all of the various macros and other bits and allows us to make the size of the allocation dependent on the acutal number of rings for the implementation. Change-Id: Ic0dedbadc18ba1dc786c82b082c5030e13ff8012 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/msm/msm_ringbuffer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c
index 9b8e76da449f..2a5843e6f81b 100644
--- a/drivers/gpu/drm/msm/msm_ringbuffer.c
+++ b/drivers/gpu/drm/msm/msm_ringbuffer.c
@@ -18,7 +18,8 @@
#include "msm_ringbuffer.h"
#include "msm_gpu.h"
-struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id)
+struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
+ struct msm_memptrs *memptrs, uint64_t memptrs_iova)
{
struct msm_ringbuffer *ring;
int ret;
@@ -42,6 +43,10 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id)
goto fail;
}
+ ring->memptrs = memptrs;
+ ring->memptrs_iova = memptrs_iova;
+
+
ring->start = msm_gem_vaddr(ring->bo);
ring->end = ring->start + (MSM_GPU_RINGBUFFER_SZ >> 2);
ring->next = ring->start;