alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - https://gitlab.freedesktop.org/panfrost - Logs https://freenode.irclog.whitequark.org/panfrost - Transientification is terminating. Memory reductions in progress.
<alyssa> Okay, yeah, I've diagnosed the issue
<alyssa> Now to fix
* alyssa needs Connor's changes for this
<alyssa> cwabbott: I'm porting your changes over from panloader to the main mesa repo, assuming you haven't done that yet (I don't mind)
* alyssa refactors driver
stikonas has quit [Remote host closed the connection]
<Lyude> pst: hd
<Lyude> Oops
<Lyude> Sorry if I've been slacking a bit with reviewing stuff btw, I've been wiped this weekend
<HdkR> eh, w/e
<HdkR> Better to take care than worry about code review :P
<TheCycoONE> ../src/gallium/auxiliary/target-helpers/drm_helper.h:390: undefined reference to `panfrost_drm_screen_create' ?
<TheCycoONE> just following the instructions for building panfrost mesa on the markdown page
<alyssa> TheCycoONE: s/-bgallium-drivers=panfrost/-bgallium-drivers=panfrost,rockchip/
<alyssa> Thanks for reminding me to update instructions
<alyssa> (Obviously only works on Rockchips. Other SoCs need different winsys)
<TheCycoONE> cool, thanks
<alyssa> TheCycoONE: Also, you'll need to update your kernel
<TheCycoONE> to the panfrost kernel?
<alyssa> To the latest kbase
<alyssa> There's a good chance the latest ChromeOS kernels would work
<alyssa> (Untested)
<alyssa> ^ I'm using mainline with that module compiled out-of-tree
<TheCycoONE> ok, latest chromeos kernels don't work on kevin, I'm a couple versions behind
<alyssa> TheCycoONE: How many is a couple?
<alyssa> :p
<TheCycoONE> 164 (166 and 168 don't work)
<alyssa> I'm guessing that's fine? I dunno
<alyssa> TheCycoONE: Does, uh, Panfrost currently work with that kernel?
<alyssa> I wouldn't think so :P
<TheCycoONE> not last time I tried it - we'll see :)
<alyssa> TheCycoONE: Gotcha
<alyssa> In that case, there's a good chance the latest Panfrost will work on the new device :)
<alyssa> TheCycoONE: Instructions are updated
<TheCycoONE> spiffy
<alyssa> :)
<alyssa> Finally to the point of the driver compiling with Connor's changes pulled out
<alyssa> *in
hipboi has joined #panfrost
* alyssa battles regressions fiercely
<alyssa> Oh, kmscube works, cool
<alyssa> Oh add "memory leaks" to the list of Kodi issues, hmph
<alyssa> ^ With that patch, text renders in unpatched Kodi
<HdkR> ooo
<TheCycoONE> alyssa: does sleep work in mainline yet?
NeuroScr has quit [Quit: NeuroScr]
<alyssa> TheCycoONE: No idea
<alyssa> I haven't used the sleep function in a long time
<alyssa> Since it's reliably broken everywhere :P
Lyude has quit [Quit: WeeChat 2.2]
Lyude has joined #panfrost
chewitt has quit [Quit: Adios!]
NeuroScr has joined #panfrost
anarsoul|2 has joined #panfrost
anarsoul|2 has quit [Ping timeout: 244 seconds]
<alyssa> ...Why does the format stuff regress egl clients?
<alyssa> Alternatively, why did egl clients work in the first place?
<alyssa> :P
NeuroScr has quit [Read error: Connection reset by peer]
NeuroScr has joined #panfrost
<alyssa> Oh, huh, neat
<alyssa> There are a TON of issues but Xwayland is starting to show signs of life (under sway)
NeuroScr has quit [Quit: NeuroScr]
<alyssa> Yeah, under sway, X11 gles apps run mostly fine
<alyssa> Just... upside down
chewitt has joined #panfrost
<chewitt> alyss: Jan 07 04:20:25 LibreELEC kodi.sh[1863]: kodi.bin: ../src/gallium/drivers/panfrost/pan_format.c:52: panfrost_translate_swizzle: Assertion `0' failed.
<chewitt> and then it core dumps
<alyssa> chewitt: Er I thought I pushed a patch to fix that
<alyssa> Wait translate_swizzle?
<alyssa> chewitt: Regardless, pull the latest code and rebuild
<alyssa> (From connor-updated-formats branch)
<chewitt> that's the current panfrost master + narmstrong changes for amlogic + PR17
<chewitt> ahh.. using PR17 from about ~2 hours ago
<chewitt> I see there are updates
<alyssa> I've been busy :)
<chewitt> rebuilding..
<cyrozap> So I pretty much just spent my whole weekend messing with U-Boot and bringing up Arch Linux ARM on most of the rest of my mini PCs.
<cyrozap> Now I have a mainline U-Boot and kernel running on a Tinker Board (RK3288, Mali-T760 MP4), an ODROID-C2 (Amlogic S905, Mali-450 MP3), and two Orange Pi PC 2's (Allwinner H5, Mali-450 MP4).
<mifritscher> :)
* cyrozap is basking in the glory of fully-FOSS boot
<cyrozap> Now that I've gotten the hang of this, next weekend I'll probably try fiddling around with booting mainline U-Boot+kernel on my RK3399 boxes.
<cyrozap> Oops, minor correction--the ODROID-C2 still has a mostly-proprietary boot process, with proprietary BL2, SCP_BL2, and BL31 components (though supposedly the BL2 sources were open for a while before being closed?)
<cyrozap> But three out of four isn't bad.
<chewitt> @alyssa ^
<tomeu> chewitt: awesome! so the issue with text is fixed?
<chewitt> yes, that's resolved
<chewitt> one down .. lots to go :)
* tomeu is now installing gnome-shell in his board :)
chewitt has quit [Quit: Adios!]
pH5 has joined #panfrost
<narmstrong> alyssa: is it easily possible to render to a AFBC fb plane ?
BenG83 has quit [Ping timeout: 258 seconds]
MoeIcenowy has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
MoeIcenowy has joined #panfrost
<tomeu> narmstrong: I'm interested in looking at that, but haven't checked if the rockchip display driver already has support for it
<tomeu> narmstrong: does meson support it in mainline already?
BenG83 has joined #panfrost
<narmstrong> tomeu: no, and offical support from ARM (with proper DRM modifiers) is not yet merged anyway
<narmstrong> tomeu: but I'll be interested to support it, for panfrost and for the bifrost libmali on newer amlogic socs
<narmstrong> alyssa: opened !18 to add the meson winsys driver
<narmstrong> alyssa: and !19
_whitelogger has joined #panfrost
raster has joined #panfrost
afaerber has quit [Quit: Leaving]
afaerber has joined #panfrost
stikonas_ has joined #panfrost
stikonas_ has quit [Remote host closed the connection]
stikonas_ has joined #panfrost
stikonas_ has quit [Remote host closed the connection]
gtucker has joined #panfrost
chewitt has joined #panfrost
raster has quit [Remote host closed the connection]
griffinp has joined #panfrost
robher has joined #panfrost
<chewitt> @alyssa I know we know there are memleaks, but..
<chewitt> if I leave Kodi open on the 'settings > system info' page you can watch the free mem count down in 1MB increments :)
raster has joined #panfrost
<tomeu> hehe
<tomeu> raster: were you able to get things running?
<tomeu> alyssa: any thoughts on GL_TEXTURE_RECTANGLE support?
<tomeu> hmm, it didn't need much hacking to get gnome-shell to render half a cursor on the screen :)
NeuroScr has joined #panfrost
<tomeu> alyssa: basically, I needed to comment out two asserts to get the process up and running (though not much rendered to the screen)
<tomeu> assert(!depth_stencil->alpha.enabled);
<tomeu> gnome-shell depends on some ES3 stuff
<tomeu> and assert(template->target == PIPE_TEXTURE_2D);
<tomeu> we were getting a PIPE_TEXTURE_RECT instead, though it should be quite similar to a 2D, from what I have seen
<tomeu> I'm getting these in the console each frame:
<tomeu> Jan 07 15:58:00 cizrna kernel: mali ff9a0000.gpu: error detected from slot 0, job status 0x00000058 (DATA_INVALID_FAULT)
<tomeu> Jan 07 15:58:00 cizrna kernel: mali ff9a0000.gpu: t6xx: GPU fault 0x58 from job slot 0
<raster> tomeu: oh hey man
<raster> was just chatting with beata....
<raster> ummm no- havent got it working
<raster> i'm wondering what i have gotten wrong
<raster> i've basically got
<raster> failed to load driver: rockchip
<raster> and a whole bunch of other faileds...
<raster> even tho i enabled the rockship dri driver
<alyssa> narmstrong: Yeah, AFBC rendering is just a matter of some refactors
<alyssa> FBOs are already all AFBC (de facto mandated by the hardware, since at the time I didn't know enough about formats to do it any other way. And by the time I could have done it a different way, I mean, it's the better approach)
<alyssa> tomeu: Oh, neat. DATA_INVALID_FAULT is... possibly the most annoying fault to deal with, since it's so vague. Panwrap helps but.. yeah
<alyssa> Rect textures aren't something I've looked into but ought to be easy enough, I can poke at that today if you'd like
<raster> alyssa: hey... you still do your work on a rockpro64?
<alyssa> raster: A samsung chromebook plus, but yeah
<raster> 3399 right?
<alyssa> Mm
<alyssa> We recently merged code which bumps us to use the latest mali_kbase, so that probably breaks old everything
<raster> hmmm
<alyssa> I'm not sure if the newer rockpro64 images have corresponding newer mali_kbase versions
<raster> well i had to enable the rockpro dri driver (not detailed in instructions for building panfrost)
<alyssa> (At the same time, we also merged code to switch to an actual GBM driver, rather than the X11 hacks we had piling up before. So running from within X11 won't work anymore; you'll have to use DRM apps from the framebuffer)
<raster> but mesa only gets to
<raster> failed to load driver: rockchip
<alyssa> Hmm
<raster> are my options
<raster> i got somthing wrong or it's my kernel
<alyssa> :eyes:
<raster> its q 4.4 ayfun one
<raster> it's a
<raster> Linux rp64 4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1 #1 SMP Mon Oct 22 20:59:41 UTC 2018 aarch64 GNU/Linux
<alyssa> I haven't the foggiest idea what tree ayufan tracks anymore..
<chewitt> one of our devs has a 4.20 or 4.21 branch for RK stuff .. he's busy writing a stateless V4L2 decoder so needed the newer kernel
<chewitt> I'll see if I can dig up the URL
<alyssa> raster: Just to make sure, are you trying to load X11 apps from within X, or DRM/GBM apps from the console?
<raster> hmmm. the mali drivers do work (with some minor wl compositor+client buffer bind/sync issues)
<raster> just trying drm in xonsole atm
<raster> console
<alyssa> Alright, that's good
<raster> havent even gotten to wl clients yet
<alyssa> To state the obvious, /dev/mali0 is chmod 666'd?
<raster> chewitt: if there is one that has hdmi working.. that'd be great
<raster> alyssa: yup
* alyssa blinks
<alyssa> Hmm
<raster> it works as a user with mali drivers :)
<raster> 0 crw-rw-rw- 1 root video 10, 56 Jan 7 15:02 /dev/mali0
<raster> already handled in udev...
<alyssa> IIRC the Arm drivers might have been setuid or something? Just trying to eliminate all the "easy" answer :)
* alyssa checks what kbase version ayufan is on
<raster> well drivers cant be setuid
<raster> they are .so's malled in by the calling process .. as the process
<raster> i run the stuff as me :)
<alyssa> Alright. Not sure what I heard then.
* alyssa shrugs
<raster> trying to get a panfrost setup at least working as well as panfrost currently works
<raster> but still stuck at the doorway ... can't get in :)
<alyssa> Wait, panfrost currently works on there?
<raster> mali binary drivers work
<raster> the rockchip released ones
<raster> with this kernel
<alyssa> " as panfrost currently works"
<alyssa> Do you mean, like, older builds of Panfrost currently work as well?
<raster> well as wellas YOU have it working
<alyssa> Ah
<raster> not working for me yet
* alyssa hasn't built Panfrost on that particular device since XDC
<raster> so ie - i see the same working bits and bugs as you do... not expecting panfrost to be fully working yet
<alyssa> Understood
<raster> i had hoped at least i'd get some thigns rendering...
<raster> like images (argb) rectangles
<raster> hoping alpha textures too
<raster> and enough shader compiler correctness for these relatively simple shaders
<alyssa> Alpha texttures should mostly work
<alyssa> tomeu: What kernel are you on? Mainline?
<raster> also enough gbm/drm buffer correctness for wl clients to work
<raster> if i should compile/try another kernel... i'd love to know which one - problem is the mali drivers have to be patched in so its all a fragmented mess, thus why i ask :)
<alyssa> Yeah :)
<raster> i had hoped since you used it at xdc you still did :)
<alyssa> Well, on my development Kevin (SC+), I'm running a pure mainline 4.20 kernel, straight off Torvalds' tree a week or two ago
<alyssa> With tomeu/Lyude's mali_kbase fork compiled and insmod'd out-of-tree
<alyssa> Since I wasn't sure either when merging their stuff so I figured it'd be safe to match the kernel exactly ;)
<raster> well tbh last timei tried to merge a mali kernel patch into the kernel it was conflict hell and i lost interest in a day or so of figuring it out :)
<alyssa> That's fair :P
<raster> (without knowing the kernel changes that caused the conflicts nor the mali patch code either.. it was not too fun to figure it out :()
* alyssa presses thumbs against temples
<raster> last i heard the rp64 doesn't have working hdmi in mainline but its in linux-next or somthing
<raster> no hdmi would be a bit of a... problem
<alyssa> Ouch >_>
<alyssa> raster: Any chance you have a RK3399 Chromebook floating around somewhere with Linux already running?
<raster> https://gitlab.freedesktop.org/panfrost/linux ... isnt the right thing right?
<raster> nope
<raster> dont have that
<alyssa> I think that's old
* alyssa can't keep track of the different kbases
<Lyude> i think the latest one should be tomeu's?
<raster> hmm
<raster> ayfun has a mainline forked
NeuroScr has quit [Quit: NeuroScr]
<raster> maaaybe that has the hdmi working
<alyssa> One might hope
<raster> and mali_kbase is jst a stand-alone mali module build?
<Lyude> mhm
<raster> i always had to patch it into the kernel src before.....
<Lyude> we did some makefile magic so you don't need to
NeuroScr has joined #panfrost
<Lyude> what kernel are you trying to get this to work with btw?
<raster> i don't know yer
<alyssa> raster: https://rosenzweig.io/logs.txt from when I was trying to get this working
<raster> trying the above mainlike ayufan one right now. cloning....
<alyssa> :tada:
<alyssa> tomeu: Lyude: BTW, I needed the patch https://rosenzweig.io/0001-linux-Fix-build-against-latest-Linux-kernel.patch to tomeu's branch. I have no idea if that's actually correct but it made it compile/work.
<raster> not much in the way of a README here with this kbase :)
<alyssa> Alas
<raster> well let's see... first get this kernel built and working...
<alyssa> I think the long story short was:
<alyssa> With my linux source tree at ~/linux
<alyssa> make KDIR=~/linux -j4
<raster> i dont even have a compiled new kernel yet... :)
<alyssa> Then driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko pops out, which you can insmod on the target
anarsoul|2 has joined #panfrost
pH5 has quit [Quit: bye]
stikonas_ has joined #panfrost
belgin has joined #panfrost
<raster> hmm
<alyssa> No luck? :(
<raster> i have found a 4.20 kernel ayufan built with hdmi in it
<raster> so yay
<alyssa> Oh! :)
<raster> BUT...
<raster> the kbase mali doesnt load....
<raster> errr...
<raster> maybe because i own it
<alyssa> ...and the plot thickens
<raster> nope
<raster> no such device... ?
<alyssa> ?!
<alyssa> tomeu: Lyude: Any clues? ^^
<raster> i am assuming it cant find the mali device
<raster> ... gzaarh
<Lyude> Missing parts in your devicetree
<raster> i was about to say...
<raster> but the 4.4 had it
<raster> gah
<Lyude> which 4.4 kernel, mainline?
<raster> chasing a magic kernel with the right patches, right config ... and right dt (patched or whatever) is not fun
<Lyude> Or some sort of Android kernel, etc.
<raster> 4.4 from ayufan
<Lyude> raster: yeah
<raster> i just wanted to get on with userspace :)
<Lyude> I think we are close enough to upstreaming though we should start sending all the required DT stuff for all the devices we have working so far upstream
<raster> indeed
<Lyude> what soc is this btw?
<raster> 3399
<alyssa> Lyude: I thought the DT is upstream already for a bunch of devices
<Lyude> alyssa: some devices don't have the Mali parts, I know meson doesnt
<alyssa> Gotcha
<Lyude> Rk3399 did though, at least I thought
<alyssa> (The rockchips do, at least some)
<alyssa> At least Kevin has it
<alyssa> ..I think
<raster> well this is a 4.20 - not next...
<Lyude> That should still have it though
<Lyude> or Kevin does at least
<raster> hmmm
<alyssa> Lyude: What if the chromebooks have it but the boards don't maybe?
<Lyude> It's probably just missing the one for your specific board
<raster> odd that it's a kernel specifically for my board
<Lyude> alyssa: it could be chromeos kernel, if that's what you are using, just has the dt stuff baked in
<Lyude> *patched in
<raster> ayufan probably somehow forgot it...
<alyssa> Lyude: I'm on mainline mainline!
<raster> so where is the mali dt bit... hmm
<Lyude> yeah, arch/arm64/boot/dts/rockchip/rk3399.dtsi
<Lyude> from latest mainline kernel
<Lyude> raster: what's in the ./config file you're using for the module?
<chewitt> ^ that's the mali node for the Amlogic chip .. if that helps
<Lyude> chewitt: this one is for a rk3399 unfortunately
<raster> MALI_MIDGARD=m
<raster> MALI_PLATFORM_NAME=meson
<Lyude> oh
<Lyude> there's your problem :P
<chewitt> meson = amlogic
<raster> as is from master
<raster> oooooh
<Lyude> raster: switch meson to devicetree
afaerber has quit [Quit: Leaving]
<raster> not much docs here
<raster> had no idea that was amlogic
<raster> thought meson build system :)
<Lyude> ah, lol
<Lyude> yeah it's a bit confusing
<chewitt> building meson dri for meson (amlogic) using meson (buildsys) ..
<raster> i was a bit baffled as to why it was doing meson stuf and had a makefile still
<raster> :)
<narmstrong> Yeah meson is quite confusing but the build system came after... too late to change the amlogic upstream drm driver name !
<raster> :)
<raster> no problems
<raster> now.. unknown symbol
<Lyude> mind pasting the output?
<raster> it didnt even tell me what symbol
<raster> i unset my cflags.. wtf...
<Lyude> try cleaning and rebuilding maybe
<raster> just did
<raster> :)
<raster> thats incredibly useful that error...
<Lyude> raster: check dmesg
<Lyude> probably says what's missing there
<raster> [ 1808.670989] mali_kbase: Unknown symbol kbase_platform_unregister (err -2)
<raster> etc.
<Lyude> wat...
<raster> well
* Lyude takes a look
<raster> [ 554.073830] Couldn't find the mali node
<raster> actually no
<raster> the above is right
<raster> much earlier in boot
<alyssa> I'm so confused
<Lyude> hm. so kbase_platform_register()/kbase_platform_unregister() should be provided by ./driver/product/kernel/drivers/gpu/arm/midgard/platform/devicetree/mali_kbase_config_devicetree.c
<raster> oh wait
<Lyude> which makes me think maybe CONFIG_OF isn't being set, but that would mean you have dt off
<raster> that might be.. i didnt build the kernel - found ayufan's 4.20
<raster> CONFIG_OF=y
<raster> thats from config.gz
<raster> i'll let my kernel builds go overnight.. then i can do my own kernels from there.
<Lyude> hol on
<raster> will try again tomorrow
<raster> :)
<raster> ?
<Lyude> alight-one last thing if you have a second though
<raster> its the rk399 branch?
<raster> oh yup
* alyssa didn't even realise there were different branches >_<
<Lyude> yeah we really need to put this all on panfrost's group page
* Lyude takes blame for slacking
<raster> :)
<raster> it'd be great to have some intro docs
<raster> (that are up to date and work)
<alyssa> We ha--- ah, yes, the parenthetical
<alyssa> :P
<raster> :)
<Lyude> raster: mhm-it's only been very recently we've had the driver in a state where it'd work on most people's mali systems
<raster> worked
<Lyude> awesome!
<alyssa> ?!
<raster> poop
<raster> wait
<raster> nm
<alyssa> ¿¡
<raster> i had my mali binary ld.so.conf setup
<raster> hmm
<raster> nope
<raster> still
<alyssa> That's something I've noticed when the mali_kbase isn't insmod'd..
<raster> Module Size Used by
<raster> mali_kbase 462848 0
<raster> insmod'd
<alyssa> (Worth noting glmark in particular needs https://rosenzweig.io/glmark.patch but that's not the issue here)
<raster> well other tests i have do the same
<raster> and the other tests i want to get working really :)
<raster> like full compositor/toolkit
<raster> hmm
* alyssa is so confused by these errors
<Lyude> they are just issues finding the driver
<raster> well i grepped mesa for that failed to load driver: rockchip
<Lyude> raster: what's the meson (build system) config you're using for the mesa branch?
<raster> abnd it wasnt very helpful
<raster> ummm
<alyssa> Lyude: They posted it a little while ago, it looked fine
<Lyude> would like to double check though so we're all on the same page
<raster> i added rockchip dir as i was getting other rockchip dri cannot load errors before that
belgin has quit [Remote host closed the connection]
<Lyude> yeah that should be fine... maybe try LD_DEBUG=libs
<Lyude> and see where it's getting it's mesa build from
<raster> well i ldd'd so it'll be mind
<raster> 24335: search cache=/etc/ld.so.cache
<raster> 24335: trying file=/opt/panfrost/lib/aarch64-linux-gnu/libGLESv2.so.2
<raster> that's my build alright :)
<raster> i'm keeping the system mesa pkgs clean and untouched
<Lyude> mhm-that's what I do as well
<raster> this allows me to switch mali vs panfrost with some ld lib path fun
<raster> and/or ld.so.conf fun
<Lyude> So you should have some *panfrost*.so file in your mesa output dir if everything built correctly, if you've got that then the question must be why it's not probing the GPU
<raster> hmmm
<raster> i dont
<raster> nothing matching panfrost and .so
<raster> hmmm
<Lyude> huh
<raster> that is the right tree?
<raster> master is ok?
<Lyude> yeah it should be
* alyssa nods
<raster> the above was my build script setup...
<alyssa> The panfrost_dri.so is in the dri folder
<Lyude> alyssa: I don't have my buildtre setup at the office right now for reasons... would you mind doing a clean rebuild off master just to double check evrything's still working?
<alyssa> /usr/loacal/lib/aarch64-linux-gnu/dri/panfrost_dri.so
<raster> wait
* Lyude waits
<raster> i have alibpanfrost.a
<Lyude> uhhhhh, that's definitely not right
<alyssa> :thinking:
<raster> libpanfrostwinsys.a
<raster> in my build dir
<raster> it never made this .so...
<alyssa> I also have a libpanfrost.a in the build dir
<Lyude> that shouldn't be there
<raster> so those would be intermediate stages linked into something...
<Lyude> those are static build artifacts
<raster> yeah
<raster> not in the install
<raster> in the build
<raster> oh
<raster> on INSTLAL it gets it right
<raster> /opt/panfrost/lib/aarch64-linux-gnu/dri/panfrost_dri.so
<raster> not int he build tree tho
<Lyude> yeah that's expected
<raster> thats unusual
<Lyude> since ninja install runs some fancy mesa install script at the end that makes those files iirc\
<raster> we use meson for several of our proejcts now and it does produce .so's in the build dir
<raster> anyway
<raster> you must have a customized install right?
<Lyude> raster: I believe mesa's meson buildsystem does yeah
<raster> does funky stuff
<raster> :)
<raster> not sure why you do.. but anyway
<raster> its there in the install
<Lyude> now it should 'just work'
<raster> nupsicles
<Lyude> i beg your pardon?
<raster> nup
<Lyude> nope?
<raster> yup
<raster> :)
<Lyude> oh ok sorry lol
<raster> hehe
<raster> it sounds more friendly than "no" :)
<Lyude> raster: does it print out any more info onto the terminal after you update ldd and run the build with .so?
<raster> it loads rockcip_drv.so
<raster> (just stracing)
<Lyude> alright, that's the first step down at least
<raster> all the info i get i pasted in pastebin above
<raster> it never tries to open panfrost_dri.so at all
<raster> not even trying
<raster> it tries libsensros.so.5
<raster> fails... but tries
<raster> openat(AT_FDCWD, "/opt/panfrost/lib/aarch64-linux-gnu/dri/rockchip_dri.so", O_RDONLY|O_CLOEXEC) = 4
<raster> .. and not much at all (mmap, some mprotects() then close(4)
<raster> hmm
<raster> tomorrow
<Lyude> raster: alright
<Lyude> sorry about all the trouble!
<raster> no problems
<raster> i'll work through it
<raster> i'm stubborn enough to try
<raster> :)
<raster> cya tomorrow.. try again then. :)
raster has quit [Remote host closed the connection]
<cwabbott> alyssa: I'm surprised gallium doesn't emulate alpha texture formats for you
<cwabbott> are you just missing some PIPE_CAP?
<cwabbott> from what I understand, they're a legacy feature from before GL had texture swizzles
AntonioND has joined #panfrost
<alyssa> cwabbott: Hm?
<alyssa> I think alpha tetures are real in the hw?
<cwabbott> no, I don't think so
<alyssa> Hm.
<alyssa> There are dedicated format bits we have for A8_UNORM
<alyssa> And then the swizzle points to W, not X
<cwabbott> I don't think so...
<alyssa> (So if alpha textures are totally emulated, it's emulated at the hw level?)
<cwabbott> I don't think there's a special alpha format in the HW
<alyssa> So what are these magic bits?!
<alyssa> :P
<alyssa> If I disable alpha_only and disable the swizzle magic, it still works
<alyssa> But then I guess it's interpreting it as a single-channel red texture, rather than alpha
<alyssa> Which probably makes zero distance, I admit
<alyssa> *difference
<alyssa> Pretty sure bottom/unk1 are like a swizzle, for channel type interpretation
<cwabbott> alyssa: that would make sense... in every instance where I've seen the 8-bit format, I've seen the swizzle right next to it
<alyssa> cwabbott: The swizzle is _also_ there. I'm thinking it's a different type of 12-bit code
<cwabbott> so it's yet another swizzle?
<alyssa> Maybe?
<cwabbott> yo, I heard you like swizzles...
<alyssa> Like, for deciding between "RGB", "depth/stencil", "alpha", etc
hipboi has quit [Ping timeout: 245 seconds]
* alyssa gathers more data
<HdkR> Oh, need texture rectangle support?
<HdkR> Woo npot texture support
<cwabbott> alyssa: maybe what we need to do is put the swizzle described by util_format into the spot next to the format (bottom/unk1) and the user-specified swizzle in the other place
<cwabbott> and not compose them
<alyssa> It's quite possible
<alyssa> Gathering more data!
<cwabbott> I guess gallium has a different idea of what alpha is than GL, but since this is gallium we have to obey gallium rules
<cwabbott> actually, they have the same idea
<cwabbott> I think what's happening is that your code is
<cwabbott> whoops
<alyssa> So the "alpha-only" texture is encoded with a MALI_R8_UNORM format code
<cwabbott> I think what's happening is that this bit of code: https://gitlab.freedesktop.org/panfrost/mesa/blob/665b8fbda1fd836476d45817881dcf5bd183004a/src/gallium/drivers/panfrost/pan_context.c#L2121 is creating the correct swizzle for alpha textures, but by composing the user swizzle with the gallium swizzle you're effectively swizzling twice
<alyssa> Alpha/luminance is MALI_R8G8_UNORM
<cwabbott> when you only wanted to swizzle once
<alyssa> cwabbott: Both swizzles are needed, they serve different purposes
<alyssa> Gallium swizzle - differentiates between RGB and BGR
<alyssa> User swizzle - whatever the user passed
<cwabbott> well, the gallium swizzle also implements GL_ALPHA8
<cwabbott> by doing a (0, 0, 0, x) swizzle
<alyssa> Mm
<cwabbott> so if you compose the user swizzle with that, you'll be doing the (0, 0, 0, x) swizzle twice
<cwabbott> and getting 0
<cwabbott> so you need to either always set bottom/unk1 to the identity swizzle, and compose the user swizzle with the gallium swizzle
<alyssa> Mm
<alyssa> The question is, what the heck is bottom/unk1
<cwabbott> or set bottom/unk1 to the gallium swizzle, and don't compose
<alyssa> Trying more formats and the numbers aren't doing anything logical to me
<cwabbott> my guess is it's just another swizzle
<cwabbott> that gets composed with the user swizzle by the HW
<cwabbott> and the driver uses it to implement ALPHA8, BGR, depth, etc.
<cwabbott> in other words it's used for emulating GL-level formats with Mali-level ones
<alyssa> Almost...
<cwabbott> is there something not consistent with that?
<alyssa> rgb 0 1 6 5
<alyssa> We have 6 as reserved
<alyssa> Actually besides that anomoly, everything lines up
* alyssa gathers more data
<alyssa> Oh, it was a typo
<alyssa> Whoops :p
<alyssa> Yes, okay, that's exactly what it is
<alyssa> Case closed :)
<cwabbott> alyssa: yeah, when I see something weird like that, it almost always disappears when I look again :)
<alyssa> cwabbott: Rude :p
<alyssa> cwabbott: Thanks for the pair programming :)
<cwabbott> alyssa: you should double-check that the swizzle gallium gives you for depth/stencil matches the one gallium gives you
<alyssa> Alright
<cwabbott> i mean, matches the bottom/unk1 swizzle
<cwabbott> since depth stuff is a bit magic, it's always implemented differently by everyone
<cwabbott> the gallium thing might not be exactly what you need
<cwabbott> but otherwise, seems like you know exactly what to do now :)
<alyssa> :)
<alyssa> Dear Connor Abbott, thanks for every note you send...
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<alyssa> cwabbott: We should be good to merge, then?
<cwabbott> alyssa: I think you forgot to delete the check for 10-bit things
<alyssa> Oops
<alyssa> Fixed
<alyssa> cwabbott: (Merge if you deem it ready)
<cwabbott> alyssa: interesting, it squashed all the commits
<cwabbott> I just pressed the button
<cwabbott> I guess we really didn't need all those commits anyways
<alyssa> ^_^
<alyssa> Kodi text now works on master without any hacks
<alyssa> Feels good :)
<HdkR> woo
ezequielg has joined #panfrost
<HdkR> Just noticed the Larabel coverage :D
<Lyude> larabel?
<HdkR> Phoronix
<Lyude> ah
<alyssa> Did something happen?
<HdkR> Just a short article
<alyssa> HdkR: Aww, I was going to do a big blog post soon. Thanks for stealing thunder :p
<alyssa> "hacky X11 SHM" Okay I know those are my words, but rude :P
<HdkR> :P
<alyssa> Oh, okay, tomeu did a blog post prompting this
<alyssa> Gotcha!
<alyssa> I retract my rudeness, tomeu is entitled to brag :)
<alyssa> "elaborate hack that involved copying each frame into a X11 SHM buffer"
<alyssa> Thank you, but it was hardly elaborate :P
<HdkR> cwabbott: When you were messing with compute shaders did you look at how shared memory works?
BenG83 has quit [Quit: Leaving]
<cwabbott> HdkR: no, I looked at the instructions but never at the command stream
<cwabbott> there's probably some shared memory size thingy somewhere
<HdkR> 32kb of shared memory on the G72 is pretty nice
<HdkR> Only Nvidia hits higher
BenG83 has joined #panfrost
<bnieuwen1uizen> HdkR: AMD actually has 64 KiB?
<HdkR> bnieuwen1uizen: According to vulkan.gpuinfo then almost everyone is reporting 32k
<HdkR> Aside from Nvidia reporting 48k
<HdkR> IMGTec doing 16k :D
<bnieuwen1uizen> HdkR: Okay, found something to improve in radv :P
<HdkR> woo
adjtm has joined #panfrost
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]