diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-09-28 22:41:28 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-09-28 22:41:28 +0000 |
commit | d19f2a3393608271d027f38301bf6eff5bdf5f44 (patch) | |
tree | 38f7b9c8ea55bc02de4649867dea6c2f50b1c2be /sys/dev/drm | |
parent | ac4eceb7154d74677f014ac72008eb756392be23 (diff) | |
download | FreeBSD-src-d19f2a3393608271d027f38301bf6eff5bdf5f44.zip FreeBSD-src-d19f2a3393608271d027f38301bf6eff5bdf5f44.tar.gz |
Fix offset handling
MFC after: 1 week
Diffstat (limited to 'sys/dev/drm')
-rw-r--r-- | sys/dev/drm/radeon_cs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/drm/radeon_cs.c b/sys/dev/drm/radeon_cs.c index 4fc6e7e..b523126 100644 --- a/sys/dev/drm/radeon_cs.c +++ b/sys/dev/drm/radeon_cs.c @@ -403,8 +403,8 @@ static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t DRM_ERROR("bad DRAW_INDEX\n"); break; } - ib_chunk->kdata[offset_dw + 1] = (offset & 0xffffffff); - ib_chunk->kdata[offset_dw + 2] = (upper_32_bits(offset) & 0xff); + ib_chunk->kdata[offset_dw + 1] += (offset & 0xffffffff); + ib_chunk->kdata[offset_dw + 2] += (upper_32_bits(offset) & 0xff); break; case R600_IT_DRAW_INDEX_AUTO: //DRM_INFO("R600_IT_DRAW_INDEX_AUTO\n"); @@ -433,8 +433,8 @@ static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t DRM_ERROR("bad WAIT_REG_MEM\n"); break; } - ib_chunk->kdata[offset_dw + 2] = (offset & 0xffffffff); - ib_chunk->kdata[offset_dw + 3] = (upper_32_bits(offset) & 0xff); + ib_chunk->kdata[offset_dw + 2] += (offset & 0xffffffff); + ib_chunk->kdata[offset_dw + 3] += (upper_32_bits(offset) & 0xff); } if (ret) DRM_ERROR("bad WAIT_REG_MEM\n"); @@ -469,7 +469,7 @@ static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t break; } ib_chunk->kdata[offset_dw + 2] += (offset & 0xffffffff); - ib_chunk->kdata[offset_dw + 3] |= (upper_32_bits(offset) & 0xff); + ib_chunk->kdata[offset_dw + 3] += (upper_32_bits(offset) & 0xff); } if (ret) DRM_ERROR("bad EVENT_WRITE\n"); @@ -488,7 +488,7 @@ static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t break; } ib_chunk->kdata[offset_dw + 2] += (offset & 0xffffffff); - ib_chunk->kdata[offset_dw + 3] |= (upper_32_bits(offset) & 0xff); + ib_chunk->kdata[offset_dw + 3] += (upper_32_bits(offset) & 0xff); break; case R600_IT_SET_CONFIG_REG: //DRM_INFO("R600_IT_SET_CONFIG_REG\n"); @@ -628,7 +628,7 @@ static inline int r600_cs_packet3(struct drm_radeon_cs_parser *parser, uint32_t if (ret) break; ib_chunk->kdata[offset_dw + (i * 7) + 0 + 2] += (offset & 0xffffffff); - ib_chunk->kdata[offset_dw + (i * 7) + 2 + 2] |= (upper_32_bits(offset) & 0xff); + ib_chunk->kdata[offset_dw + (i * 7) + 2 + 2] += (upper_32_bits(offset) & 0xff); break; } if (ret) |