narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - Publicly Logged on https://irclog.whitequark.org/linux-amlogic
vagrantc has quit [Quit: leaving]
jakogut_ has joined #linux-amlogic
jakogut has quit [Ping timeout: 246 seconds]
jakogut_ is now known as jakogut
jakogut has quit [Ping timeout: 246 seconds]
The_Coolest has quit [Quit: FOLD For The Cause!!!]
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Ping timeout: 250 seconds]
Darkmatter66_ has quit [Ping timeout: 245 seconds]
Barada has joined #linux-amlogic
The_Coolest has joined #linux-amlogic
return0e has quit [Ping timeout: 272 seconds]
return0e has joined #linux-amlogic
ldevulder_ is now known as ldevulder
nsaenz has joined #linux-amlogic
nsaenz has quit [Read error: Connection reset by peer]
nsaenz has joined #linux-amlogic
nsaenz has quit [Ping timeout: 246 seconds]
nsaenz has joined #linux-amlogic
nsaenz has quit [Ping timeout: 252 seconds]
nsaenz has joined #linux-amlogic
nsaenz has quit [Ping timeout: 250 seconds]
nsaenz has joined #linux-amlogic
sputnik_ has quit [Ping timeout: 240 seconds]
warpme_ has joined #linux-amlogic
<warpme_> hi *
<warpme_> I’m trying to play with ARM GLES blobs on s905W and kernel 5.0.1. I complied kernel module from https://github.com/superna9999/meson_gx_mali_450. module loads (no any errors in dmesg) - but there is no /dev/mali . My kernel has also patches for lima. is it possible that lima drm kernel causing issues with mali.ko?
JulienMasson has quit [Ping timeout: 246 seconds]
warpme_ has quit [Quit: warpme_]
warpme_ has joined #linux-amlogic
warpme_ has quit [Quit: warpme_]
warpme_ has joined #linux-amlogic
afaerber has quit [Quit: Leaving]
<warpme_> hmm - removing lima from kernel tree not helps. Is mali from https://github.com/superna9999/meson_gx_mali_450 work at all with 5.0.1 kernel?. Kernel log says following: Mar 14 15:32:24 (none) user.warn kernel: [ 42.118554] mali: loading out-of-tree module taints kernel.
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231521] Mali<2>:
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231528] Inserting Mali v900 device driver.
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231537] Mali<2>:
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231539] Compiled: Mar 14 2019, time: 15:15:40.
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231541] Mali<2>:
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231542] Driver revision: r7p0-00rel1-b4c7ed9
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231544] Mali<2>:
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231545] mali_module_init() registering driver
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231796] Mali:
<warpme_> Mar 14 15:32:24 (none) user.warn kernel: [ 42.231798] Mali device driver loaded
afaerber has joined #linux-amlogic
noblock has joined #linux-amlogic
<noblock> warpme_: You may try with this repository: https://github.com/noblock/sunxi-mali - The patch for the S905W works on my board using the r9p0 mali release.
<warpme_> noblock: thx. one Q: r9p0 You are successfuly using is with mali.so for fbdev or gbm or x11 or wayland?
<noblock> It works fine with the r7p0 gbm blob.
<warpme_> perfect. is this exact blob also on your git?
<noblock> No only the kernel module; The hikey blob is OK.
<warpme_> for no potential confussion with varia blobs - may You pls provide me direct link for blob?
<warpme_> are Your’s app using Qt on 905W
<noblock> I've updated glmark2 with gbm/drm compatibility too: https://github.com/noblock/glmark2
<noblock> I've not tried Qt.
<warpme_> so just to confirm: building https://github.com/noblock/sunxi-mali/tree/master/r9p0/src/devicedrv/mali sholud be OK on my tx3-mini and 5.0.1 kernel? (s905w)
<noblock> You just have to apply the same procedure, all the patches are up-to-date and compatible with linux 5.0.
<noblock> build.sh will apply the patches; I've set USING_DEVFREQ to 0, I'm not sure if this change anyting on the S905W.
<warpme_> perfect. I’m crosscompiling so I have my own system to patching. I see patches are in „patches” dir. What exact set of patches needs to be applied for 5.0.1 (is it 0001…0005 + 0015 + 0019)?
<noblock> You may try: v="r9p0"; for f in $(cat patches/${v}/series); do (cd ${v}/; cat ../patches/$f | patch -p1 );done;
Barada has quit [Quit: Barada]
<noblock> (export ARCH=arm64;export CROSS_COMPILE=aarch64-;export KDIR=<your kernel>;./build.sh -r "${v}" -b);
<warpme_> ough - may You pls tell me which exactl patches are needed? I already have whole build system setup for superna9999 version so only what I need to is: change sources url; add patches list....
<noblock> The patches are just to update the r9p0 kernel module, not the kernel itself.
<noblock> You must apply all the patches in: patches/${v}/series
<warpme_> sure. I understan this :-)
<warpme_> if you are refering to „patches” dir - then there is no subdir for r9p0…
<noblock> The last one: 0091-mali-add-meson-gxbb-gxl.patch add the compatibility with the S905W.
<warpme_> ok thax. Will try now to build :-)
<warpme_> i’ll go with g98727ac8ce6953518753477591ecdf11983ea38c on your branch master
<warpme_> ok I built with list of patches like in https://github.com/noblock/sunxi-mali/blob/master/patches/r9p0/series. dmesg says: [ 4820.707894] Mali<2>:
<warpme_> [ 4820.707906] Inserting Mali v900 device driver.
<warpme_> [ 4820.707913] Mali<2>:
<warpme_> [ 4820.707916] Compiled: Mar 14 2019, time: 16:49:38.
<warpme_> [ 4820.707918] Mali<2>:
<warpme_> [ 4820.707920] Driver revision: r9p0-01rel0-b4c7ed9
<warpme_> [ 4820.707921] Mali<2>:
<warpme_> [ 4820.707922] mali_module_init() registering driver
<warpme_> [ 4820.708203] Mali:
<warpme_> [ 4820.708204] Mali device driver loaded
<warpme_> lsmod: lsmod
<warpme_> Module Size Used by
<warpme_> mali 569344 0
<warpme_> ir_rc6_decoder 20480 0
<warpme_> rc_rc6_mce 16384 0
<warpme_> mceusb 36864 0
<warpme_> ao_cec 20480 0
<warpme_> meson_ir 16384 0
<warpme_> rc_core 53248 6 mceusb,ir_rc6_decoder,rc_rc6_mce,meson_ir
<warpme_> meson_rng 16384 0
<warpme_> rng_core 16384 1 meson_rng
<warpme_> pwm_meson 20480 1
<warpme_> ipv6 405504 16
<warpme_> but no dev/mali ls -1 /dev/m*
<noblock> You may try cat /proc/misc
<noblock> You should have a line like this one:
<noblock> 59 mali
<warpme_> ok I have: 183 hw_random
<warpme_> 234 btrfs-control
<warpme_> 59 memory_bandwidth
<warpme_> 60 network_throughput
<warpme_> 61 network_latency
<warpme_> 62 cpu_dma_latency
<warpme_> 239 uhid
<warpme_> 130 watchdog
<warpme_> 223 uinput
<warpme_> 1 psaux
<warpme_> 196 vfio
<warpme_> 200 tun
<warpme_> 63 udmabuf
<warpme_> 237 loop-control
<warpme_> 235 autofs
<warpme_> 231 snapshot
<warpme_> 232 kvm
Xogium has left #linux-amlogic ["leaving channel"]
<noblock> The mali driver seems to be OK; and you don't have /dev/mali registered...
<warpme_> so…?
<warpme_> maybe is there i.e. debug switch to see more details at module load?
<noblock> You may try to compile the module again with: BUILD=debug
<warpme_> super. thx. will try now
<noblock> You may change the line in: build.sh
<warpme_> ah I already have this. this is mine build line BUILD_ARGS += "USING_UMP=0 BUILD=debug MALI_DMA_BUF_MAP_ON_ATTACH=1 USING_PROFILING=0 MALI_PLATFORM=meson USING_DVFS=0"
<noblock> If it works properly, you will have a new entry on /proc/misc
<noblock> build.sh uses sunxi as MALI_PLATFORM
<noblock> You must uses sunxi
<warpme_> sure. my overlook. sorry. just bebuilding....
<warpme_> hmm. no difference. Interesting is that after switch MALI_PLATFORM to sunxi, .ko binary has exactly the same size…is this possible?
<noblock> Indeed; You may check with modinfo
<noblock> It will list the compatibility list.
<warpme_> modinfo mali
<warpme_> filename: /lib/modules/5.0.1/kernel/misc/gpu/drm/mali/mali.ko
<warpme_> version: r9p0-01rel0-b4c7ed9
<warpme_> author: ARM Ltd.
<noblock> And a dmesg -c; rmmod mali; insmod mali.ko; to be sure.
<warpme_> license: GPL
<warpme_> srcversion: 156C81F5769EF91B53A0A78
<warpme_> depends:
<warpme_> name: mali
<warpme_> vermagic: 5.0.1 SMP preempt mod_unload aarch64
<warpme_> parm: mali_debug_level:Higher number, more dmesg output (int)
<warpme_> parm: mali_max_job_runtime:Maximum allowed job runtime in msecs.
<warpme_> Jobs will be killed after this no matter what (int)
<warpme_> parm: mali_l2_max_reads:Maximum reads for Mali L2 cache (int)
<warpme_> parm: mali_dedicated_mem_start:Physical start address of dedicated Mali GPU memory. (uint)
<warpme_> parm: mali_dedicated_mem_size:Size of dedicated Mali GPU memory. (uint)
<warpme_> parm: mali_shared_mem_size:Size of shared Mali GPU memory. (uint)
<warpme_> parm: mali_max_pp_cores_group_1:Limit the number of PP cores to use from first PP group. (int)
<warpme_> parm: mali_max_pp_cores_group_2:Limit the number of PP cores to use from second PP group (Mali-450 only). (int)
<warpme_> parm: mali_mem_swap_out_threshold_value:Threshold value used to limit how much swappable memory cached in Mali driver. (uint)
<warpme_> parm: mali_max_system_fps:Max system fps the same as display VSYNC. (int)
<warpme_> parm: mali_desired_fps:A bit lower than max_system_fps which user desired fps (int)
<noblock> You should have lines like:
<noblock> alias: of:N*T*Callwinner,sun50i-h5-maliC*
<noblock> alias: of:N*T*Callwinner,sun8i-h3-maliC*
<noblock> alias: of:N*T*Callwinner,sun50i-h5-mali
<noblock> alias: of:N*T*Callwinner,sun8i-h3-mali
<noblock> alias: of:N*T*Callwinner,sun7i-a20-maliC*
<noblock> alias: of:N*T*Callwinner,sun7i-a20-mali
<noblock> alias: of:N*T*Callwinner,sun4i-a10-maliC*
<noblock> alias: of:N*T*Callwinner,sun4i-a10-mali
<noblock> You must see the ones for meson too: "amlogic,meson-gxbb-mali" ...
<noblock> Otherwise the module will not start.
<warpme_> hmm. output of mine modinfo don’t have alias at all….how this?
<noblock> It should.
<noblock> The meson definition is in the last patch; You must check the file is well compiled.
<warpme_> hmm - there must be something else… pls see build log: https://paste.ofcode.org/39DKg3hjJr2Zs3HsAVWwUkq
<warpme_> is there anything speciall needed in kernel config or modules dependency required for this mali module?
<warpme_> or maybe tx3-mini dtb has something missing?
<noblock> You should try again using build.sh
<noblock> If you are not on a debian: sed -r -i "s/quilt/echo/" build.sh;
<noblock> will help.
<noblock> something like this must be ok:
<noblock> v="r9p0";
<noblock> sed -r -i "s/(USING_DEVFREQ=)1/\10/;s/(BUILD=)release/\1debug/" build.sh;
<noblock> for f in $(cat patches/${v}/series); do (cd ${v}/; cat ../patches/$f | patch -p1 );done;
<noblock> rm -Rf "${v}"; checkout -f "${v}";
<noblock> sed -r -i "s/quilt/echo/" build.sh;
<noblock> (export ARCH=arm64;export CROSS_COMPILE=aarch64-;export KDIR=<your kernel>;./build.sh -r "${v}" -b);
<noblock> ..
<noblock> to clean up: rm -Rf "${v}"; git checkout -f "${v}";
<noblock> ..
<noblock> v="r9p0";
<noblock> sed -r -i "s/(USING_DEVFREQ=)1/\10/;s/(BUILD=)release/\1debug/" build.sh;
<noblock> rm -Rf "${v}"; git checkout -f "${v}";
<noblock> for f in $(cat patches/${v}/series); do (cd ${v}/; cat ../patches/$f | patch -p1 );done;
<noblock> sed -r -i "s/quilt/echo/" build.sh;
<noblock> (export ARCH=arm64;export CROSS_COMPILE=aarch64-;export KDIR=<your kernel>;./build.sh -r "${v}" -b);
<noblock> ..
<narmstrong> My Mali driver should work... look into /sys/bus/platform/*mali* to see if it has probed
<narmstrong> If you have the Lima driver it will probe first ;-)
The_CooIest has joined #linux-amlogic
<warpme_> narmstrong: Initially I started wit your repo (r6 and r7) and both are loading OK but without /dev/lima. noblock’s code also not working so issue I think is somwhere else. I think where I need to start checking. I’m building kernel with custom config. Is there anything mandatory in 5.0 config to get mali.ko working?
<narmstrong> Nop nothing special
<narmstrong> Please check you don’t have the Lima driver built in the kernel
<warpme_> To be sure about no interferences with lima I build kernel without lima. fresh boot looks like this: https://paste.ofcode.org/342Vg22vT4bWgQwiE9UhfJk
<narmstrong> You should see a Amlogic Mali glue initialized
<warpme_> how such glue looks like?
<narmstrong> It’s from the Mali driver from my repo
<noblock> I think you are not building the file containing the hardware definition. You should have a .o with amlogic,meson-gxbb-mali inside.
<warpme_> noblock: in dir sunxi-mali-98727ac8ce6953518753477591ecdf11983ea38c/r9p0/src/devicedrv/mali I have: mali.mod.o
<warpme_> mali.o
<noblock> For instance, all the hardware definition are inside the file: sunxi.c
<noblock> The file must be compiled, and modinfo will display the aliases list.
<warpme_> regarding sunxi.c compilation: where I should see it’s .o file from compilation?
<noblock> here: r9p0/src/devicedrv/mali/platform/sunxi/sunxi.o
<noblock> Here is the modinfo of a working S905W mali.ko:
<noblock> filename: mali.ko
<noblock> version: r9p0-01rel0-c552eea
<noblock> srcversion: 67FD3299C9C84EEAE007524
<noblock> license: GPL
<noblock> author: ARM Ltd.
<noblock> alias: of:N*T*Camlogic,meson-gxl-maliC*
<noblock> alias: of:N*T*Camlogic,meson-gxl-mali
<noblock> alias: of:N*T*Camlogic,meson-gxbb-maliC*
<noblock> alias: of:N*T*Camlogic,meson-gxbb-mali
<noblock> alias: of:N*T*Callwinner,sun50i-h5-maliC*
<noblock> alias: of:N*T*Callwinner,sun50i-h5-mali
<noblock> alias: of:N*T*Callwinner,sun8i-h3-maliC*
<noblock> alias: of:N*T*Callwinner,sun8i-h3-mali
<noblock> alias: of:N*T*Callwinner,sun7i-a20-maliC*
<warpme_> right. there is NO such file. So q is why Makefile is not compiling this file?
<noblock> You should try with build.sh
<warpme_> it looks like issue is within Makefile as compilation log has NOT any lines with sunxi.c compilation. What component invokes sunxi.c compilation?
<narmstrong> warpme_: why are you using the Makefile ? The build.sh script sets all the useful options
<noblock> The file is set by PLATFORM=
<narmstrong> So please use the script as noblock says for like 1hour
lissyx has quit [Ping timeout: 252 seconds]
<warpme_> right. I’m building with make + params and probably issue is here. let me look on this....
Darkmatter66 has joined #linux-amlogic
<Darkmatter66> Hi, Is the nand driver in mainline usable ? I see that the driver is merged but none of the dts is using it !
jakogut has joined #linux-amlogic
Darkmatter66 has quit [Remote host closed the connection]
afaerber has quit [Quit: Leaving]
Darkmatter66 has joined #linux-amlogic
trem has joined #linux-amlogic
random_yanek has quit [Read error: Connection reset by peer]
random_yanek has joined #linux-amlogic
vagrantc has joined #linux-amlogic
<narmstrong> Darkmatter66: it seems it’s usable on gxbb/GXL/GXL with xdarklight patches for non-AXG platforms
<Darkmatter66> narmstrong, nice, looking forward to try it out.
<Darkmatter66> narmstrong, any news on the vdec driver licensing issue ?
afaerber has joined #linux-amlogic
<narmstrong> Darkmatter66: nop no news yet
sputnik_ has joined #linux-amlogic
<warpme_> narmstrong: good. now mali.ko builds and loads ok. dmegs looks like this: https://paste.ofcode.org/pzzpq4gMFbxNw77bnXZiCU
<warpme_> may You pls confirm me all looks good?
Barada has joined #linux-amlogic
Darkmatter66 has quit [Remote host closed the connection]
<narmstrong> Looks much better !
<warpme_> perfect!. May You pls advice what will be best libmali.so ver. to use with Qt on EGLFS. maybe https://github.com/superna9999/amlogic-meson-mali/tree/buildroot-openlinux-201901-fixup/lib/arm64/m450/r7p0/fbdev ?
<narmstrong> For elgfs you need the dummy variant
<narmstrong> But the wayland one will also work
<warpme_> ah perfect. infact my future plan is to go with wayland - but now I want to get anything working and probably eglfs is easiest… :-p
<warpme_> regarding includes (as I need to build qt): will copy all of https://github.com/superna9999/amlogic-meson-mali/tree/buildroot-openlinux-201901-fixup/include be enough or rather I need to do some „rename+move” of some .h files (for dummy variant)?
noblock has quit [Quit: Leaving]
<narmstrong> If you go with wayland, use the hikey binary ARM distributes, the amlogic wayland binary is broken
<narmstrong> You need to copy the egl files from the dummy directory into the EGL dir
<warpme_> qll. That was my suspect :-)
Elpaulo has joined #linux-amlogic
<warpme_> hmm: qt5.12 configure reports: QPA backends:
<warpme_> DirectFB ............................... no
<warpme_> EGLFS .................................. yes
<warpme_> EGLFS details:
<warpme_> EGLFS OpenWFD ........................ no
<warpme_> EGLFS i.Mx6 .......................... no
<warpme_> EGLFS i.Mx6 Wayland .................. no
<warpme_> EGLFS RCAR ........................... no
<warpme_> EGLFS EGLDevice ...................... no
<warpme_> EGLFS GBM ............................ no
<warpme_> EGLFS VSP2 ........................... no
<warpme_> EGLFS Mali ........................... no
<warpme_> EGLFS Raspberry Pi ................... no
<warpme_> EGL on X11 ........................... no
<warpme_> LinuxFB ................................ yes
<warpme_> VNC .................................... yes
<warpme_> Mir client ............................. no
<warpme_> I see EGLFS .................................. yes, but EGLFS Mali ........................... no is this becaue I’m going with „dummy”?
<warpme_> ok. I switched to fbdev. now I have EGLFS Mali ........................... yes. Lets try build qt and see…..
warpme_ has quit [Quit: warpme_]
trem has quit [Quit: Leaving]
vagrantc has quit [Quit: leaving]