ChanServ changed the topic of #lima to: Development channel for open source lima driver for ARM Mali4** GPUs - Kernel has landed in mainline, userspace driver is part of mesa - Logs at https://people.freedesktop.org/~cbrill/dri-log/index.php?channel=lima and https://freenode.irclog.whitequark.org/lima - Contact ARM for binary driver support!
yann has quit [Ping timeout: 265 seconds]
cwabbott_ has joined #lima
cwabbott has quit [Ping timeout: 260 seconds]
cwabbott_ is now known as cwabbott
buzzmarshall has quit [Remote host closed the connection]
dddddd has quit [Ping timeout: 258 seconds]
Barada has joined #lima
Elpaulo has joined #lima
yann has joined #lima
monstr has joined #lima
dddddd has joined #lima
Barada has quit [Quit: Barada]
z3ntu_ has left #lima ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
monstr has quit [Remote host closed the connection]
yann|work has joined #lima
yann has quit [Ping timeout: 260 seconds]
yann|work has quit [Read error: Connection reset by peer]
yann|work has joined #lima
buzzmarshall has joined #lima
<Marex> anarsoul: hey, does the mali gpu need the textures in some weird tiled formwat ?
<Marex> *format
<Marex> anarsoul: or can it handle linear RGBx buffer too ?
<anarsoul> Marex: it prefers tiled for performance, but it can handle linear. Stride has to be aligned to 16 pixels if you want to render into it
<Marex> anarsoul: ah, and the tiling must be done in software I presume ?
<anarsoul> yes
<Marex> anarsoul: ah ok, so now that explains it all
<Marex> anarsoul: thanks
<anarsoul> you can use LIMA_DEBUG=notiling if you want linear textures. Or if you're importing a buffer just use linear modifier
<Marex> anarsoul: or import a DMABUF, right ?
<Marex> anarsoul: which is basically linear
<anarsoul> Marex: yes
<Marex> anarsoul: :)
<anarsoul> don't use glTexSubimage2D() in video player, mpv is bad example
<Marex> anarsoul: gstreamer glupload is doing exactly the same
<Marex> anarsoul: why not ? because it leads to this tiling, right ?
<anarsoul> Marex: 1. it's extra copy while you have limited memory bandwidth (also it thrashes caches) 2. yeah, it's converted from linear -> tiled
<Marex> anarsoul: so, what is the solution ? :)
<Marex> anarsoul: that's basically the dmabuf import, isn't it ?
<anarsoul> you can also check kmscube if you want example
<anarsoul> yeah, pretty much
<Marex> which baiscally boils down to "fix gstreamer"
<anarsoul> or mpv
<anarsoul> :)
<anarsoul> Marex: you can also add some heuristics to lima, i.e. if there were more than 10 full updates of the texture switch it to linear
<anarsoul> there was an MR to do that in panfrost
<anarsoul> that would eliminate p.2 but you still will be wasting memory bandwidth for extra copy
<Marex> better fix the root cause
<Marex> but looking at gstreamer, glupload already can do DirectDmabuf upload, which is this
<Marex> except I would need to get the dmabuf somewhere
<Marex> and since I'm only getting gstreamer buffer, hum, I would need to have some element to allocate me a dmabuf first
<anarsoul> yeah, I'm not sure how exactly video decoders work, but keep in mind that dmabuf is usually write-combined
<anarsoul> so if it does a lot of random accesses it may be beneficial to do a copy
<Marex> anarsoul: my decoder is software-based
<Marex> anarsoul: not all zynqmps have hw video decoding
<Marex> anarsoul: in fact, I think you can pick either hw video decoding OR GPU , not both :-)
<anarsoul> Marex: yeah, I'm talking about sw decoders
<Marex> ah, that
<Marex> anarsoul: oh look, gstreamer supports undocumented texture-target=external-oes capsfilter ... it just doesn't work, but that seems like the way to go here
<Marex> anarsoul: but can I actually use that external-oes on a userspace texture ?
<anarsoul> I think so, kmscube does that
<anarsoul> well, it actually allocates bo, maps it for copying data and then imports it
jernej_ has joined #lima
jernej has quit [Read error: Connection reset by peer]
jernej_ is now known as jernej
<Marex> anarsoul: ah right, and the BO comes from the scanout engine, so that's the trick there
<Marex> anarsoul: I wonder what gstreamer does there, I need to dig deeper
<Marex> anarsoul: but this does make sense , with the BO
<anarsoul> well, again - I've never looked into gstreamer architecture but it'd make sense for caller to allocate the buffer for decoder
<anarsoul> so if you're implementing video player you can actually pass a BO-backed buffer
<anarsoul> if it's not possible or it's too much work - just implement heuristics to switch buffer to linear in lima
<anarsoul> it shouldn't be too difficult