[Mesa-stable] [PATCH 5/6] i965: Avoid problems from referencing orphaned BOs after growing.
Kenneth Graunke
kenneth at whitecape.org
Wed Nov 29 05:58:44 UTC 2017
On Tuesday, November 28, 2017 4:13:20 PM PST Kenneth Graunke wrote:
> Growing the batch/state buffer is a lot more dangerous than I thought.
>
> A number of places emit multiple state buffer sections, and then write
> data to the returned pointer, or save a pointer to brw->batch.state.bo
> and then use it in relocations. If each call can grow, this can result
> in stale map references or stale BO pointers. Furthermore, fences refer
> to the old batch BO, and that reference needs to continue working.
>
> To avoid these woes, we avoid ever swapping the brw->batch.*.bo pointer,
> instead exchanging the brw_bo structures in place. That way, stale BO
> references are fine - the GEM handle changes, but the brw_bo pointer
> doesn't. We also defer the memcpy until a quiescent point, so callers
> can write to the returned pointer - which may be in either BO - and
> we'll sort it out and combine the two properly in the end.
>
> Fixes GPU hangs in DiRT Rally.
Jordan and I retested, and it apparently does not fix those hangs.
I'm not sure what happened, but this series doesn't appear to help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20171128/53d6a2db/attachment.sig>
More information about the mesa-stable
mailing list