<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Random radeonsi crashes with mesa 10.3.x"
href="https://bugs.freedesktop.org/show_bug.cgi?id=85647#c37">Comment # 37</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Random radeonsi crashes with mesa 10.3.x"
href="https://bugs.freedesktop.org/show_bug.cgi?id=85647">bug 85647</a>
from <span class="vcard"><a class="email" href="mailto:hannu.tmp@pp.inet.fi" title="Hannu <hannu.tmp@pp.inet.fi>"> <span class="fn">Hannu</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=109668" name="attach_109668" title="check space after r600_need_dma_space()">attachment 109668</a> <a href="attachment.cgi?id=109668&action=edit" title="check space after r600_need_dma_space()">[details]</a></span>
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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>