mripard / sunxi-mali

GNU General Public License v2.0
100 stars 54 forks source link

Installing ok, no /dev/fb? #35

Closed cnlohr closed 6 years ago

cnlohr commented 6 years ago

Bulding and installing seemed to go ok, but I don't see anything new in /dev.

[    3.340632] mali: loading out-of-tree module taints kernel.
[    3.344927] platform mali-utgard: assigned reserved memory node linux,cma
[    3.345382] Allwinner sunXi mali glue initialized
[    3.345771] Mali: 
[    3.345777] Found Mali GPU Mali-400 MP r1p1
[    3.346335] Mali: 
[    3.346340] 2+0 PP cores initialized
[    3.346823] Mali: 
[    3.346826] Mali device driver loaded

Same deal whether I try r6p2 or r6p0.

Any way to debug further? Or should I not expect any kind of fb* new in /dev?

Charles

cnlohr commented 6 years ago

Also, I do have a /dev/mali, however, I cannot find any documentation showing how to tell X to use it, or how to use EGL without X and it.

Charles

sergey-suloev commented 6 years ago

/dev/fbN is a framebuffer device which should be provider by a display engine, not GPU Make sure your system has sun4i drm module(s) installed. As for Mali GPU driver I personally didn't use it with X-win but I've heard someone made is work. In general, GPU driver is used by userspace library, libMali.so which can be downloaded here https://github.com/free-electrons/mali-blobs.git. @giuliobenetti do you have experience with Mali + X, by the way ?

cnlohr commented 6 years ago

For my application I would much prefer no X. But it seems that few people have any real documentation on how to actually do that!

I was unaware of that distinction. I will try to get /dev/fbX working elsewhere and post the outcome!

cnlohr commented 6 years ago

Bummer. Sun4i DRM modules are installed. Interesting though that when I remove and reinstall it, no messages are printed to dmesg. Currently on 4.16.0-rc2-ge4c48ca1a, with this project's patches enabled. Just making sure -- they're still required, right?

giuliobenetti commented 6 years ago

As I remember there's a bug on sun4i drm that prevents adding crtc, then fb too. Can you try to git pull - - rebase upstream master and check if fb is shown? I had same issue until 10 days ago. Now it should be fixed on mainline. Otherwise try to check sunxi git.

cnlohr commented 6 years ago

I regret that I can't make sense of your git operation. I am fully up to date with https://github.com/linux-sunxi/linux-sunxi branch "sunxi-next" ... What should I be rebasing to? A different repo? branch?

This also feels like the wrong forum to address this, but I just can't find any documentation on a specific build process. Any better places to post?

Also, I see no reference to crtc in the dtb file.

cnlohr commented 6 years ago

Also, if you don't mind sanity checking me, @giuliobenetti My kernel command line is root=UUID=a769471e-a787-40d3-8298-d31c195f1bb9 rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 ubootpart=67b5d560-01 ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1 and my dtb's are just stock DTBs, except I had to add emac to my sun8i-h3-orangepi-one.dts (not sure where I should post that fix...)

cnlohr commented 6 years ago

It was a dumb mistake on my part: https://github.com/linux-sunxi/linux-sunxi/issues/290

Now I'm back onto this mali driver... I'd still like to avoid use of X, but it's the easiest way I know how to get things moving. If i try running X, I get.

modprobe: FATAL: Module g2d_23 not found in directory /lib/modules/4.16.0-rc2-ge4c48ca1a-dirty
modprobe: ERROR: could not insert 'mali': No such device
modprobe: FATAL: Module mali_drm not found in directory /lib/modules/4.16.0-rc2-ge4c48ca1a-dirty
modprobe: FATAL: Module sunxi_cedar_mod not found in directory /lib/modules/4.16.0-rc2-ge4c48ca1a-dirty

No idea what changed that mali can't find the device.

[    3.697440] mali: loading out-of-tree module taints kernel.
[    3.701200] Couldn't find the mali node
root@orangepione:~# modprobe mali
modprobe: ERROR: could not insert 'mali': No such device
sergey-suloev commented 6 years ago

I am personally not using https://github.com/linux-sunxi/linux-sunxi but the Linus's mainline with a number of patches. AFAIK you are testing Mali on H3 SoC, correct ? @cnlohr have you added Mali device tree node ? I am not sure why you are using modprobe. @cnlohr as for emac device tree changes they are already in 4.16

mripard commented 6 years ago

This discussion has nothing to do with the Mali driver.

cnlohr commented 6 years ago

@sergey-suloev
I am using Mali on the H3 SoC. I am not sure what you mean by adding it to my device tree... It attempts to autoload, I was just using modprobe to get it to print the specific error. It seems as soon as I get /dev/fb0 working, the mali module refuses to load. If I break /dev/fb0 the mali module loads without issue. The emac issue is unrelated to this and is being handled on-list.

giuliobenetti commented 6 years ago

He means you have to add dts Mali node if you didn't do it already. Try to check if sun8i.dtsi contains Mali node.

sergey-suloev commented 6 years ago

@cnlohr

https://github.com/mripard/sunxi-mali/blob/2d997d5f2e01800c7a717b481179e0bf7463348b/patches/0005-mali-Add-sunxi-platform.patch#L125

Check sunxi-h3-h5.dtsi, sun8i-h3.dtsi or maybe your board's dts file and see if you have gpu device tree node for mali. It should be available as patch but I don't have it in hand right now. I know it should be among armbian patches.

sergey-suloev commented 6 years ago

found it

https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/32-h3-DT-add-mali-node.patch

giuliobenetti commented 6 years ago

You don't need cma node anymore. You can avoid that piece of code, add Mali node only

cnlohr commented 6 years ago

Thank you, @sergey-suloev That solved it! Any idea why this isn't merged into sunxi-next?

mripard commented 6 years ago

Because no one ever took the time to send it upstream.

Le mar. 13 mars 2018 à 03:46, CNLohr notifications@github.com a écrit :

Thank you, @sergey-suloev https://github.com/sergey-suloev That solved it! Any idea why this isn't merged into sunxi-next?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mripard/sunxi-mali/issues/35#issuecomment-372528546, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWen1pqSoBcgSNG_0tm21us1LoYxWviks5tdzMKgaJpZM4SlzMJ .

giuliobenetti commented 6 years ago

Just sent patch for H3 dts: https://patchwork.freedesktop.org/patch/210077/

cnlohr commented 6 years ago

Woot woot.

Now, as soon as I can figure out why the drm system won't accept my unusual EDID video modes, I'll be 100% set and cruising in my application. Odd that UBOOT accepts them happily, but, the kernel pukes on it.

https://github.com/linux-sunxi/linux-sunxi/issues/291

Thank you for all your work and dedication!!!