[Letux-kernel] [PATCH 4/6] ARM: dts: Configure sgx for omap5
tony at atomide.com
Thu Sep 5 17:28:26 CEST 2019
* H. Nikolaus Schaller <hns at goldelico.com> [190905 15:04]:
> Hi Tony,
> I found some time to update my drivers/stating/pvr/1.14.369993 tree to make
> use of the new sgx soc integration code and it works on omap5!
> > root at letux:~# modprobe pvrsrvkm_omap_omap5_sgx544_116
> > [ 106.478254] pvrsrvkm_omap_omap5_sgx544_116: module is from the staging directory, the quality is unknown, you have been warned.
> > [ 106.526201] [drm] Initialized pvr 1.14.3699939 20110701 for 5600fe00.sgx on minor 1
> > root at letux:~# pvrsrvctl --no-module --start
> > [ 261.091978] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
> > root at letux:~# gles1test1 0
> > ^C
> > root at letux:~#
Hey that's great, good to hear :)
> To make it work, I have added a child node to the target-module at 56000000
> that describes the img,sgx5xx. Here are the work-in-progress patches if
> you want to take a look inside:
> On omap3630 the driver module loads but pvrsrvinit fails:
> > root at letux:~# modprobe pvrsrvkm_omap_omap3630_sgx530_125
> > [ 390.429260] pvrsrvkm_omap_omap3630_sgx530_125: module is from the staging directory, the quality is unknown, you have been warned.
> > [ 390.474304] [drm] Initialized pvr 1.14.3699939 20110701 for 50000000.sgx on minor 1
> > root at letux:~# pvrsrvctl --start --no-module
> > [ 402.200439] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
> > [ 402.219604] PVR_K:(Error): BridgedDispatchKM: Initialisation failed. Driver unusable.
> > PVR:(Error): LoaduKernelProgram : SGX ukernel program Device Addr: 0xe400000 invalid alignment [0, ]
> > PVR:(Error): SetupuKernel : Failed to load uKernel programs [0, ]
> > PVR:(Error): SrvInit: Initialisation for device of class 0, type 7, index 0, failed (1) [0, ]
> > PVR:(Error): PVRSRVBridgeCall: Failed to access device. Function ID:3223086862 (strerror returns no value.). [0, ]
> > pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_OUT_OF_MEMORY - Unable to allocate required memory)
> > root at letux:~#
> Maybe I do not have done the address range translation properly. Or I am missing
> some of your PRM rstctrl patches since I am working on top of linus/master.
> Because of that I had to comment out prm_gfx in am33xx.dtsi to get it compile and could
> not test yet on Beagle Bone.
My guess is that on 36xx the sgx registers are at a different offset
that does not start at offset 0? And this might be different again
If you enable the module via sysfs, you should be able to just
read out some registers to figure out where it might be is my
> A little unclear is how to properly handle omap4. omap4430/4440 and 4460 have the sgx540
> while only omap4470 has an sgx544 inside. But omap4420/30 share one .dtsi and omap4460/70
> the other. So we might have to define a new omap4470.dtsi and #include in the real omap4470
Oh OK. Well for 4460, see omap4460.dtsi that already has some ranges
updated compared to 4430 in l4_cfg_segment_300000 and l4_cfg_target_0.
I recall that was the only difference for the added 2d accelerator
between 4430 and 4460.
Adding a omap4470.dtsi in a similar way should work, just also update
also &sgx_module there too.
> And am3517 and am43/am57/am65/... support is missing. But that can be added later if we
> have it running on omap3 and am33xx.
Yeah sure at least 335x depends on the pending rstctrl patches.
> Anyways, we again have made a big step forwards. Let's hope that we can get
> the FLOSS part of the sgx drivers to staging in some not too far future.
More information about the Letux-kernel