On Thu, Mar 28, 2019 at 9:59 AM <[email protected]> wrote: > > Hi Robert, > > I test your script with kmscube, qt5 qml and with my custom cape with dts > file (available on attached file). > I share with you all my results (sorry it's a long post...) > > Commands execute on start > #uname -r > 4.9.78-ti-r94 > #apt update > #cd /opt/scripts/tools/ > #git pull > #./update_kernel.sh --ti-channel --lts-4_14 --sgx > ... > The following NEW packages will be installed: > linux-image-4.14.108-ti-r101 > ... > The following NEW packages will be installed: > libpruio-modules-4.14.108-ti-r101 > ... > The following NEW packages will be installed: > ti-sgx-ti335x-modules-4.14.108-ti-r101 > ... > The following NEW packages will be installed: > ti-libgbm2 ti-sgx-ti33x-ddk-um > ... > #reboot > #uname -r > 4.14.108-ti-r101 > > > > > With HDMI and KMSCUBE > root@beaglebone ~ #ls /sys/devices/platform/ocp/56000000.sgx > ls: cannot access '/sys/devices/platform/ocp/56000000.sgx': No such file or > directory > root@beaglebone ~ # /etc/init.d/ti-sgx-ti33x-ddk-um start > [ ok ] Starting ti-sgx-ti33x-ddk-um (via systemctl): > ti-sgx-ti33x-ddk-um.service. > root@beaglebone ~ # dmesg |grep -i pvr > [ 317.740779] pvrsrvkm: loading out-of-tree module taints kernel. > root@beaglebone ~ # service ti-sgx-ti33x-ddk-um status > ● ti-sgx-ti33x-ddk-um.service - LSB: Start daemon at boot time > Loaded: loaded (/etc/init.d/ti-sgx-ti33x-ddk-um; generated; vendor preset: > enabled) > Active: active (exited) since Thu 2019-03-28 14:27:45 CET; 9min ago > Docs: man:systemd-sysv-generator(8) > Process: 314 ExecStart=/etc/init.d/ti-sgx-ti33x-ddk-um start (code=exited, > status=0/SUCCESS) > Tasks: 0 (limit: 4915) > CGroup: /system.slice/ti-sgx-ti33x-ddk-um.service > > Mar 28 14:27:42 beaglebone systemd[1]: Starting LSB: Start daemon at boot > time... > Mar 28 14:27:45 beaglebone systemd[1]: Started LSB: Start daemon at boot time. > > > hum I haven't access to sgx drivers. I check my uEnv.txt file, and I comment > "dtb=am335x-boneblack-overlay.dtb" line (why I have this line? idk..) > ls /sys/devices/platform/ocp/56000000.sgx > driver driver_override drm modalias of_node power subsystem uevent > dmesg |grep -i pvr > [ 12.544964] pvrsrvkm: loading out-of-tree module taints kernel. > [ 12.754997] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.sgx > on minor 2 > [ 12.939720] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ] > > Ok good! Your /etc/init.d/ti-sgx-ti33x-ddk-um script work fine now. > > So to really test the SGX drivers, I run OGLES2Water from > git://git.ti.com/graphics/img-pvr-sdk.git and it execute fine! Perfect! > > I did not find a package with kms++ or kmscube, so I took my package directly. > root@beaglebone /opt # wget https://remi.avignon.me/bbb/kmsxx_1.0.0_armhf.deb > root@beaglebone /opt # dpkg -i kmsxx_1.0.0_armhf.deb > root@beaglebone /opt # kmscube > drmModeGetResources failed: Invalid argument > failed to initialize DRM > > root@beaglebone /opt # ls -alh /sys/class/drm/ > total 0 > drwxr-xr-x 2 root root 0 Mar 28 15:01 . > drwxr-xr-x 63 root root 0 Mar 28 14:52 .. > lrwxrwxrwx 1 root root 0 Mar 28 14:52 card0 -> > ../../devices/platform/vgem/drm/card0 > lrwxrwxrwx 1 root root 0 Mar 28 14:52 card1 -> > ../../devices/platform/ocp/4830e000.lcdc/drm/card1 > lrwxrwxrwx 1 root root 0 Mar 28 14:52 card1-HDMI-A-1 -> > ../../devices/platform/ocp/4830e000.lcdc/drm/card1/card1-HDMI-A-1 > lrwxrwxrwx 1 root root 0 Mar 28 14:53 card2 -> > ../../devices/platform/ocp/56000000.sgx/drm/card2 > lrwxrwxrwx 1 root root 0 Mar 28 14:53 renderD128 -> > ../../devices/platform/ocp/56000000.sgx/drm/renderD128 > -r--r--r-- 1 root root 4.0K Mar 28 14:52 version > > root@beaglebone /opt # kmscube -d /dev/dri/card1 > ### Display [0]: CRTC = 28, Connector = 30, format = 0x36314752 > Mode chosen [1024x768] : Clock => 78750, Vertical refresh => 75, Type > => 64 > Horizontal => 1024, 1040, 1136, 1312, 0 > Vertical => 768, 769, 772, 800, 0 > ### Primary display => ConnectorId = 30, Resolution = 1024x768 > loaded module : gbm_pvr.so > found valid GBM backend : gbm_pvr.so > failed to initialize > failed to initialize EGL > > root@beaglebone /opt # apt remove libgbm-dev libgbm1 > Reading package lists... Done > Building dependency tree > Reading state information... Done > Package 'libgbm-dev' is not installed, so not removed > The following packages were automatically installed and are no longer > required: > gconf-service gconf2 gconf2-common gksu keyboard-configuration > libdbus-glib-1-2 libdrm-armada2 libetnaviv libevde > libgksu2-0 libgles2 libgles2-mesa libgnome-keyring-common libgnome-keyring0 > libgtop-2.0-10 libgtop2-common libinp > libstartup-notification0 libutf8proc2 libwacom-bin libwacom-common > libwacom2 libxcb-icccm4 libxcb-image0 libxcb-k > libxkbcommon-x11-0 lxmenu-data oxygen-icon-theme pcmanfm-qt-l10n > qterminal-l10n qtermwidget5-data xserver-xorg-le > Use 'apt autoremove' to remove them. > The following additional packages will be installed: > libwayland-egl1 xserver-common > The following packages will be REMOVED: > libegl-mesa0 libegl1 libegl1-mesa libfm-qt3 libgbm1 libqt5gui5 > libqt5multimedia5 libqt5multimediawidgets5 libqt5o > pcmanfm-qt qt5-gtk-platformtheme qterminal xserver-xorg xserver-xorg-core > xserver-xorg-input-all xserver-xorg-inp > xserver-xorg-video-armada-etnaviv xserver-xorg-video-fbdev > xserver-xorg-video-omap > The following NEW packages will be installed: > libwayland-egl1 > The following packages will be upgraded: > xserver-common > 1 upgraded, 1 newly installed, 28 to remove and 188 not upgraded. > Need to get 2,067 kB of archives. > After this operation, 21.2 MB disk space will be freed. > Do you want to continue? [Y/n] y > > root@beaglebone /opt # kmscube -d /dev/dri/card1 > ### Display [0]: CRTC = 28, Connector = 30, format = 0x36314752 > Mode chosen [1024x768] : Clock => 78750, Vertical refresh => 75, Type > => 64 > Horizontal => 1024, 1040, 1136, 1312, 0 > Vertical => 768, 769, 772, 800, 0 > ### Primary display => ConnectorId = 30, Resolution = 1024x768 > loaded module : gbm_pvr.so > found valid GBM backend : gbm_pvr.so > Using display 0x1 with EGL version 1.4 > EGL Version "1.4 build 1.14@3699939 (MAIN)" > EGL Vendor "Imagination Technologies" > EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base > EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image > EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image > EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process > EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync > EGL_KHR_create_context EGL_WL_bind_wayland_display > EGL_EXT_image_dma_buf_import" > > > But on my HDMI monitor I don't see a 3D cube but just a verticals blue > lines!! It's strange... > I recompile kmscube but I need libgbm-dev package ^^'...
That is strange, i never had libgbm-dev installed and got kmscube to work.. > root@beaglebone /opt/kmscube # apt autoremove > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following packages will be REMOVED: > gconf-service gconf2 gconf2-common gksu keyboard-configuration > libdbus-glib-1-2 libdrm-armada2 libetnaviv > libevdev2 libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules > libfm-qt-l10n libfm4 libgbm1 > libgconf-2-4 libgksu2-0 libgles2 libgles2-mesa libgnome-keyring-common > libgnome-keyring0 libgtop-2.0-10 > libgtop2-common libinput-bin libinput10 libmenu-cache-bin libmenu-cache3 > libmtdev1 libpciaccess0 libqt5dbus5 > libqt5network5 libstartup-notification0 libutf8proc2 libwacom-bin > libwacom-common libwacom2 libxcb-icccm4 > libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 > libxcb-util0 libxcb-xinerama0 libxcb-xkb1 > libxfont2 libxkbcommon-x11-0 lxmenu-data oxygen-icon-theme pcmanfm-qt-l10n > qterminal-l10n qtermwidget5-data > xserver-xorg-legacy > 0 upgraded, 0 newly installed, 54 to remove and 182 not upgraded. > After this operation, 61.0 MB disk space will be freed. > Do you want to continue? [Y/n] y > ... > > root@beaglebone ~ # kmscube -d /dev/dri/card1 > kmscube: error while loading shared libraries: libgbm.so.1: cannot open > shared object file: No such file or directory > > root@beaglebone ~ # ln -s /usr/lib/libgbm.so.2.0.0 /usr/lib/libgbm.so.1 Wonder if i should just auto-create that symlink to... > > root@beaglebone ~ # kmscube -d /dev/dri/card1 > ### Display [0]: CRTC = 28, Connector = 30, format = 0x36314752 > Mode chosen [1024x768] : Clock => 78750, Vertical refresh => 75, Type > => 64 > Horizontal => 1024, 1040, 1136, 1312, 0 > Vertical => 768, 769, 772, 800, 0 > ### Primary display => ConnectorId = 30, Resolution = 1024x768 > loaded module : gbm_pvr.so > found valid GBM backend : gbm_pvr.so > Using display 0x1 with EGL version 1.4 > EGL Version "1.4 build 1.14@3699939 (MAIN)" > EGL Vendor "Imagination Technologies" > EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base > EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image > EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image > EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process > EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync > EGL_KHR_create_context EGL_WL_bind_wayland_display > EGL_EXT_image_dma_buf_import" > ^CHandling signal number = 2 > Cleanup of GL, GBM and DRM completed > > Yeah now I can see the 3D cube in rotation! > > > > With HMDI and Qt QML with EGLFS > Unfortunately, if we use we ti-sgx-common-ddk-um package's, we will have > conflicts with libegl1-mesa-dev and libgles2-mesa-dev packages and the > libgbm1 package will be reinstall... > > #apt install libqt5qml5 qml-module-qtquick-controls qt5-default > qtdeclarative5-dev qtquickcontrols5-examples > ... > dpkg: error processing archive > /tmp/apt-dpkg-install-CHuAeE/57-libegl1-mesa-dev_18.1.9-1rcnee1~stretch+20190321_armhf.deb > (--unpack): > trying to overwrite '/usr/include/EGL/egl.h', which is also in package > ti-sgx-common-ddk-um 1.14.3699939-git20171201.0-0rcnee8~stretch+20190326 > Selecting previously unselected package libgles2-mesa-dev:armhf. > Preparing to unpack > .../58-libgles2-mesa-dev_18.1.9-1rcnee1~stretch+20190321_armhf.deb ... > Unpacking libgles2-mesa-dev:armhf (18.1.9-1rcnee1~stretch+20190321) ... > dpkg: error processing archive > /tmp/apt-dpkg-install-CHuAeE/58-libgles2-mesa-dev_18.1.9-1rcnee1~stretch+20190321_armhf.deb > (--unpack): > trying to overwrite '/usr/include/GLES2/gl2.h', which is also in package > ti-sgx-common-ddk-um 1.14.3699939-git20171201.0-0rcnee8~stretch+20190326 > dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Ah crap, so the reason i split those files into a 2nd common package was to fix that possibility.. Fixed with: https://github.com/rcn-ee/repos/commit/25a4d0892b99a0526adc683f0f34b767cb6b193e > ... > You might want to run 'apt --fix-broken install' to correct these. > The following packages have unmet dependencies: > qtbase5-dev : Depends: libgles2-mesa-dev but it is not going to be installed > or > libgles2-dev but it is not installable > E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or > specify a solution). > > $sudo apt --fix-broken install > Reading package lists... Done > Building dependency tree > Reading state information... Done > Correcting dependencies... Done > The following additional packages will be installed: > libegl1-mesa-dev libgles2-mesa-dev > The following NEW packages will be installed: > libegl1-mesa-dev libgles2-mesa-dev > 0 upgraded, 2 newly installed, 0 to remove and 175 not upgraded. > 78 not fully installed or removed. > Need to get 140 kB of archives. > After this operation, 811 kB of additional disk space will be used. > Do you want to continue? [Y/n] y > Get:1 http://repos.rcn-ee.com/debian stretch/main armhf libegl1-mesa-dev > armhf 18.1.9-1rcnee1~stretch+20190321 [59.7 kB] > Get:2 http://repos.rcn-ee.com/debian stretch/main armhf libgles2-mesa-dev > armhf 18.1.9-1rcnee1~stretch+20190321 [80.7 kB] > Fetched 140 kB in 0s (174 kB/s) > E: Sub-process /usr/bin/dpkg returned an error code (1) > > > But it's not a problem to compile and execute a Qt program : > cd /usr/lib/arm-linux-gnueabihf/qt5/examples/quickcontrols/extras/dashboard > qmake > make > export QT_QPA_PLATFORM=eglfs > export QT_QPA_EGLFS_INTEGRATION=none > ./dashboard > > Okay we can see the dashboard program on the monitor! > > > LVDS with my custom cape > > My custom cape work fine on 4.9 kernel. I can compile my dts file to dtbo on > 4.14 but I have a "Unable to handle kernel NULL pointer dereference at > virtual address" error on boot. > $sudo dtc -O dtb -o /lib/firmware/CAPE-LVDS-1024-00A0.dtbo -b 0 -@ > CAPE-LVDS-1024-00A0.dts > $sudo echo 'CAPE=CAPE-LVDS-1024' > /etc/default/capemgr > $sudo reboot So kernel "overlays" are broken, upgrade your version of u-boot and add this define in /boot/uEnv.txt sudo /opt/scripts/tools/developers/update_bootloader.sh enable_uboot_overlays=1 uboot_overlay_addr4=/lib/firmware/CAPE-LVDS-1024-00A0.dtbo disable_uboot_overlay_video=1 Then reboot and run: sudo /opt/scripts/tools/version.sh to see if everything is happy.. > My dts file dates from the old school, I created it for the first debian > version (3.8.13-bone50) and I adapted it for kernel 4.4 and 4.9. > I think I have to use the new way for kernel 1.14. This problem has nothing > to do with SGX. > > I hope that my tests will be useful to you to continue the integration of the > libraries to use the graphic acceleration. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYj0G4Oi_7j%3DCJwzfHVdNRsGBc5GO3Lqew3JJAoKbSK0fQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
