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

Ben Skeggs skeggsb at gmail.com
Thu Apr 11 04:22:11 UTC 2019


On Wed, 10 Apr 2019 at 22:45, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
> 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.
Syncpoints are only available on Tegra HW as far as I know, and are
used to implement some android synchronization method.  We don't use
them, nor do I know any of their details off the top of my head.

The NVGPU driver source appears to indicate it makes use of them, and
would probably be a reasonable reference for you.

Ben.

>
> 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
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list