[Openpvrsgx-devgroup] A little SGX experiment with jz4780 / CI20

Paul Boddie paul at boddie.org.uk
Sat Nov 2 13:29:40 CET 2019


On Saturday 2. November 2019 07.39.08 H.  Nikolaus Schaller wrote:
> 
> I have located the jz4780 programming manual
> but it doesn't say anything about the address
> range where the SGX is mapped to. And maybe we
> need to define an interrupt like for omap [1].

The programming manual isn't helpful about the PowerVR features, merely being 
a description of the capabilities. It is a similar story with regard to the 
Synopsys HDMI peripheral which might not even be mentioned beyond a single 
specification entry.

> It may be possible to analyse the older 3.x
> kernels which include a working SGX driver and
> run on the CI20.

Fortunately, the 3.18 kernel code, specifically in drivers/gpu/drm/jz4780 
contains files related to HDMI and the LCD peripheral. Meanwhile, the SGX 
stuff appears in the jz4780.dtsi file from 3.18 as follows:

        gpu: jz4780-sgx at 13040000 {
                compatible = "ingenic,jz4780-sgx";
                reg = <0x13040000 0x4000>;

                clocks = <&cgu JZ4780_CLK_GPU>;
                clock-names = "gpu";

                interrupt-parent = <&intc>;
                interrupts = <63>;

> Or it could be possible to scan "interesting"
> address ranges for what we would expect to be
> an SGX register block (as we can see by
> devmem2 on omap).

The above should give us something to go on.

> Looking into upstream code shows that GPU clocks
> are handled by CGU code:
> 
> https://elixir.bootlin.com/linux/latest/source/drivers/clk/ingenic/jz4780-cgu.c#L444

Yes, I think they should be available for device tree configuration.

> But a bigger problem to develop for the CI20
> is that it appears there is no HDMI/LCD driver
> in mainline kernels... So before having some
> fix for that, we can't even expect to visualize
> any 3D rendering.

I would have thought that the DRM driver mentioned above is at least a 
reasonable start. I don't recall seeing the usual Ingenic LCD driver in the 
drivers/drm directory, so it seems like an effort was made for upstreaming but 
that it didn't happen due to the usual inertia and social factors involved. 
And the HDMI stuff is based on work for the i.MX6 family, so I imagine that 
this may have been mainlined at some point.

> And the latest user-space blobs for the jz4780 are
> difficult to locate or have gone with some
> server-shutdown:
> 
> 	https://elinux.org/CI20-SGX_kernel_module
> 
> But it seems as if there is an archived copy through
> guest FTP at
> 
> 	ftp://ftp.radix.pro/3pp/Imagination/ci20/
> 
> It also appears that it is a slightly different
> release than we have for OMAP:
> 
> 	1.14.3759903 vs. 1.14.3699939.
> 
> No idea if that will be a problem (maybe yes,
> because the pvrsrcvtl seems to compare this
> version code to make sure that the uKernel
> does match).

I did download various user space archives for the CI20, so I can check what I 
actually have.

Paul


More information about the openpvrsgx-devgroup mailing list