[Mesa-dev] [PATCH] nouveau: take extra push space into account for pushbuf_space calls

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 11 15:51:50 UTC 2017


On Wed, Jan 11, 2017 at 10:47 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 11 January 2017 at 03:10, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> Ever since a long time ago when I messed around with fences, I ensure
>> that after a PUSH_SPACE call there is enough space to write a fence out
>> into the pushbuf.
>>
>> However the PUSH_SPACE macro is not all-knowing, and so sometimes we
>> have to invoke nouveau_pushbuf_space manually with the relocs/pushes
>> args set. If we don't take the extra allocation from PUSH_SPACE into
>> account, then we will end up accidentally flushing when the code was not
>> expecting a flush. This can lead to various runtime and rendering
>> failures.
>>
> The previous calculations were ~ok to figure out, while these are less so.
> For posterity, please add a comment/note somewhere how these are
> derived. Pretty much anything will do.

These calculations are just upper bounds. They don't have to be exact.
I didn't want to start sticking +8's all over the place as that's
confusing. The pushbufs are huge, nobody cares if we don't fully make
use of the last 10 dwords. I'll make a note in the commit log.

  -ilia


More information about the mesa-dev mailing list