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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 37 on bug 85647 from
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:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux