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!
mrfixit2001 has joined #lima
<mrfixit2001> Hello all :) I'm the developer behind porting the retro-gaming Recalbox system over to the rockchip boards. I'm in the middle of testing the lima and panfrost and I've found something that doesn't work and I'm hoping someone here has some ideas.
<mrfixit2001> So in order to improve the performance for some demanding emulators on some rockchip boards, I have added a very simple patch that changes the resolution just before the emulator starts - because unfortunately, fbset and tvservice are not applicable to rockchip for some reason... So in the kernel params I set the default hdmi resolution at 1080p -
<mrfixit2001> but when an emulator starts I might change it to 720p so that it runs faster.
<mrfixit2001> To make this happen - before the emulator does any initialization of it's graphics stack at all, I patch it to run a new set of functions. It opens /dev/dri/card0, finds the drmMode that I want in the connector's modes, creates a gbm device and surface, sets up an egl display, context, and surface, swaps the buffers, locks the gbm surface, gets the
<mrfixit2001> fb from the bo, and then changes the crtc mode. Once that all is done, the emulator continues as usual and renders to the screen with the new resolution.
<mrfixit2001> Everything I've done is fully GBM / GLES - no windowing system at all...
<mrfixit2001> The thing is - it works perfectly with the old mali drivers. The resolution changes and then the emulator renders to the screen at the new resolution. But with lima and panfrost I am left with a blank black screen. I can hear the emulator running in the background, and there's no errors. I've literally been tinkering with it for 3 days and trying a
<mrfixit2001> variation of different code with no luck.
<mrfixit2001> So obviously "something" is different about mesa and mainline.
<mrfixit2001> And here is something very strange... when I printf strerror(errno) at every step along the way - I actually end up seeing "permission denied" showing up after the creation of the gbm device - but the object exists and there's no error and I can use the object to create the rest of the objects that depend on it.
<mrfixit2001> I've tried "chmod 777 /dev/dri/*", just to be absolutely certain it's not permissions... no change.
<mrfixit2001> I'm hoping SOMEONE has some idea. Cause I'm running out of them haha I did find that I can hijack the buffer_id of the current drm mode and change the resolution on the screen without initializing any gbm or egl, and the resolution does change and the fb graphic on the screen gets all distorted - but then the emulator doesn't render at all and I'm
<mrfixit2001> just stuck at the distoretd fb image instead of a black screen haha
buzzmarshall has quit [Remote host closed the connection]
dddddd has quit [Ping timeout: 250 seconds]
camus1 has joined #lima
kaspter has quit [Ping timeout: 250 seconds]
camus1 is now known as kaspter
Elpaulo has quit [Write error: Connection reset by peer]
Elpaulo has joined #lima
warpme_ has quit [Quit: Connection closed for inactivity]
<plaes> mrfixit2001: can you create a bug with that minimal sample?
_whitelogger has joined #lima
dddddd has joined #lima
<enunes> mrfixit2001: does kmscube work on your setup?
afaerber has quit [Ping timeout: 256 seconds]
afaerber has joined #lima
warpme_ has joined #lima
buzzmarshall has joined #lima
cwabbott has joined #lima
kaspter has quit [Remote host closed the connection]
kaspter has joined #lima
cwabbott has quit [Ping timeout: 240 seconds]
dddddd_ has joined #lima
deesix has quit [Ping timeout: 264 seconds]
dddddd has quit [Ping timeout: 246 seconds]
dddddd_ is now known as dddddd
deesix has joined #lima
cwabbott has joined #lima
cwabbott has quit [Quit: cwabbott]
cwabbott has joined #lima
cwabbott has quit [Quit: cwabbott]
cwabbott has joined #lima
<mrfixit2001> plaes enunes thank you both for your replies and for wanting to help! I Had also posted in the panfrost group for ideas and someone mentioned something that gave me an idea... I needed to release my open hold on card0. I changed my code to do nothing except open card0, find the desired mode, and set it on the local buffer. I didn't init any gbm or
<mrfixit2001> egl at all, and I added drmDropMaster after I changed the mode... and BOOM it works :D
<anarsoul> cool
<anarsoul> have you tried ppsspp with lima?
cwabbott has quit [Quit: cwabbott]
<mrfixit2001> anarsoul actually yes I have, but was forced to play it at 1080p on the rock64 rk3328. That larger resolution isn't optimal for this board, but honestly it's a very nice speed improvement over the mali blob. PPSSPP was basically unplayable at 1080p on the mali blob, and using lima it's speed is at about 70%-90% fps, so quite playable...
<mrfixit2001> however - there is still some graphics glitches unfortunately
<mrfixit2001> Here's an example of one, in tekken, you'll see there's missing textures on the character's face: https://drive.google.com/open?id=1bQfY-4l1Kf8fR_g3IBiAGMHhcxUKgem0
<mrfixit2001> So now that I have that issue resolved with drm master, I'm going to recompile ppsspp right now to run at a lower resolution and see how it goes!
<mrfixit2001> I also tested gta vice city at 1080p. Sadly, it runs quite slowly, and is missing a lot of the graphics so it's unplayable. It's actually kind of humorous, the game recognizes the objects are missing, so the main character starts by just endlessly falling helplessly, instead of standing on the street.