[Mesa-dev] [Nouveau] Questions on GPU syncpoint handling from inside the GPU

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 10 12:44:45 UTC 2019


All docs are in the proper method address, i.e. "in bytes" -- in the
future, please refer to them that way since all the code and
documentation do.

There is no reference to method 2c8 in the mesa driver (except the
GLOBAL_BASE thing that's only on fermi, I won't get into the details
of what that does, but it's completely irrelevant to what you're
looking at, and gone on Kepler).

There's also no reference to method 2c8 in libdrm_nouveau nor in the
nouveau kernel driver (that I can see).

Some notes I have do indicate that method 2c8 does in fact exist
starting with the KeplerC 3d class (GK208 iirc), and has something to
do with "sync points" whatever those are. However we've never used it,
and I don't have any details on how it operates.

All the waiting is done using the SEMAPHORE_* methods I pointed at in
my earlier email. If the CPU has to wait for the GPU to finish
something, we can use a kernel-based wait, which basically waits for
an interrupt to occur, or we can use a CPU-based wait which spins and
waits for some value in memory to get to a particular number. If the
CPU does not have to wait, you just want the command stream processing
to wait inside the GPU, then you can also use those SEMAPHORE_*
methods, e.g. nvc0_hw_query_fifo_wait in nvc0_query_hw.c.

Hope this helps,

  -ilia

On Wed, Apr 10, 2019 at 6:59 AM Fernando Sahmkow <fsahmkow27 at gmail.com> wrote:
>
> yeah 0xB2 in words not bytes (*4). Nouveau does write this method in Maxwell GPUs (we have compiled test apps with nouveau and asserted it was written). Here's what my colleague fincs REed: https://github.com/devkitPro/libdrm_nouveau/blob/master/source/pushbuf.c#L399-L407 methods are word aligned (so multiplied by 4 for bytes). As far as I know the driver side writes some syncpoints to set fences, this method seems to tamper with those syncpoints, the thing is that I don't know why or how.
>
> I think this is related to glFencSync and glWaitClientSync. How are this methods implemented from both sides (within the gpu and within the driver/host communication) ?
>
> El mié., 10 abr. 2019 a las 0:56, Ilia Mirkin (<imirkin at alum.mit.edu>) escribió:
>>
>> Hi Fernando,
>>
>> Perhaps you can elaborate? The question doesn't really make sense to me.
>>
>> What register are you talking about? Do you perhaps mean a method call
>> in the b197 class? (And what's 0xB2? Methods are always at multiples
>> of 4... do you mean 0x2c8 perhaps? If so, that's not documented post
>> Fermi in the 3d class.) And lastly, what do you mean by syncpoints
>> exactly? There are various class methods that will allow you to wait
>> for a value in memory to be equal (or greater) than a value in the
>> command stream, for example (e.g. QUERY_GET -- method 0x1b0c, or the
>> fifo-level 0x10..0x1c SEMAPHORE_* methods) -- is that what you're
>> talking about?
>>
>>   -ilia
>>
>> On Tue, Apr 9, 2019 at 9:46 PM Fernando Sahmkow <fsahmkow27 at gmail.com> wrote:
>> >
>> > bump
>> >
>> > El mar., 2 abr. 2019 a las 11:11, Fernando Sahmkow (<fsahmkow27 at gmail.com>) escribió:
>> >>
>> >> Hi guys how are you doing? I have some questions on how the GPU handles syncpoints from the commandlist.
>> >>
>> >> I do know the register 0xB2 is the one written in the Maxwell3D Engine. As far as I know bits 0:15 are the syncpoint id, bit 16 is unknown for me, bit 20 is increment? What other bits are set and what should be done on increment?
>> >>
>> >> Thanks in advance.
>> >
>> >
>> >
>> > --
>> > Atentamente,
>> > Fernando A. Sahmkow
>> > Móvil: +584242280286
>> > Correo: fsahmkow27 at gmail.com
>> > _______________________________________________
>> > Nouveau mailing list
>> > Nouveau at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/nouveau
>
>
>
> --
> Atentamente,
> Fernando A. Sahmkow
> Móvil: +584242280286
> Correo: fsahmkow27 at gmail.com


More information about the mesa-dev mailing list