[Openpvrsgx-devgroup] [openpvrsgx-devgroup/linux_openpvrsgx] Atom/GMA3600-SGX545 questions (Issue #8)
H. Nikolaus Schaller
hns at goldelico.com
Fri May 17 16:35:33 CEST 2024
Hi Julius,
> Am 14.05.2024 um 20:12 schrieb Julius Schwartzenberg <julius.schwartzenberg at gmail.com>:
>
>
> This seems to be a DDK 1.8.869593 compatible driver: https://github.com/shaqfu786/GFX_Linux_DDK/blob/master/eurasia_km/include4/pvrversion.h#L39C38-L39C44
> which we do not yet have in our collection: https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/branches/all?query=letux%2Fpvrsrvkm
>
> I plan to add this for a future release.
Well, I have checked again and it turns out to be a copy of the leaked full DDK. There are a lot of files included with a confidentiality note... I was astonished that this leaked code is still around after 10 years which may mean that they are not really interested in keeping it secred. And it is DDK 1.8 while the latest one I am aware of is DDK 1.17. So there is a lot of development and improvement since back then.
Now, I am unsure if I should really integrate it... Or take only parts with a clear GPL from eurasia_km?
>
> Ah interesting to see you have support for various versions.
Yes. We have collected all kernel driver variants we could find so far into a single tree and different CONFIG optioons allow to chose the right one. Some processors (mainly OMAP3 and siblings) are supported by two or 3 different variants.
> Does this also include the code required to bridge the PVR parts to the Cedarview/GMA500 part?
Well, each variant usually contains code in the eurasia_km directory which ties the DDK to some specific hardware. In most cases this is only for OMAP. There is one case where it also supports the MIPS jz4780. But we have no MIPS compatible user space to make any use for it.
For the x86 drivers I am not sure. I have no compatible hardware soI myself didn't try more than some compile tests (which usually fail). So I don't know what works and what is missing.
> When using the source from Intel, it is necessary to enable Intel Cedarview in the kernel's menuconfig (and disable the GMA500 driver). After that all PowerVR stuff gets loaded and also `/proc/pvr` is available.
Ok, this is already great!
> I think this is the code that's here: https://github.com/thomas001/cedarview-drm/tree/master/staging/cdv/drv
> And triggered by this configuration option: https://github.com/thomas001/cedarview-drm/blob/master/staging/cdv/Kconfig
>
> Would it be possible to introduce this in your tree(s)?
Basically it should be possible. We just have to create a new letux/pvrsrvkm-$DDK_RELEASE branch based on linus/master, move the files to drivers/gpu/drm/pvrsgc/$DDK_RELEASE, add proper modifications to drivers/gpu/drm/pvrsgc/{Kconfig,Makefile} and start debugging...
What likely has happened is that header files have moved or APIs changed. Then there are usually examples from other DDK versions how to fix.
And, the build process may hang because of dependencies or even missing files.
> I could test this. It seems the GMA500 driver and Intel's sources are related in some ways. It might also be possible to compare the two and see how Intel's variant hooks into the PVR parts.
Basically the architecture is that Imagnination did publish a DDK package in C that is agnostic to the processor the SGX is integrated in. This is the above mentioned leaked code.
The SoC vendor who has licensed the SGX module then added some code to wrap it and integrate into the OS. On kernel level and on user-space library level.
This has also been done by Microsoft for Windows or Apple for macOS. And in some cases for Linux/Android. Therefore there are many drivers around for different architectures and OS - and none is compatible to the other... And sometimes the Linux kernel driver is published but not always.
>
> PS: maybe you can subscribe to https://lists.goldelico.com/mailman/listinfo.cgi/openpvrsgx-devgroup which is a mailing list with different audience.
>
> Thanks, I tried to sign up, but did not receive a confirmation just yet. Maybe somebody needs to approve?
Have done recently.
Best regards,
Nikolaus
More information about the openpvrsgx-devgroup
mailing list