[Letux-kernel] Lay common foundation to make PVR/SGX work without hacks on OMAP34xx, OMAP36xx, AM335x and potentially OMAP4, OMAP5

H. Nikolaus Schaller hns at goldelico.com
Thu Jan 25 11:06:07 CET 2018


> Am 24.01.2018 um 08:57 schrieb Tomi Valkeinen <tomi.valkeinen at ti.com>:
> 
> On 23/01/18 19:56, H. Nikolaus Schaller wrote:
>> 
>>> Am 23.01.2018 um 17:47 schrieb Tomi Valkeinen <tomi.valkeinen at ti.com>:
>>> 
>>> On 23/01/18 18:22, H. Nikolaus Schaller wrote:
>>> 
>>>>> Well, you can refer to
>>>>> 
>>>>> https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements
>>>> 
>>>> Interesting.
>>>> 
>>>> But I don't see how it is related to OMAP-SGX at all (except that
>>>> it is about a GFX subsystem).
>>>> 
>>>> I understand that this is for the case we would plan to craft a proper
>>>> DRM based solution so that DRM API and user space libs can be used.
>>> 
>>> At least the latest SGX driver is DRM based.
>> 
>> Is it DRM based or does it "use" DRM for allocating the framebuffer?
> 
> SGX appears as a DRM device, so yes, it is DRM based. To be more exact,
> I think the kernel driver supports different options on how to compile
> it. We configure it to be a DRM device.

Yes, it has two:
* omaplfb
* DRM

neither of these currently compile with my code :(

So that is indeed the main working site.

> 
>> I have studied the code a little but did not yet understand how to use
>> it. Tony has recommended to make this project more public to get help for
>> making this work because someone may be able to help fixing it.
>> 
>>> But true, the old driver
>>> may not be.
>> 
>> At least it has a -DDRM compile option. Maybe the 5.0 drivers need
>> a little help by backporting things from 6.0.
>> 
>> Or both can be merged by forward-porting sgx530 support into the 6.0
>> drivers.
> 
> Hmm, I'm not familiar with these versions... Those are TI graphics SDK
> versions, I presume? I think anything called "Graphics SDK" is quite
> old. The latest SGX DDK is 1.14 which is, afaik, available in TI's
> processor SDK or via the git branches I pointed to.

Yes, this also supports the am33xx:

https://e2e.ti.com/support/embedded/linux/f/354/p/567306/2080513

I think the version schemes by TI and IMG are mixed. IMG scheme is SGX DDK
1.9, 1.10, 1.14 etc. While TI has (had?) Graphics SDK 4, SDK5, SDK6 based
on one of the IMG DDKs.

I currently have in use:

a) omap3/am33xx: Graphics_SDK_5_01_01_02

The software on the SGX identifies itself as 

root at letux:~# cat /proc/pvr/version 
Version SGX_DDK_Linux_CustomerTI sgxddk 1.10 at 2359475 (release) omap_sgx
System Version String: None
root at letux:~#

So this is currently SGX DDK 1.10.

This runs unmodified on am3358 and dm3730 so I expect no problem of upgrading
to SGX DDK 1.14 for both of them.

b) omap4/5 from git://git.ti.com/graphics/omap5-sgx-ddk-linux.git
   commit: 430673f78b79eccdf308a6bbfb524209b485d2cc

I don't have it running so that I don't know the exact version it reports.


One more observation: there is no major release step in SGX DDK, i.e.
it just moved from 1.9 to 1.10 and apparently 1.14.

Interestingly, both the older and the newer Graphics_SDK claim to
support omap4 which seems to confirm that there are only minor differences
between SoC and kernel drivers.

IMHO the user-space libs are tied to a specific IMG DDK version while
SoC support is tied to a Graphics_SDK version.

This is why I think it could be possible to backport/forward-port
and mix omap3/4 driver with omap4/5 driver to get a single kernel
driver module for all of them.

Anyways, I could live for a while with a situation where we have
different drivers for omap3/4 and omap4/5.

BR,
Nikolaus



More information about the Letux-kernel mailing list