Dear Matthijs van Duin,

I follow your very good tutorial!
I want to successfully run kmscube too but I have one error.
That's why I allow myself to write to you to find the reason and to help 
other people in the same case as me and I share my experience.
I use this kernel of debian: 4.9.78-ti-r94

I patched my kernel like you said here :
So, I have */sys/devices/platform/ocp/56000000.sgx* it's perfect.


I generated my dtbo file with the old step like :
root@beaglebone ~ #dtc -O dtb -o /lib/firmware/CAPE-LVDS-1024-00A0.dtbo -b 
0 -@ CAPE-LVDS-1024-00A0.dts
root@beaglebone ~ #echo "CAPE=CAPE=CAPE-LVDS-1024" > /etc/default/capemgr
root@beaglebone ~ #reboot


If I run "/usr/bin/pvrsrvctl --start --no-module", I have a kernel 
exception on linux:
[   69.719666] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
[   69.740399] Unhandled fault*: external abort on non-linefetch (0x1008) 
at 0xe0430ca8*
[   69.748119] *pgd = db488000*
[   69.750837] *[e0430ca8] *pgd=9b7e6811, *pte=56000653, *ppte=56000453*
[   69.757172] Internal error: : 1008 [#1] PREEMPT SMP ARM
[   69.762423] Modules linked in: joydev pvrsrvkm(O) hid_multitouch evdev 
uio_pdrv_genirq uio usb_f_mass_storage usb_f_acm u_serial usb_f_ecm 
usb_f_rndis u_ether libcomposite iptable_nat nf_conntrack_ipv4 
nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle 
iptable_filter spidev pru_rproc pruss_intc pruss tieqep ip_tables x_tables
[   69.792588] CPU: 0 PID: 906 Comm: pvrsrvctl Tainted: G           O    
4.9.78-ti-r94 #1
[   69.800538] Hardware name: Generic AM33XX (Flattened Device Tree)
[   69.806657] task: dc4767c0 task.stack: daf74000
[   69.811498] PC is at PollForValueKM+0x18/0x11c [pvrsrvkm]
[   69.817001] LR is at SGXResetInvalDC.constprop.1+0x74/0xa0 [pvrsrvkm]
[   69.823470] pc : [<bf12e54c>]    lr : [<bf1410e4>]    psr: 60070013
               sp : daf75a88  ip : daf75ad0  fp : daf75acc
[   69.834998] r10: daf75e2c  r9 : daf75c84  r8 : 00000000
[   69.840244] r7 : e0555140  r6 : bf156e30  r5 : 00000000  r4 : daf3f000
[   69.846800] r3 : 000f4240  r2 : 000000ff  r1 : 00000000  r0 : e0430ca8
[   69.853357] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment 
none
[   69.860522] Control: 10c5387d  Table: 9b488019  DAC: 00000051
[   69.866292] Process pvrsrvctl (pid: 906, stack limit = 0xdaf74218)
...

So I have remove this part on my CAPE-LVDS-1024-00A0.dts:
mylvds4 {
target = <&sgx>;
__overlay__ {
status = "okay";
};
};

And I use a HDMI screen for the tests with default /boot/uEnv.txt file.

I build https://github.com/mvduin/omap5-sgx-ddk-linux  with 
*ti-img-sgx/1.14.3699939/k4.9* branch.
That work but I haven't bc_example module (may be it's not important 
module).

I used your configuration for powervr.ini file config:
root@beaglebone /opt/kms/kmsxx/build/bin # cat /etc/powervr.ini
[default]
WindowSystem=libpvrDRMWSEGL.so
DefaultPixelFormat=RGB565


If I used /usr/lib/arm-linux-gnueabihf/libgbm.so.1.0.0, I have this error:
root@beaglebone# /usr/bin/pvrsrvctl --start --no-module
PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]


