[meta-arago,dunfell,2/3] packagegroup-*-graphics: add virtual provider for AM62x GPU driver v2

Message ID 20220322193554.24404-3-reatmon@ti.com
State Superseded
Headers show
Series Adding support for am62xx | expand

Commit Message

Ryan Eatmon March 22, 2022, 7:35 p.m. UTC
From: Krunal Bhargav <k-bhargav@ti.com>

Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Nishanth Menon March 22, 2022, 8:49 p.m. UTC | #1
On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
> From: Krunal Bhargav <k-bhargav@ti.com>
> 
> Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
>  .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> index a356c76c..7bc2ba52 100644
> --- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
> +++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> @@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
>  PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
>  PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
>  
> -# J7 has a Rogue GPU core
> -PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
> +# K3 TI Platforms has a Rogue GPU core
> +PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"

How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
sgx.

>  
>  # This is required when using keystone devices with graphical support
>  # such as Qt5
> -- 
> 2.17.1
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13711): https://lists.yoctoproject.org/g/meta-arago/message/13711
> Mute This Topic: https://lists.yoctoproject.org/mt/89960456/5513541
> Group Owner: meta-arago+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [nm@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
>
Etheridge, Darren March 22, 2022, 8:58 p.m. UTC | #2
On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
> On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
>> From: Krunal Bhargav <k-bhargav@ti.com>
>>
>> Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>> ---
>>   .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>> index a356c76c..7bc2ba52 100644
>> --- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
>> +++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>> @@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
>>   PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
>>   PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
>>   
>> -# J7 has a Rogue GPU core
>> -PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
>> +# K3 TI Platforms has a Rogue GPU core
>> +PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
> 
> How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
> sgx.
> 

That is a very good point.  This will mess up SGX platforms.   I wish we 
had k3_ as the prefix for the name here for all the k3 platforms.

So I guess the only solution is leave all the _j7 as they were

and add:
+PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"


Is there anything cleverer?

>>   
>>   # This is required when using keystone devices with graphical support
>>   # such as Qt5
>> -- 
>> 2.17.1
>>
>>
>>
>>
>>
>>
>
Denys Dmytriyenko March 22, 2022, 10:13 p.m. UTC | #3
On Tue, Mar 22, 2022 at 03:58:04PM -0500, Etheridge, Darren via lists.yoctoproject.org wrote:
> 
> 
> On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
> >On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
> >>From: Krunal Bhargav <k-bhargav@ti.com>
> >>
> >>Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
> >>Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> >>---
> >>  .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
> >>  1 file changed, 6 insertions(+), 6 deletions(-)
> >>
> >>diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>index a356c76c..7bc2ba52 100644
> >>--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>@@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
> >>  PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
> >>  PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
> >>-# J7 has a Rogue GPU core
> >>-PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
> >>-PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
> >>-PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
> >>-PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
> >>-PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
> >>+# K3 TI Platforms has a Rogue GPU core
> >>+PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
> >
> >How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
> >sgx.
> >
> 
> That is a very good point.  This will mess up SGX platforms.   I
> wish we had k3_ as the prefix for the name here for all the k3
> platforms.

There is "k3" defined and you can do _k3 override to address all K3 platforms, 
but again, some are SGX and some are RGX...


> So I guess the only solution is leave all the _j7 as they were
> 
> and add:
> +PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
> +PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"

And there's no "am62" defined, but "am62xx" :)


> Is there anything cleverer?
> 
> >>  # This is required when using keystone devices with graphical support
> >>  # such as Qt5
> >>-- 
> >>2.17.1
Etheridge, Darren March 22, 2022, 10:16 p.m. UTC | #4
On 3/22/2022 5:13 PM, Denys Dmytriyenko wrote:
> On Tue, Mar 22, 2022 at 03:58:04PM -0500, Etheridge, Darren via lists.yoctoproject.org wrote:
>>
>>
>> On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
>>> On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>> From: Krunal Bhargav <k-bhargav@ti.com>
>>>>
>>>> Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>> ---
>>>>   .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
>>>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>> index a356c76c..7bc2ba52 100644
>>>> --- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>> +++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>> @@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
>>>>   PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
>>>>   PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
>>>> -# J7 has a Rogue GPU core
>>>> -PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
>>>> -PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
>>>> -PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
>>>> -PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
>>>> -PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
>>>> +# K3 TI Platforms has a Rogue GPU core
>>>> +PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
>>>
>>> How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
>>> sgx.
>>>
>>
>> That is a very good point.  This will mess up SGX platforms.   I
>> wish we had k3_ as the prefix for the name here for all the k3
>> platforms.
> 
> There is "k3" defined and you can do _k3 override to address all K3 platforms,
> but again, some are SGX and some are RGX...
> 
> 
>> So I guess the only solution is leave all the _j7 as they were
>>
>> and add:
>> +PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
>> +PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"
> 
> And there's no "am62" defined, but "am62xx" :)
> 

Isn't it a partial pattern match?   If it is not the _j7 won't work for 
j721s2 either.

> 
>> Is there anything cleverer?
>>
>>>>   # This is required when using keystone devices with graphical support
>>>>   # such as Qt5
>>>> -- 
>>>> 2.17.1
>
Denys Dmytriyenko March 22, 2022, 10:27 p.m. UTC | #5
On Tue, Mar 22, 2022 at 05:16:20PM -0500, Etheridge, Darren wrote:
> 
> 
> On 3/22/2022 5:13 PM, Denys Dmytriyenko wrote:
> >On Tue, Mar 22, 2022 at 03:58:04PM -0500, Etheridge, Darren via lists.yoctoproject.org wrote:
> >>
> >>
> >>On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
> >>>On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
> >>>>From: Krunal Bhargav <k-bhargav@ti.com>
> >>>>
> >>>>Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
> >>>>Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> >>>>---
> >>>>  .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
> >>>>  1 file changed, 6 insertions(+), 6 deletions(-)
> >>>>
> >>>>diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>index a356c76c..7bc2ba52 100644
> >>>>--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>@@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
> >>>>  PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
> >>>>  PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
> >>>>-# J7 has a Rogue GPU core
> >>>>-PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
> >>>>-PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
> >>>>-PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
> >>>>-PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
> >>>>-PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
> >>>>+# K3 TI Platforms has a Rogue GPU core
> >>>>+PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
> >>>
> >>>How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
> >>>sgx.
> >>>
> >>
> >>That is a very good point.  This will mess up SGX platforms.   I
> >>wish we had k3_ as the prefix for the name here for all the k3
> >>platforms.
> >
> >There is "k3" defined and you can do _k3 override to address all K3 platforms,
> >but again, some are SGX and some are RGX...
> >
> >
> >>So I guess the only solution is leave all the _j7 as they were
> >>
> >>and add:
> >>+PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
> >>+PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"
> >
> >And there's no "am62" defined, but "am62xx" :)
> >
> 
> Isn't it a partial pattern match?   If it is not the _j7 won't work
> for j721s2 either.

No, it's not a partial pattern match. Overrides use exact matches only, so 
those have to be defined. Specifically these overrides come from SOC_FAMILY 
variable and there are definitions for "k3", "j7", but there's no "j721s2" 
SOC_FAMILY defined, so you cannot use _j721s2, nor _j7 will match it.
https://git.yoctoproject.org/meta-ti/tree/conf/machine/include?h=dunfell
Etheridge, Darren March 22, 2022, 10:44 p.m. UTC | #6
On 3/22/2022 5:27 PM, Denys Dmytriyenko wrote:
> On Tue, Mar 22, 2022 at 05:16:20PM -0500, Etheridge, Darren wrote:
>>
>>
>> On 3/22/2022 5:13 PM, Denys Dmytriyenko wrote:
>>> On Tue, Mar 22, 2022 at 03:58:04PM -0500, Etheridge, Darren via lists.yoctoproject.org wrote:
>>>>
>>>>
>>>> On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
>>>>> On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>>>> From: Krunal Bhargav <k-bhargav@ti.com>
>>>>>>
>>>>>> Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
>>>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>>>> ---
>>>>>>   .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
>>>>>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>>>>>
>>>>>> diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>>>> index a356c76c..7bc2ba52 100644
>>>>>> --- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>>>> +++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
>>>>>> @@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
>>>>>>   PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
>>>>>>   PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
>>>>>> -# J7 has a Rogue GPU core
>>>>>> -PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
>>>>>> -PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
>>>>>> -PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
>>>>>> -PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
>>>>>> -PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
>>>>>> +# K3 TI Platforms has a Rogue GPU core
>>>>>> +PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
>>>>>> +PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
>>>>>> +PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
>>>>>> +PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
>>>>>> +PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
>>>>>
>>>>> How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
>>>>> sgx.
>>>>>
>>>>
>>>> That is a very good point.  This will mess up SGX platforms.   I
>>>> wish we had k3_ as the prefix for the name here for all the k3
>>>> platforms.
>>>
>>> There is "k3" defined and you can do _k3 override to address all K3 platforms,
>>> but again, some are SGX and some are RGX...
>>>
>>>
>>>> So I guess the only solution is leave all the _j7 as they were
>>>>
>>>> and add:
>>>> +PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
>>>> +PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"
>>>
>>> And there's no "am62" defined, but "am62xx" :)
>>>
>>
>> Isn't it a partial pattern match?   If it is not the _j7 won't work
>> for j721s2 either.
> 
> No, it's not a partial pattern match. Overrides use exact matches only, so
> those have to be defined. Specifically these overrides come from SOC_FAMILY
> variable and there are definitions for "k3", "j7", but there's no "j721s2"
> SOC_FAMILY defined, so you cannot use _j721s2, nor _j7 will match it.
> https://git.yoctoproject.org/meta-ti/tree/conf/machine/include?h=dunfell
> 

Thanks for the explanation Denys,  I was making totally wrong assumption 
on how that was being derived.

So we could actually use _k3 and get am62xx-evm, j721s2-evm and j7-evm 
with a single override.  All k3's use the IMG Rogue driver if they have 
a GPU.
Denys Dmytriyenko March 22, 2022, 11:06 p.m. UTC | #7
On Tue, Mar 22, 2022 at 05:44:39PM -0500, Etheridge, Darren wrote:
> 
> 
> On 3/22/2022 5:27 PM, Denys Dmytriyenko wrote:
> >On Tue, Mar 22, 2022 at 05:16:20PM -0500, Etheridge, Darren wrote:
> >>
> >>
> >>On 3/22/2022 5:13 PM, Denys Dmytriyenko wrote:
> >>>On Tue, Mar 22, 2022 at 03:58:04PM -0500, Etheridge, Darren via lists.yoctoproject.org wrote:
> >>>>
> >>>>
> >>>>On 3/22/2022 3:49 PM, Nishanth Menon via lists.yoctoproject.org wrote:
> >>>>>On 14:35-20220322, Ryan Eatmon via lists.yoctoproject.org wrote:
> >>>>>>From: Krunal Bhargav <k-bhargav@ti.com>
> >>>>>>
> >>>>>>Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
> >>>>>>Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> >>>>>>---
> >>>>>>  .../conf/distro/include/arago-prefs.inc              | 12 ++++++------
> >>>>>>  1 file changed, 6 insertions(+), 6 deletions(-)
> >>>>>>
> >>>>>>diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>>>index a356c76c..7bc2ba52 100644
> >>>>>>--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>>>+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
> >>>>>>@@ -14,12 +14,12 @@ PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
> >>>>>>  PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
> >>>>>>  PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
> >>>>>>-# J7 has a Rogue GPU core
> >>>>>>-PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
> >>>>>>-PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
> >>>>>>-PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
> >>>>>>-PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
> >>>>>>-PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
> >>>>>>+# K3 TI Platforms has a Rogue GPU core
> >>>>>>+PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
> >>>>>>+PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
> >>>>>>+PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
> >>>>>>+PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
> >>>>>>+PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
> >>>>>
> >>>>>How does this apply to k3 and leave non-k3 alone? Also, am65x for example is
> >>>>>sgx.
> >>>>>
> >>>>
> >>>>That is a very good point.  This will mess up SGX platforms.   I
> >>>>wish we had k3_ as the prefix for the name here for all the k3
> >>>>platforms.
> >>>
> >>>There is "k3" defined and you can do _k3 override to address all K3 platforms,
> >>>but again, some are SGX and some are RGX...
> >>>
> >>>
> >>>>So I guess the only solution is leave all the _j7 as they were
> >>>>
> >>>>and add:
> >>>>+PREFERRED_PROVIDER_virtual/egl_am62 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgles1_am62 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgles2_am62 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/libgbm_am62 = "ti-img-rogue-umlibs"
> >>>>+PREFERRED_PROVIDER_virtual/gpudriver_am62 = "ti-img-rogue-driver"
> >>>
> >>>And there's no "am62" defined, but "am62xx" :)
> >>>
> >>
> >>Isn't it a partial pattern match?   If it is not the _j7 won't work
> >>for j721s2 either.
> >
> >No, it's not a partial pattern match. Overrides use exact matches only, so
> >those have to be defined. Specifically these overrides come from SOC_FAMILY
> >variable and there are definitions for "k3", "j7", but there's no "j721s2"
> >SOC_FAMILY defined, so you cannot use _j721s2, nor _j7 will match it.
> >https://git.yoctoproject.org/meta-ti/tree/conf/machine/include?h=dunfell
> >
> 
> Thanks for the explanation Denys,  I was making totally wrong
> assumption on how that was being derived.
> 
> So we could actually use _k3 and get am62xx-evm, j721s2-evm and
> j7-evm with a single override.  All k3's use the IMG Rogue driver if
> they have a GPU.

What about am65xx? It is SGX.
And I assume am64xx and j7200 have no GPU.
If am65xx is the only exception in K3 family, then we could flip the 
compatibility setting.

Patch

diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
index a356c76c..7bc2ba52 100644
--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
@@ -14,12 +14,12 @@  PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/gpudriver = "ti-sgx-ddk-km"
 
-# J7 has a Rogue GPU core
-PREFERRED_PROVIDER_virtual/egl_j7 = "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1_j7 = "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2_j7 = "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm_j7 = "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/gpudriver_j7 = "ti-img-rogue-driver"
+# K3 TI Platforms has a Rogue GPU core
+PREFERRED_PROVIDER_virtual/egl = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles1 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgles2 = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/libgbm = "ti-img-rogue-umlibs"
+PREFERRED_PROVIDER_virtual/gpudriver = "ti-img-rogue-driver"
 
 # This is required when using keystone devices with graphical support
 # such as Qt5