mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 08:00:28 +01:00
freedreno/drm: fix 64b iova shifts
Should shift before splitting 64b iova into dwords Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
5ccd5871ed
commit
305bcdf992
1 changed files with 4 additions and 10 deletions
|
|
@ -421,25 +421,19 @@ msm_ringbuffer_sp_emit_reloc(struct fd_ringbuffer *ring,
|
|||
}
|
||||
|
||||
uint64_t iova = fd_bo_get_iova(reloc->bo) + reloc->offset;
|
||||
uint32_t dword = iova;
|
||||
int shift = reloc->shift;
|
||||
|
||||
if (shift < 0)
|
||||
dword >>= -shift;
|
||||
iova >>= -shift;
|
||||
else
|
||||
dword <<= shift;
|
||||
iova <<= shift;
|
||||
|
||||
uint32_t dword = iova;
|
||||
|
||||
(*ring->cur++) = dword | reloc->or;
|
||||
|
||||
if (pipe->gpu_id >= 500) {
|
||||
dword = iova >> 32;
|
||||
shift -= 32;
|
||||
|
||||
if (shift < 0)
|
||||
dword >>= -shift;
|
||||
else
|
||||
dword <<= shift;
|
||||
|
||||
(*ring->cur++) = dword | reloc->orhi;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue