[Bug 85647] Random radeonsi crashes with mesa 10.3.x

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Nov 18 03:20:22 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=85647

--- Comment #37 from Hannu <hannu.tmp at pp.inet.fi> ---
Created attachment 109668
  --> https://bugs.freedesktop.org/attachment.cgi?id=109668&action=edit
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141118/cec71580/attachment.html>


More information about the dri-devel mailing list