[Openpvrsgx-devgroup] [PATCH] staging: pvr: Add a simplified pvr-drv.c as replacement for messy pvr_drm.c

H. Nikolaus Schaller hns at goldelico.com
Sat Nov 9 17:40:43 CET 2019

Hi Tony,

> Am 09.11.2019 um 17:25 schrieb Tony Lindgren <tony at atomide.com>:
> * Merlijn Wajer <merlijn at wizzup.org> [191109 00:12]:
>> Hi, (CC parazyd for the deb pkg info)
>> On 09/11/2019 09:07, H. Nikolaus Schaller wrote:
>>> Hi Tony,
>>>> Yeah we should be able to drop that too. And anything
>>>> else related to a typical Linux driver.
>>>> BTW, I still have had no luck with seeing the demos working..
>>>> Trying with am335x or am437x (after patching it) I get
>>>> these kind of errors when trying to run the demos after
>>>> running pvrsrvctl --start --no-module:
>>>> libEGL warning: DRI2: xcb_connect failed
>>>> ...
>>>> Any idea what I might be missing?
>>> Well, there is something wrong with X11 (xcb) user space (I use Debian Stretch 9.9). I have to uninstall it.
>>> According to my analyses the problem is libx11-xcb1 which becomes installed by either of
>>> libegl1-mesa
>>> libegl1-mesa-drivers
>>> libwayland-egl1-mesa
>>> and they also seem to depend on each other so that you can't easily uninstall one of them.
>>> So it is a little difficult to get rid of this flu :)
>> Something like this might help:
>> https://github.com/maemo-leste/ti-omap3-sgx/blob/master/debian/control
>> By specifying all the conflicts in this way, you will force the mesa
>> packages to be uninstalled. It took us a while to get this right for
>> Devuan Ascii (Debian Stretch).
>> I'm not sure how easily you can use this file directly, but just wanted
>> to quickly indicate we've been through this and (I think) solved this
>> problem. We could potentially host more of these packages in the Leste
>> repo (some pvr component), if you'd like.
> Well so I did this manually:
> # apt-get remove libegl1-mesa libegl1-mesa-drivers libwayland-egl1-mesa
> And that got rid of the xcb_connect errors thanks.


> Then additionally omapdrm or tilcd needs to be enabled and
> looks like it needs to be done in the right order so the
> /dev/dri instances are 0 and 1, and not 0 and 2 or 1 and 2
> if modules are removed and probed multiple times.. What a
> flakey pile

Ok, good to know... Maybe this is the problem why I sometimes
have the BBB working and sometimes not?

Next time I am doing tests or see it not work, I'll look for it.

> Now I get this trying to run the gles1test1 on am437x-sk-evm
> after patching it to probe:
> PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]


> ...
> PVR:(Error): PVRPMapKMem: mmap(2) failed: Mapping handle=0xf: Tc [0, ]
> PVR:(Error): LoadOGLES2AndGetFunctions: Wrong version. Got: 2, Expected 3 [0, ]
> 'eglCreateContext' returned egl error 'EGL_NOT_INITIALIZED' (0x3001)
> And I guess these related to this in dmesg:
> PVR_K:(Error): DoMapToUser: Error - vmf_insert_mixed failed (100)

Well this is quite similar to the best what I could get so far for the
not-officially supported devices. DM3730 says:

root at letux:~# pvrsrvctl --start --no-module
[   60.455566] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
root at letux:~# gles1test1 
[   71.083831] DoMapToUser: pfn=0004804a vmf_insert_mixed(vma=de2b8900, addr=b6f01000, pfn_t=4804a)  ret=00000100
[   71.094757] PVR_K:(Error): DoMapToUser: Error - vmf_insert_mixed failed (100)
PVR:(Error): PVRPMapKMem: mmap(2) failed: Mapping handle=0xf: Tg,P [0, ]
PVR:(Error): WSEGL_InitialiseDisplay: Failed to open primary device: No such file or directory [0, ]
'eglInitialize' returned egl error 'EGL_NOT_INITIALIZED' (0x3001)
root at letux:~# 

BTW: I also see the vmf_insert_mixed failed on the am335x once even if
the gles1test1 is still working.

And the Mapping handle=0xf: Tc [0, ] sometimes prints chinese characters
which indicate a dangling string pointer for "%s".

All this indicates that the user-space seems to make some assumption
about the kernel which may be wrong.


More information about the openpvrsgx-devgroup mailing list