mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
radeonsi: raise the max size for SDMA buffer copies
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
faa4f0191d
commit
f837c37f02
2 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ static void cik_sdma_do_copy_buffer(struct si_context *ctx,
|
||||||
dst_offset += r600_resource(dst)->gpu_address;
|
dst_offset += r600_resource(dst)->gpu_address;
|
||||||
src_offset += r600_resource(src)->gpu_address;
|
src_offset += r600_resource(src)->gpu_address;
|
||||||
|
|
||||||
ncopy = (size + CIK_SDMA_COPY_MAX_SIZE - 1) / CIK_SDMA_COPY_MAX_SIZE;
|
ncopy = DIV_ROUND_UP(size, CIK_SDMA_COPY_MAX_SIZE);
|
||||||
r600_need_dma_space(&ctx->b, ncopy * 7);
|
r600_need_dma_space(&ctx->b, ncopy * 7);
|
||||||
|
|
||||||
radeon_add_to_buffer_list(&ctx->b, &ctx->b.dma, rsrc, RADEON_USAGE_READ,
|
radeon_add_to_buffer_list(&ctx->b, &ctx->b.dma, rsrc, RADEON_USAGE_READ,
|
||||||
|
|
@ -55,7 +55,7 @@ static void cik_sdma_do_copy_buffer(struct si_context *ctx,
|
||||||
RADEON_PRIO_SDMA_BUFFER);
|
RADEON_PRIO_SDMA_BUFFER);
|
||||||
|
|
||||||
for (i = 0; i < ncopy; i++) {
|
for (i = 0; i < ncopy; i++) {
|
||||||
csize = size < CIK_SDMA_COPY_MAX_SIZE ? size : CIK_SDMA_COPY_MAX_SIZE;
|
csize = MIN2(size, CIK_SDMA_COPY_MAX_SIZE);
|
||||||
cs->buf[cs->cdw++] = CIK_SDMA_PACKET(CIK_SDMA_OPCODE_COPY,
|
cs->buf[cs->cdw++] = CIK_SDMA_PACKET(CIK_SDMA_OPCODE_COPY,
|
||||||
CIK_SDMA_COPY_SUB_OPCODE_LINEAR,
|
CIK_SDMA_COPY_SUB_OPCODE_LINEAR,
|
||||||
0);
|
0);
|
||||||
|
|
|
||||||
|
|
@ -9021,7 +9021,7 @@
|
||||||
#define CIK_SDMA_PACKET_SEMAPHORE 0x7
|
#define CIK_SDMA_PACKET_SEMAPHORE 0x7
|
||||||
#define CIK_SDMA_PACKET_CONSTANT_FILL 0xb
|
#define CIK_SDMA_PACKET_CONSTANT_FILL 0xb
|
||||||
#define CIK_SDMA_PACKET_SRBM_WRITE 0xe
|
#define CIK_SDMA_PACKET_SRBM_WRITE 0xe
|
||||||
#define CIK_SDMA_COPY_MAX_SIZE 0x1fffff
|
#define CIK_SDMA_COPY_MAX_SIZE 0x3fffe0
|
||||||
|
|
||||||
#endif /* _SID_H */
|
#endif /* _SID_H */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue