summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-03-23 16:10:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:55:41 -0400
commit5846e355694f8a0be33a29d45ea8cafb0b5de22c (patch)
tree410e9c9c957abf0b93e6c01e8d6ad97058b73951 /drivers/gpu/drm/amd
parent79a0c4655e47ca31c24e1d8cfd4c9a461571a100 (diff)
downloadop-kernel-dev-5846e355694f8a0be33a29d45ea8cafb0b5de22c.zip
op-kernel-dev-5846e355694f8a0be33a29d45ea8cafb0b5de22c.tar.gz
drm/amdgpu:fix ring_write_multiple
ring_write_multiple should use buf_mask instead of ptr_mask Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index ec5d4ae..2620567 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1739,9 +1739,9 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring, void *sr
if (ring->count_dw < count_dw) {
DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n");
} else {
- occupied = ring->wptr & ring->ptr_mask;
+ occupied = ring->wptr & ring->buf_mask;
dst = (void *)&ring->ring[occupied];
- chunk1 = ring->ptr_mask + 1 - occupied;
+ chunk1 = ring->buf_mask + 1 - occupied;
chunk1 = (chunk1 >= count_dw) ? count_dw: chunk1;
chunk2 = count_dw - chunk1;
chunk1 <<= 2;
OpenPOWER on IntegriCloud