rellla changed the topic of #lima to: Development channel for open source lima driver for ARM Mali4** GPUs - Kernel driver has landed in mainline, userspace driver is part of mesa - Logs at https://oftc.irclog.whitequark.org/lima/
Xalius has quit [Quit: Leaving]
mripard has quit [Ping timeout: 480 seconds]
adjtm has quit [Ping timeout: 480 seconds]
adjtm has joined #lima
chewitt_ has joined #lima
chewitt has quit [Read error: Connection reset by peer]
chewitt_ has quit [Read error: Connection reset by peer]
chewitt has joined #lima
chewitt_ has joined #lima
chewitt has quit [Ping timeout: 480 seconds]
mripard has joined #lima
mripard has quit [Quit: leaving]
mripard has joined #lima
Xalius has joined #lima
adjtm has quit [Quit: Leaving]
adjtm has joined #lima
adjtm is now known as Guest310
adjtm has joined #lima
Guest310 has quit [Ping timeout: 480 seconds]
gamiee has joined #lima
<gamiee> Hello, does anyone encountered Segfault inside "sun4i-drm_dri.so"? I have latest mesa and Xorg server, but still, I can't figure out :( Any ideas where can be problem? Thanks (full info: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4861 )
<enunes> gamiee: hi, no I have never seen that one
<gamiee> enunes: me neither (mostly, lima was working out of the box (on Debian or Ubuntu)). But now I'm compiling mesa and xorg server from scratch via buildroot, and somehow it don't want to work :/
<jernej> gamiee: it's always good idea to test with unpatched kernel
<enunes> gamiee: I would guess it won't be a lima issue in the end since it is inside sun4i-drm_dri.so and not even lima
<enunes> but segfault is not great
<enunes> I think it would be at least more helpful if you can rebuild with debug symbols enabled so the backtrace is not that limited
<gamiee> jernej: hi, well, I can try this, but same kernel (from megous) is used in Armbian, and it works just fine, but I might try that.
<enunes> also I would suggest to enable kmscube and try that too before Xorg
<gamiee> enunes: kmscube works just fine
<enunes> ah, I see it is reported there too
<gamiee> and yeah, I kinda didn't realized that it's not lima problem, but isn't sun4i-drm_dri built by mesa (so I placed the issue to mesa repo)
<enunes> it is build by mesa
<gamiee> about full symbols, I wonder how I will force Buildroot to do that, but I'm going to try that right now
<enunes> there is a global option to disable symbol strip and another to build with optimize for debugging
<enunes> I used it with Buildroot for a long time as my first lima development system, not much anymore these days
<gamiee> enunes: thanks, I'm recompiling mesa3d now with debug symbols, hopefully I will get more information
<gamiee> btw I just noticed, I see there "lima_dri.so", what is difference between sun4i dri ?
<enunes> sun4i gets loaded because that is what matches your display driver, when you use the display and it needs to render something, the rendering calls are passed to lima
<gamiee> oh, makes sense!
<gamiee> Well, now I tried it with mesa3d with symbols, but now I'm getting Abort instead segmentation fault (maybe because I didn't recompiled the whole os?)
<anarsoul> gamiee: you hit it because the issue is caught earlier with assert()
<anarsoul> I wonder if BO allocation fails
<anarsoul> do you have enough CMA reserved?
<enunes> dmesg in the issue says cma: Reserved 128 MiB at 0x75c00000 so i think so
<enunes> I think it is worth checking with an upstream kernel, that kernel seems to be heavily patched on sun4i-drm
<anarsoul> gamiee: what's your display resolution?
<gamiee> anarsoul: ahh, the assert makes sense. About CMA, I wasn't changing it, so it should be on default value. (as enunes said, it probably is)
<gamiee> Resolution is 1440x900
<anarsoul> gamiee: can you get a backtrace with debug symbols?
<gamiee> anarsoul: backtrace of assert I posted upper is set on "optimize for debugging" level, but I'm going to try something. w8
<anarsoul> try setting breakpoint on ../src/gallium/frontends/dri/dri2.c:563
<anarsoul> i.e. before staring your app do "break ../src/gallium/frontends/dri/dri2.c:563"
<anarsoul> then "r" (for run)
<anarsoul> it should stop on this line and you can do 'bt'
<anarsoul> it asserts because resource_from_handle() returned NULL
<anarsoul> i.e. lima_resource_from_handle()
<anarsoul> I bet it fails early with debug_error("import buffer offset not properly aligned\n");
<anarsoul> please try again, this time set breakpoint on "lima_resource_from_handle" (i.e. break lima_resource_from_handle)
<anarsoul> when you get there
<anarsoul> do "print handle->offset"
<gamiee> $1 = 0
<anarsoul> do "next" until it fails and share the output
<anarsoul> so lima_bo_import() fails
<anarsoul> gamiee: set breakpoint on lima_bo_import
<anarsoul> and try again, i.e. restart the app and when it hits breakpoint do "n" until it fails, then share the output
<gamiee> ok sec.
<anarsoul> so drmIoctl(screen->fd, DRM_IOCTL_GEM_OPEN, &req)) failed
<anarsoul> that's display driver FD
<anarsoul> so enunes is right - try with unpatched sun4i driver
<gamiee> anarsoul: okay, I'm going to try mainline kernel without patches, w8
<anarsoul> you can also try pinging megi :)
<gamiee> anarsoul: also good idea, but well, let's try mainline kernel. Also, I have verified that megi's kernel works good, but for version 5.10 (armbian uses it)
<gamiee> So maybe between 5.10 and 5.12 something happened
<gamiee> anarsoul: looks like even on mainline 5.12 (without patches) it does the same, but to be sure, I'm going to rebuild everything (since buildroot likes to keep old things)
<anarsoul> gamiee: could be some change in sun4i or in generic gem code
<anarsoul> it doesn't look like a userspace issue anyway
Danct12 has quit [Remote host closed the connection]
<gamiee> anarsoul: confirmed, it doesn't work on 5.12 . I will try 5.10 tomorrow. So far thank you for help guys :)
gamiee has quit [Ping timeout: 480 seconds]
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #lima
jernej has quit [Remote host closed the connection]
jernej has joined #lima