<div dir="ltr"><div dir="ltr"><div>Hi Nikolaus,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 9. Apr. 2020 um 07:34 Uhr schrieb H. Nikolaus Schaller <<a href="mailto:hns@goldelico.com" target="_blank">hns@goldelico.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Philip,<br>
<br>
> Am 08.04.2020 um 16:15 schrieb Philipp Rossak <<a href="mailto:embed3d@gmail.com" target="_blank">embed3d@gmail.com</a>>:<br>
> <br>
> Hi Nikolaus,<br>
> I got again some progress with my system but i got the following issues:<br>
> <br>
> based on the branch letux-pvrsrvkm-v5.6.0-rc2 / letux-pvrsrvkm I get the following error when starting the userspace application:<br>
> <br>
> root@busterarmhf:~# pvrsrvctl --no-module --start<br>
> [   41.715679] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]<br>
<br>
That is a very good sign!<br>
<br>
> [   41.726745] PVR_K:(Error): GetHandleStructure: Handle index out of range (404 >= 256)<br>
> [   41.734589] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
<br>
I remember that I have seen such messages. It may have something to do with incompatible data type definitions (header files for byte swapping?).<br>
<br>
What you also could try is to strace pvrsrvctl. This might give some hint which system call is responsible.<br></blockquote><div><br></div>I think I found out, what I messed up: I used Jonathan's work as basis, but this is a SGX 540 and not a SGX 544 Board.<br><div><br></div><div>I think I will put the 1.17 ddk support on hold for now an continue on getting the 1.14.83xxx running and clean up the code there. Afterwards I will work on the 1.17 ddk support.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> [   41.741680] PVR_K:(Error): GetHandleStructure: Handle index out of range (29255 >= 256)<br>
> [   41.749717] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.756786] PVR_K:(Error): SGXDevInitPart2BW: Failed to look up HWPerf meminfo (possibly due to SUPPORT_SGX_HWPERF option mismatch)<br>
> [   41.768629] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   41.776489] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.783536] PVR_K:(Error): GetHandleStructure: Handle index out of range (29279 >= 256)<br>
> [   41.791557] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.798624] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   41.806552] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.813597] PVR_K:(Error): GetHandleStructure: Handle index out of range (29283 >= 256)<br>
> [   41.821616] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.828678] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   41.836520] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.843565] PVR_K:(Error): GetHandleStructure: Handle index out of range (29335 >= 256)<br>
> [   41.851578] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.858640] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   41.866570] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.873616] PVR_K:(Error): GetHandleStructure: Handle index out of range (29339 >= 256)<br>
> [   41.881632] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.888692] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   41.896533] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.903577] PVR_K:(Error): GetHandleStructure: Handle index out of range (29379 >= 256)<br>
> [   41.911591] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.918654] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   41.926583] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.933626] PVR_K:(Error): GetHandleStructure: Handle index out of range (29767 >= 256)<br>
> [   41.941643] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.948708] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   41.956548] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.963595] PVR_K:(Error): GetHandleStructure: Handle index out of range (29779 >= 256)<br>
> [   41.971610] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.978673] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   41.986598] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   41.993645] PVR_K:(Error): GetHandleStructure: Handle index out of range (29783 >= 256)<br>
> [   42.001664] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.008725] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   42.016566] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.023611] PVR_K:(Error): GetHandleStructure: Handle index out of range (29835 >= 256)<br>
> [   42.031624] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.038685] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   42.046613] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.053658] PVR_K:(Error): GetHandleStructure: Handle index out of range (29839 >= 256)<br>
> [   42.061672] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.068733] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   42.076601] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.083654] PVR_K:(Error): GetHandleStructure: Handle index out of range (29863 >= 256)<br>
> [   42.091677] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.098753] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   42.106678] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.113726] PVR_K:(Error): GetHandleStructure: Handle index out of range (29867 >= 256)<br>
> [   42.121747] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.128815] PVR_K:(Error): GetHandleStructure: Handle index out of range (769 >= 256)<br>
> [   42.136660] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.143705] PVR_K:(Error): GetHandleStructure: Handle index out of range (29903 >= 256)<br>
> [   42.151720] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.158785] PVR_K:(Error): GetHandleStructure: Handle index out of range (8449 >= 256)<br>
> [   42.166711] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.173760] PVR_K:(Error): GetHandleStructure: Handle index out of range (29907 >= 256)<br>
> [   42.181778] PVR_K:(Error): PVRSRVLookupHandle: Error looking up handle (149)<br>
> [   42.188838] PVR_K:(Error): SGXDevInitPart2BW: A handle lookup failed<br>
> PVR:(Error): Srv[   42.195539] PVR_K:(Error): BridgedDispatchKM: Initialisation failed.  Driver unusable.<br>
> Init: Initialisation for device of class 0, type 7, index 0, failed (132) [0, ]<br>
> PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086862 (strerror returns no value.). [0, ]<br>
> pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT2_PHASE_FAILED)<br>
> <br>
> <br>
> When I'm using my rebased branch get the following:<br>
> <br>
> root@busterarmhf:~# pvrsrvctl --no-module --start<br>
> [  653.025813] PVR_K:(Error): BridgedDispatchKM: Initialisation failed.  Driver unusable.<br>
> PVR:(Error): PVRSRVBridgeCall: Failed to access device.  Function ID:3223086861 (strerror returns no value.). [0, ]<br>
> PVR:(Error): OpenServices: PVRSRVBridgeCall failed. [0, ]<br>
<br>
Oops. I also remember having seen such, but I think it was only for old DDK 1.9 setups.<br>
<br>
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?<br>
<br></blockquote><div><br></div><div>I think I messed something up with my rebase. Right now I'm not sure what the issue is exactly....<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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></blockquote><div><br></div><div>I'm not sure if those are ready for mainline right now since my module never enabled the clocks and the other stuff. Also the clocking on the sunxi devices is more complex than on the other devices since I have a seperate PLL, 3 GPU Clocks. Right now there is also some gating stuff missing in the mainline kernel, that are required for pvrsrvkm module. Right now I'm using there some dirty quirks to get it enabled.</div><div><br></div><div>Instead I could add a pleaceholder, with compatibles and comments for the sunxi devices, so we have it at least in the devicetree. I can get them ready tonight.<br></div><div><br></div>Cheers,</div><div class="gmail_quote">Philipp<br></div></div></div>