ChanServ changed the topic of #etnaviv to: #etnaviv - the home of the reverse-engineered Vivante GPU driver - Logs https://oftc.irclog.whitequark.org/etnaviv
chewitt has quit [Quit: Zzz..]
cockroach has quit [Quit: leaving]
frieder has joined #etnaviv
pcercuei has joined #etnaviv
JohnnyonFlame has quit [Remote host closed the connection]
<mwalle> marex: is there any documentation about the pta/mtlb/stlb?
<austriancoder> mwalle: I think there should be some information: https://github.com/etnaviv/etna_viv/blob/master/rnndb/state_hi.xml
<mwalle> austriancoder: thnanks
<austriancoder> sravn: thanks... keep you up to date how our route from Sweden to Austria will look like :-)
<austriancoder> mwalle: or have a look at the vendor kernel GPU driver... I think there are some comments
<marex> austriancoder: indeed, I can highly recommend that
<marex> preferrably on empty stomach
<austriancoder> :-)
<marex> interestingly enough, the ... vendor driver ... uses 1 MiB pages
<marex> any reason why etnaviv uses 4k pages ? maybe its more efficient ?
<T_UNIX> hi
<mwalle> current status: if i start/stop/start glmark2 i (most of the time) get an SMMU fault. It seems that the GPU is trying to access an old stlb entry which is already unmapped when the first glmark2 process closed the device
<T_UNIX> since I didn't have any luck in getting a response in #linux-imx, maybe I'm more lucky here.
<shoragan> T_UNIX, do you have such a gpu? which soc is that?
<marex> T_UNIX: there are some vivante cores which implement openvg
<T_UNIX> imx6q
<marex> since all the svg stuff is done on 3d gpu these days, there is not much use for those cores
<shoragan> etnaviv doesn't use the 2d-gpu at all
<shoragan> at least in mesa. the armada x11 driver has support for 2d blits, i think
<marex> T_UNIX: isnt that openvg done using gles ?
<marex> shoragan: you could use the 2d gpu in mesa as YUV-to-RGB blit engine to avoid hammering the 3d gpu with that, but that needs extra patch
<T_UNIX> TBH I have no clue. All I can say is that the rendering (of svg containing UIs) appears to be fast on a dual lite, while it is quite slow on a quad.
<T_UNIX> so I figured, maybe the gpu is advertising it's "theoretical" Open VG skills, yet fails to initialize the core. Finally rendering stuff in SW instead of GL
<T_UNIX> * so I figured, maybe the gpu is advertising its "theoretical" Open VG skills, yet fails to initialize the core. Finally rendering stuff in SW instead of GL
<marex> nah, there is no openvg advertised by the GPU
<marex> fast on DL and slow on quad , hum
<marex> that is GC880 vs GC2000, right ?
<marex> same display configuration ? same DRAM configuration ?
<austriancoder> mwalle: sounds like the mmu context teardown needs to wait until the last cmd buffer of that context is done.
<T_UNIX> yes, GC880 vs. GC2000
<marex> mwalle: in my case it looks more like the STLB entry should be there, but from the GPU perspective it is not there
<marex> but in the devcoredump it already is there
<T_UNIX> I'll try to find a more specific benchmark that exposes the observed behaviour
<marex> so maybe the STLB gets refilled somehow ... incorrectly
<mwalle> austriancoder: it happens after the second glmark start, so i think there are no more cmd buffers pending (?)
* mwalle wonders how the tlb entries are flushed to main memory, shouldn't there be a dma_sync_*() ?
<marex> mwalle: around those dma_alloc_wc page tables ?
<marex> mwalle: I was pondering about the same thing
<mwalle> marex: yep, the pta/mtlb/stlb entries
<marex> mwalle: or at least some barrier between STLB update (first) and then MTLB update (second)
<mwalle> i mean if the CPU write the mtlb entry, how is it ensured, that the GPU will see the updated value
<marex> mwalle: that
<mwalle> there must be a cache flush on the cpu side and a cache invalidation on the gpu side, no?
<marex> mwalle: the WC mapping is still cacheable, so there must be some sync, yes
<marex> or barrier
<mwalle> but inserting dma_sync_single_for_device() after the pte/mtlb/stlb is written by the CPU doesn't help either in my case
<austriancoder> mwalle: the mmu should have a flush bit - as I am not in front of a laptop I can not have a deeper look at the kernel driver where it gets used
<T_UNIX> <shoragan> "etnaviv doesn't use the 2d-gpu..." <- are you referring to https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/drivers/etnaviv/etnaviv_screen.c#L977 ?
<T_UNIX> i.e. only the 3d pipe is initialized by mesa?
<shoragan> T_UNIX, i think so
<mwalle> austriancoder: There is a VIVS_MMUv2_CONFIGURATION register, but it seems it is only accessed through command buffers which looked somewhat weird given that I wanted to flush the pages which also containes the command buffers
<mwalle> are the GPU registers accessible from both the command buffers and the CPU
<mwalle> marex: could you have a look at etnaviv_iommuv2_restore_nonsec()? it seems that this will set the mtlb base address, but it will only be set once (?), that is when VIVS_MMUv2_CONTROL_ENABLE is not set. I presume that bit will not be cleared ever again (just on a GPU reset?)
<mwalle> But on the other hand, the mtlb will be allocated when the device is opened and freed when the device is closed
frieder has quit [Ping timeout: 480 seconds]
frieder has joined #etnaviv
frieder has quit [Remote host closed the connection]
<marex> mwalle: isnt the VIVS_MMUv2_CONFIGURATION supposed to be used for context switching (which includes MMU context) ?
<marex> mwalle: afaik the device can be opened multiple times though ?
<marex> mwalle: btw in my case, the problem happens after etnaviv_iommuv2_restore_nonsec() was called and the MMU bit was enabled already, so nothing was restored
JohnnyonFlame has joined #etnaviv
karolherbst has quit [Remote host closed the connection]
karolherbst has joined #etnaviv
frieder has joined #etnaviv
karolherbst has quit [Quit: Konversation terminated!]
karolherbst has joined #etnaviv
JohnnyonFlame has quit [Ping timeout: 480 seconds]
JohnnyonFlame has joined #etnaviv
frieder has quit [Remote host closed the connection]
pcercuei has quit [Quit: dodo]