So I used your libgbm.so on /usr/local/lib/libgbm.so.1.0.0.
The command "*/usr/bin/pvrsrvctl --start --no-module*" start perfectly
PS : I have found th libgmb.so.2.0.0 from Ti git, it's work fine too 
: https://git.ti.com/glsdk/libgbm
( git clone git://git.ti.com/glsdk/libgbm.git )


root@beaglebone /opt/kms/kmsxx/build/bin # dmesg |grep -i PVR
[   20.675978] pvrsrvkm: loading out-of-tree module taints kernel.
[   20.975742] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
[  395.355242] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
Yeahh all is done here!

Now I compile your kmscube, and When I execute it I have this error:
root@beaglebone / # kmscube
trying to load module tilcdc...success.
### Display [0]: CRTC = 24, Connector = 26
       Mode chosen [1024x768] : Clock => 65000, Vertical refresh => 60, 
Type => 72
       Horizontal => 1024, 1048, 1184, 1344, 0
       Vertical => 768, 771, 777, 806, 0
### Primary display => ConnectorId = 26, Resolution = 1024x768
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
*failed to initialize*
*failed to initialize EGL*



Hum... I haven't the good drivers of EGL. So like for libgbm.so , I change 
that:
root@beaglebone ~ # ldd /usr/local/bin/kmscube
       linux-vdso.so.1 (0xbed11000)
       libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e56000)
       libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0xb6e3a000)
       libgbm.so.2 => /usr/local/lib/libgbm.so.2 (0xb6e27000)
       *libEGL.so.1 => **/usr/lib/arm-linux-gnueabihf/**libEGL.so.1* 
(0xb6e15000)
       libIMGegl.so.1 => /usr/lib/libIMGegl.so.1 (0xb6df0000)
       libdrm_omap.so.1 => /usr/lib/arm-linux-gnueabihf/libdrm_omap.so.1 
(0xb6ddd000)
       *libGLESv2.so.2 => /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2* 
(0xb6dbf000)
       libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xb6d88000)
       libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6c9a000)
       /lib/ld-linux-armhf.so.3 (0xb6ef1000)
       libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0xb6c83000)
       libwayland-server.so.0 => 
/usr/lib/arm-linux-gnueabihf/libwayland-server.so.0 (0xb6c68000)
       libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb6c52000)
       libdbm.so.1 => /usr/lib/libdbm.so.1 (0xb6c40000)
       libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 
(0xb6c1c000)
       libGLdispatch.so.0 => 
/usr/lib/arm-linux-gnueabihf/libGLdispatch.so.0 (0xb6b9e000)
       libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6b8b000)
       librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6b75000)
       libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6b4c000)

to:

root@beaglebone /opt/kms/kmsxx/build/bin # ldd /usr/local/bin/kmscube
       linux-vdso.so.1 (0xbeb72000)
       libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6edc000)
       libdrm.so.2 => /usr/lib/arm-linux-gnueabihf/libdrm.so.2 (0xb6ec0000)
       libgbm.so.2 => /usr/local/lib/libgbm.so.2 (0xb6ead000)
       *libEGL.so.1 => /usr/lib/libEGL.so.1* (0xb6e9b000)
       libIMGegl.so.1 => /usr/lib/libIMGegl.so.1 (0xb6e76000)
       libdrm_omap.so.1 => /usr/lib/arm-linux-gnueabihf/libdrm_omap.so.1 
(0xb6e63000)
       *libGLESv2.so.2 => /usr/lib/libGLESv2.so.2* (0xb6dfb000)
       libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xb6dc4000)
       libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6cd6000)
       /lib/ld-linux-armhf.so.3 (0xb6f77000)
       libudev.so.1 => /lib/arm-linux-gnueabihf/libudev.so.1 (0xb6cbf000)
       libwayland-server.so.0 => 
/usr/lib/arm-linux-gnueabihf/libwayland-server.so.0 (0xb6ca4000)
       libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0xb6c8e000)
       libdbm.so.1 => /usr/lib/libdbm.so.1 (0xb6c7c000)
       libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 
(0xb6c58000)
       libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6c45000)
       librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6c2f000)
       libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6c06000)



And I execute again kmscube:
root@beaglebone / # kmscube
trying to load module tilcdc...success.
### Display [0]: CRTC = 24, Connector = 26
       Mode chosen [1024x768] : Clock => 65000, Vertical refresh => 60, 
Type => 72
       Horizontal => 1024, 1048, 1184, 1344, 0
       Vertical => 768, 771, 777, 806, 0
### Primary display => ConnectorId = 26, 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"
*Segmentation fault*


***Arggggg** !!!* *** *I think I'm not far from finish it, but why do I 
have this error now? Do you have an idea of ​​what I miss?

May be this command can help to solve my problem:
root@beaglebone ~ # ll /sys/class/drm
total 0
drwxr-xr-x  2 root root    0 Mar 13 16:33 .
drwxr-xr-x 59 root root    0 Mar 13 16:33 ..
lrwxrwxrwx  1 root root    0 Mar 13 16:33 card0 -> 
../../devices/platform/ocp/4830e000.lcdc/drm/card0
lrwxrwxrwx  1 root root    0 Mar 13 16:33 card0-HDMI-A-1 -> 
../../devices/platform/ocp/4830e000.lcdc/drm/card0/card0-HDMI-A-1
lrwxrwxrwx  1 root root    0 Mar 13 16:33 card1 -> 
../../devices/platform/ocp/56000000.sgx/drm/card1
lrwxrwxrwx  1 root root    0 Mar 13 16:33 controlD64 -> 
../../devices/platform/ocp/4830e000.lcdc/drm/controlD64
lrwxrwxrwx  1 root root    0 Mar 13 16:33 renderD128 -> 
../../devices/platform/ocp/56000000.sgx/drm/renderD128
-r--r--r--  1 root root 4.0K Mar 13 16:33 version

I don't understand what I miss ...

Thanks so much for any support.

Best regards,
Rémi A.

Le lundi 6 février 2017 04:49:19 UTC+1, Matthijs van Duin a écrit :
>
> On Sunday, 22 January 2017 01:12:53 UTC+1, RobertCNelson wrote:
>>
>> It's a different stack, and we don't really have TI's new userspace 
>> working yet.
>
>
> I have been able to successfully run kmscube on the new stack today!
>
> Here's the set of magic ingredients:
>
>
> https://github.com/dutchanddutch/bb-kernel/tree/am33x-v4.9/patches/drivers/ti/sgx
>  
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdutchanddutch%2Fbb-kernel%2Ftree%2Fam33x-v4.9%2Fpatches%2Fdrivers%2Fti%2Fsgx&sa=D&sntz=1&usg=AFQjCNFHQ7tFiwOMtWnaVf1mXtOQX3eaKA>
> https://github.com/mvduin/omap5-sgx-ddk-linux  (I included my build 
> script)
> https://github.com/mvduin/omap5-sgx-ddk-um-linux
> https://github.com/mvduin/libgbm
> https://github.com/mvduin/kmscube
>
> The last four repos are all clones of git.ti.com repositories with minor 
> patches applied.
>
> The key observation is that libpvrGBMWSEGL is not just a WSEGL backend but 
> also a GBM backend under the alias "gbm_pvr.so". This requires a libgbm 
> which supports backend plugins, which seems to have been removed from 
> mainline libgbm. Beware that libgbm only searches for plugins in 
> ${prefix}/lib/gbm/ so be sure to use the same prefix for libgbm as for 
> omap5-sgx-ddk-um-linux, or add appropriate symlinks.
>
> (The libraries have quite a few completely bogus dependencies, e.g. 
> libdrm_omap is of course of no use on an am335x, but it doesn't cause any 
> real issues.)
>
> I currently have this in my /etc/powervr.ini:
> [default]
> WindowSystem=libpvrDRMWSEGL.so
> DefaultPixelFormat=RGB565
>
> kmscube ignores the WindowSystem but some older apps like gles1test1 do 
> still care. I'm not sure where I picked up the DefaultPixelFormat or 
> whether it does anything useful, but if it does anything it's probably 
> desirable.
>
> Now, who's going to give Wayland a swing? :-) 
>

-- 
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/1e2a2cfb-4d0d-474c-ab5c-8d823c9ce331%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to