summaryrefslogtreecommitdiff
path: root/freedreno/msm
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2016-11-09 09:02:09 -0500
committerRob Clark <robclark@freedesktop.org>2016-11-26 12:51:38 -0500
commit23d10b82440f59f2a685db34d3662d75f4a3784b (patch)
treeaf78910485035ae59a2b707ab81a0c96ad4eb8fc /freedreno/msm
parentd15515aea3c3e51336f9ab29691162c69acc9807 (diff)
freedreno: 64bit support
a5xx and later are 64bit devices.. make reloc's handle that. A new public symbol is introduced to avoid silent problems with new mesa and old libdrm (since on 64b reloc consumes two dwords). Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno/msm')
-rw-r--r--freedreno/msm/msm_ringbuffer.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c
index 5117df1a..17194f4c 100644
--- a/freedreno/msm/msm_ringbuffer.c
+++ b/freedreno/msm/msm_ringbuffer.c
@@ -487,11 +487,32 @@ static void msm_ringbuffer_emit_reloc(struct fd_ringbuffer *ring,
reloc->submit_offset = offset_bytes(ring->cur, ring->start);
addr = msm_bo->presumed;
- if (r->shift < 0)
- addr >>= -r->shift;
+ if (reloc->shift < 0)
+ addr >>= -reloc->shift;
else
- addr <<= r->shift;
+ addr <<= reloc->shift;
(*ring->cur++) = addr | r->or;
+
+ if (ring->pipe->gpu_id >= 500) {
+ struct drm_msm_gem_submit_reloc *reloc_hi;
+
+ idx = APPEND(cmd, relocs);
+
+ reloc_hi = &cmd->relocs[idx];
+
+ reloc_hi->reloc_idx = reloc->reloc_idx;
+ reloc_hi->reloc_offset = r->offset;
+ reloc_hi->or = r->orhi;
+ reloc_hi->shift = r->shift - 32;
+ reloc_hi->submit_offset = offset_bytes(ring->cur, ring->start);
+
+ addr = msm_bo->presumed >> 32;
+ if (reloc_hi->shift < 0)
+ addr >>= -reloc_hi->shift;
+ else
+ addr <<= reloc_hi->shift;
+ (*ring->cur++) = addr | r->orhi;
+ }
}
static uint32_t msm_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,