<div dir="ltr"><div dir="ltr"><div>Hi Nikolaus,</div><div>I got again some progress with my system but i got the following issues:</div><div><br></div><div>based on the branch <a class="gmail-branch-name gmail-css-truncate-target gmail-v-align-baseline gmail-width-fit gmail-mr-2 gmail-Details-content--shown" href="https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/tree/letux-pvrsrvkm-v5.6.0-rc2">letux-pvrsrvkm-v5.6.0-rc2</a> / <a class="gmail-branch-name gmail-css-truncate-target gmail-v-align-baseline gmail-width-fit gmail-mr-2 gmail-Details-content--shown" href="https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/tree/letux-pvrsrvkm-v5.6.0-rc2">letux-pvrsrvkm</a> I get the following error when starting the userspace application:<br></div><div><br></div><div>root@busterarmhf:~# pvrsrvctl --no-module --start<br>[ 41.715679] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]<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>[ 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)</div><div><br></div><div><br></div><div>When I'm using my rebased branch get the following:<br></div><div><br></div><div>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>PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]<br>PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]<br>pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)</div><div><br></div><div><br></div><div>Do you have any idea whats wrong or what I am missing in the rc2 branch?</div><div><br></div><div>I think I messed someting up in my rebase branch. So I will wait until you rebased it next week.<br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 6. Apr. 2020 um 19:32 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"><br>
> Am 06.04.2020 um 18:38 schrieb Philipp Rossak <<a href="mailto:embed3d@gmail.com" target="_blank">embed3d@gmail.com</a>>:<br>
> <br>
> Hey Nikolaus,<br>
> <br>
> this time I'm not too stupid, to click the wrong Reply button. ;)<br>
> <br>
> I got some good progress with the sun8i-a83t chip. The kernel module is loading and based on Jonathan's work.<br>
<br>
Wow!<br>
<br>
> 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.<br>
<br>
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...<br></blockquote><div>Oh already too late... <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>
> 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:<br>
> <br>
> pi@bananapi:~$ sudo ./devmem2 0x01C40024<br>
> /dev/mem opened.<br>
> Memory mapped at address 0xb6f3e000.<br>
> Value at address 0x1C40024 (0xb6f3e024): 0x10105<br>
<br>
Good to know!<br>
<br>
> So here we have the SGX revision 01.01.05 --> 115.<br>
<br>
That is interesting. I have not yet seen a 115 revision.<br>
<br>
> Can you please correct this in your patch set for mainline?<br>
<br>
Yes, sure.<br>
<br>
> <br>
> One interesting fact about my bananapi-m3:<br>
> 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.<br>
<br>
Yes, let's start in small steps :)<br>
<br>
BR and thanks,<br>
Nikolaus<br></blockquote><div><br></div><div>Cheers</div><div>Philipp<br></div></div></div>