[Letux-kernel] build log :)

H. Nikolaus Schaller hns at goldelico.com
Fri Oct 28 19:11:38 CEST 2016


> Am 27.10.2016 um 16:32 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> Am 27.10.2016 um 12:22 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>> Am 26.10.2016 um 22:32 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>> ...
>>> INSTALL drivers/gpu/drm/tilcdc/tilcdc.ko - due to target is PHONY
>>> INSTALL drivers/gpu/pvr/omap3/pvr_sgx530_rev125.ko - due to target is PHONY
>>> INSTALL drivers/hid/hid-logitech-hidpp.ko - due to target is PHONY
>>> ...
>>> iMac:modules hns$ ls -l lib/modules/4.9.0-rc2-letux+/kernel/drivers/gpu/pvr/omap3/pvr_sgx530_rev125.ko 
>>> -rw-r--r--  1 hns  staff  4075344 26 Okt 22:17 lib/modules/4.9.0-rc2-letux+/kernel/drivers/gpu/pvr/omap3/pvr_sgx530_rev125.ko
>>> iMac:modules hns$ 
>>> Quite a fat thin,g but compiles (again) on 4.9 kernel :)
>>> Well, we still have to make it working (I have not even tested if it can be modprobed).
>> Here:
>> root at letux:~# modprobe pvr_sgx530_rev125
>> [  246.543914] pvrsrvkm pvrsrvkm: PVRSRVDriverProbe: error: reset_control_get
>> [  246.561035] pvrsrvkm: probe of pvrsrvkm failed with error -22
>> root at letux:~# ls -l /dev/pvrsrvkm
>> crw------- 1 root root 243, 0 Jan  1 00:03 /dev/pvrsrvkm
>> root at letux:~# 
>> So the module loads fine and creates the /dev node :)
>>> Areas to be looked at:
>>> * dma management - it still tries to use some very low (assembler) level functions for DMA Cache control
>>> * reset framework - it is not clear if the SGX module is correctly set up and reset
>> Of course we have to fix the reset framework...
>> BTW: it is really simple to make it load through DT:
>> 	gpu {
>> 		compatible = "ti,sgx";
>> 	};
>> should suffice :)
>> But we probably should fix that as well to require the correct sgx revision and not ti,sgx in general.
>> This would prevent loading the wrong kernel module if several are available.
> Have done this now. Seems to basically work.
> I have also added a /root/gpu-demo script which tries to start the pvr
> and run a demo. If needed it loads the binary libs and init code from the
> quantumstep repository.
> Of course it fails...
> So it is up to you to play around and help to fix the two remaining buggy
> areas. I have clearly noted what to do and it does not appear to be really
> difficult. Just time consuming to read and understand yet another Linux API...
> Here is the tree:
> http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/work/hns/gpu/pvr-v2

I have looked a little into the DM3730 TRM and it appears as if the power domain
and reset registers are well documented.

For example the PM_PWSTST_SGX @ 0x4830 6BE4 should tell something about the
power state of the SGX module.

CM_FCLKEN_SGX @ 0x4800 4B00 and CM_ICLKEN_SGX @ 0x4800 4B10 tell if the clocks are enabled.

CM_IDLEST_SGX @ 0x4800 4B20 should tell if theSGX is active or in standby.

Finally RM_RSTST_SGX @ 0x4830 6B58 should say something about the reset state.

And section explicitly says:

"Software controls the release of SGX_RST using the PRCM.RM_RSTCTRL_SGX[0] SGX_RST bit."

All these registers can be inspected by devmem2. And even written...

I am quite sure that we have all information we need to fix the SGX reset control.
Then I hope the SGX starts up.

There remains the DMA/cache control issue but IMHO the worst case is wrong data
being displayed.


More information about the Letux-kernel mailing list