[Openpvrsgx-devgroup] Current Status linux_openpvrsgx

H. Nikolaus Schaller hns at goldelico.com
Thu Apr 9 07:34:44 CEST 2020


Hi Philip,

> Am 08.04.2020 um 16:15 schrieb Philipp Rossak <embed3d at gmail.com>:
> 
> Hi Nikolaus,
> I got again some progress with my system but i got the following issues:
> 
> based on the branch letux-pvrsrvkm-v5.6.0-rc2 / letux-pvrsrvkm I get the following error when starting the userspace application:
> 
> root at busterarmhf:~# pvrsrvctl --no-module --start
> [   41.715679] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]

That is a very good sign!

> [   41.726745] PVR_K:(Error): GetHandleStructure: Handle index out of range (404 >= 256)
> [   41.734589] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)

I remember that I have seen such messages. It may have something to do with incompatible data type definitions (header files for byte swapping?).

What you also could try is to strace pvrsrvctl. This might give some hint which system call is responsible.

> [   41.741680] PVR_K:(Error): GetHandleStructure: Handle index out of range (29255 >= 256)
> [   41.749717] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.756786] PVR_K:(Error): SGXDevInitPart2BW: Failed to look up HWPerf meminfo (possibly due to SUPPORT_SGX_HWPERF option mismatch)
> [   41.768629] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   41.776489] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.783536] PVR_K:(Error): GetHandleStructure: Handle index out of range (29279 >= 256)
> [   41.791557] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.798624] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   41.806552] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.813597] PVR_K:(Error): GetHandleStructure: Handle index out of range (29283 >= 256)
> [   41.821616] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.828678] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   41.836520] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.843565] PVR_K:(Error): GetHandleStructure: Handle index out of range (29335 >= 256)
> [   41.851578] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.858640] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   41.866570] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.873616] PVR_K:(Error): GetHandleStructure: Handle index out of range (29339 >= 256)
> [   41.881632] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.888692] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   41.896533] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.903577] PVR_K:(Error): GetHandleStructure: Handle index out of range (29379 >= 256)
> [   41.911591] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.918654] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   41.926583] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.933626] PVR_K:(Error): GetHandleStructure: Handle index out of range (29767 >= 256)
> [   41.941643] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.948708] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   41.956548] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.963595] PVR_K:(Error): GetHandleStructure: Handle index out of range (29779 >= 256)
> [   41.971610] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.978673] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   41.986598] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   41.993645] PVR_K:(Error): GetHandleStructure: Handle index out of range (29783 >= 256)
> [   42.001664] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.008725] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   42.016566] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.023611] PVR_K:(Error): GetHandleStructure: Handle index out of range (29835 >= 256)
> [   42.031624] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.038685] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   42.046613] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.053658] PVR_K:(Error): GetHandleStructure: Handle index out of range (29839 >= 256)
> [   42.061672] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.068733] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   42.076601] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.083654] PVR_K:(Error): GetHandleStructure: Handle index out of range (29863 >= 256)
> [   42.091677] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.098753] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   42.106678] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.113726] PVR_K:(Error): GetHandleStructure: Handle index out of range (29867 >= 256)
> [   42.121747] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.128815] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)
> [   42.136660] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.143705] PVR_K:(Error): GetHandleStructure: Handle index out of range (29903 >= 256)
> [   42.151720] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.158785] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)
> [   42.166711] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.173760] PVR_K:(Error): GetHandleStructure: Handle index out of range (29907 >= 256)
> [   42.181778] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)
> [   42.188838] PVR_K:(Error): SGXDevInitPart2BW: A handle lookup failed
> PVR:(Error): Srv[   42.195539] PVR_K:(Error): BridgedDispatchKM: Initialisation failed.  Driver unusable.
> Init: Initialisation for device of class 0, type 7, index 0, failed (132) [0, ]
> PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086862 (strerror returns no value.). [0, ]
> pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT2_PHASE_FAILED)
> 
> 
> When I'm using my rebased branch get the following:
> 
> root at busterarmhf:~# pvrsrvctl --no-module --start
> [  653.025813] PVR_K:(Error): BridgedDispatchKM: Initialisation failed.  Driver unusable.
> PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086861 (strerror returns no value.). [0, ]
> PVR:(Error): OpenServices: PVRSRVBridgeCall failed. [0, ]

Oops. I also remember having seen such, but I think it was only for old DDK 1.9 setups.

Here again, strace may give more insights. What also could be is that your rebased config or Makefile differs and therefore the kernel module is missing some component?

One more thing: if you have a patch for the DTS setup of the a83 I could already include it for next week and my attempt to get these things upstream.

BR,
Nikolaus


> PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]
> PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]
> pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)
> 
> 
> Do you have any idea whats wrong or what I am missing in the rc2 branch?
> 
> I think I messed someting up in my rebase branch. So I will wait until you rebased it next week.
> 
> Am Mo., 6. Apr. 2020 um 19:32 Uhr schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> > Am 06.04.2020 um 18:38 schrieb Philipp Rossak <embed3d at gmail.com>:
> > 
> > Hey Nikolaus,
> > 
> > this time I'm not too stupid, to click the wrong Reply button. ;)
> > 
> > I got some good progress with the sun8i-a83t chip. The kernel module is loading and based on Jonathan's work.
> 
> Wow!
> 
> > Right now I'm struggling with the current linux version that we are using as basis for our development. Currently there is a bug in the network system that already got fixed in v5.6. I will create a branch based on the v5.6 mainline kernel and patch our work on to this branch. I will call it pvrsrvkm-v5.6.
> 
> Well, I had rebased and pushed the code automatically every week but Tony ran into problems with this model so I now only rebase for every -rc1. If you can wait until Monday, I'll have a 5.7-rc1 based version which should include the networking fixes. But may include new ones...
> Oh already too late... 
> > 
> > Right now the revision of the sun8i-a83t is wrong. When I read out the register $(gpu_base) + 0x24 on my legacy reference linux, I get the following:
> > 
> > pi at bananapi:~$ sudo ./devmem2 0x01C40024
> > /dev/mem opened.
> > Memory mapped at address 0xb6f3e000.
> > Value at address 0x1C40024 (0xb6f3e024): 0x10105
> 
> Good to know!
> 
> > So here we have the SGX revision 01.01.05 --> 115.
> 
> That is interesting. I have not yet seen a 115 revision.
> 
> > Can you please correct this in your patch set for mainline?
> 
> Yes, sure.
> 
> > 
> > One interesting fact about my bananapi-m3:
> > I might be able to use dvfs on my gpu since I have a separate dcdc regulator for the gpu. But for now I will keep the clocks and voltage fixed.
> 
> Yes, let's start in small steps :)
> 
> BR and thanks,
> Nikolaus
> 
> Cheers
> Philipp



More information about the openpvrsgx-devgroup mailing list