Comment # 37
on bug 85647
from Hannu
Created attachment 109668 [details]
check space after r600_need_dma_space()
By the way, at some point while testing I noticed that si_dma_copy_tile() does
not check that it actually got the space it wanted after this call:
r600_need_dma_space(&ctx->b, ncopy * 9);
void r600_need_dma_space(struct r600_common_context *ctx, unsigned num_dw)
{
/* The number of dwords we already used in the DMA so far. */
num_dw += ctx->rings.dma.cs->cdw;
/* Flush if there's not enough space. */
if (num_dw > RADEON_MAX_CMDBUF_DWORDS) {
ctx->rings.dma.flush(ctx, RADEON_FLUSH_ASYNC, NULL);
}
}
So I added check after r600_need_dma_space():
r600_need_dma_space(&ctx->b, ncopy * 9);
if (((ncopy * 9) + cs->cdw) > RADEON_MAX_CMDBUF_DWORDS) {
return 0;
}
and then goto fallback if returns 0, but it crashed anyway so I skipped that as
irrelevant to this bug. (diff attached)
You are receiving this mail because:
- You are the assignee for the bug.
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel