diff mbox series

[meta-ti,scarthgap,RFC,2/6] ti-bsp: Do not remove gpu MACHINE_FEATURE conditionally on BSP version

Message ID 20250909151028.272925-2-afd@ti.com
State RFC
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,scarthgap,RFC,1/6] ti-sgx-ddk-um: UM side driver depends on KM side driver | expand

Commit Message

Andrew Davis Sept. 9, 2025, 3:10 p.m. UTC
Setting or removing the gpu MACHINE_FEATURE does not actually change
if the GPU driver is built or not. That is done based on the setting
of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
are default empty for BSP versions without supported GPU drivers, which
will correctly cause a fallback to SW rendering when the GPU driver is
not available.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
 1 file changed, 8 deletions(-)

Comments

Denys Dmytriyenko Sept. 9, 2025, 8:44 p.m. UTC | #1
On Tue, Sep 09, 2025 at 10:10:24AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
> Setting or removing the gpu MACHINE_FEATURE does not actually change
> if the GPU driver is built or not. That is done based on the setting
> of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
> are default empty for BSP versions without supported GPU drivers, which
> will correctly cause a fallback to SW rendering when the GPU driver is
> not available.

While cleaning the remaining uses of "gpu" MACHINE_FEATURE, why not remove it 
completely from all the machine configs?


> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> index 262aa884..a5d9a51f 100644
> --- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> +++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> @@ -18,10 +18,6 @@ BSP_KERNEL_VERSION:bsp-mainline = "%"
>  BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
>  BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
>  
> -# GPU support requires out-of-tree SGX and Rogue drivers not available
> -# in mainline, usually present in TI staging or derivative like BB.org
> -MACHINE_FEATURES:remove:bsp-mainline = "gpu"
> -
>  # GC320 support requires out-of-tree drivers not available in mainline
>  MACHINE_FEATURES:remove:bsp-mainline = "gc320"
>  
> @@ -34,10 +30,6 @@ BSP_KERNEL_VERSION:bsp-next = "%"
>  BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
>  BSP_BOOTLOADER_VERSION:bsp-next = "%"
>  
> -# GPU support requires out-of-tree SGX and Rogue drivers not available
> -# in next, usually present in TI staging or derivative like BB.org
> -MACHINE_FEATURES:remove:bsp-next = "gpu"
> -
>  # GC320 support requires out-of-tree drivers not available in next
>  MACHINE_FEATURES:remove:bsp-next = "gc320"
>  
> -- 
> 2.39.2
Andrew Davis Sept. 12, 2025, 4:31 p.m. UTC | #2
On 9/9/25 3:44 PM, Denys Dmytriyenko wrote:
> On Tue, Sep 09, 2025 at 10:10:24AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
>> Setting or removing the gpu MACHINE_FEATURE does not actually change
>> if the GPU driver is built or not. That is done based on the setting
>> of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
>> are default empty for BSP versions without supported GPU drivers, which
>> will correctly cause a fallback to SW rendering when the GPU driver is
>> not available.
> 
> While cleaning the remaining uses of "gpu" MACHINE_FEATURE, why not remove it
> completely from all the machine configs?
> 

I thought about that, but it could still be useful to key off of that for
other reasons, or even maybe turn the "gpu" MACHINE_FEATURE into "rgx" and
"sgx" so we can later switch on that in the mesa-pvr driver.

Andrew

> 
>> Signed-off-by: Andrew Davis <afd@ti.com>
>> ---
>>   meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
>>   1 file changed, 8 deletions(-)
>>
>> diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>> index 262aa884..a5d9a51f 100644
>> --- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>> +++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>> @@ -18,10 +18,6 @@ BSP_KERNEL_VERSION:bsp-mainline = "%"
>>   BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
>>   BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
>>   
>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>> -# in mainline, usually present in TI staging or derivative like BB.org
>> -MACHINE_FEATURES:remove:bsp-mainline = "gpu"
>> -
>>   # GC320 support requires out-of-tree drivers not available in mainline
>>   MACHINE_FEATURES:remove:bsp-mainline = "gc320"
>>   
>> @@ -34,10 +30,6 @@ BSP_KERNEL_VERSION:bsp-next = "%"
>>   BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
>>   BSP_BOOTLOADER_VERSION:bsp-next = "%"
>>   
>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>> -# in next, usually present in TI staging or derivative like BB.org
>> -MACHINE_FEATURES:remove:bsp-next = "gpu"
>> -
>>   # GC320 support requires out-of-tree drivers not available in next
>>   MACHINE_FEATURES:remove:bsp-next = "gc320"
>>   
>> -- 
>> 2.39.2
Denys Dmytriyenko Sept. 12, 2025, 6:24 p.m. UTC | #3
On Fri, Sep 12, 2025 at 11:31:19AM -0500, Andrew Davis wrote:
> On 9/9/25 3:44 PM, Denys Dmytriyenko wrote:
> >On Tue, Sep 09, 2025 at 10:10:24AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
> >>Setting or removing the gpu MACHINE_FEATURE does not actually change
> >>if the GPU driver is built or not. That is done based on the setting
> >>of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
> >>are default empty for BSP versions without supported GPU drivers, which
> >>will correctly cause a fallback to SW rendering when the GPU driver is
> >>not available.
> >
> >While cleaning the remaining uses of "gpu" MACHINE_FEATURE, why not remove it
> >completely from all the machine configs?
> >
> 
> I thought about that, but it could still be useful to key off of that for
> other reasons, or even maybe turn the "gpu" MACHINE_FEATURE into "rgx" and
> "sgx" so we can later switch on that in the mesa-pvr driver.

Heh, this MACHINE_FEATURE used to be called "sgx" back in the day. When Rogue 
was being added, I briefly had a separate "rgx" flag, but eventually combined 
both into "gpu" one...


> >>Signed-off-by: Andrew Davis <afd@ti.com>
> >>---
> >>  meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
> >>  1 file changed, 8 deletions(-)
> >>
> >>diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> >>index 262aa884..a5d9a51f 100644
> >>--- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> >>+++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
> >>@@ -18,10 +18,6 @@ BSP_KERNEL_VERSION:bsp-mainline = "%"
> >>  BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
> >>  BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
> >>-# GPU support requires out-of-tree SGX and Rogue drivers not available
> >>-# in mainline, usually present in TI staging or derivative like BB.org
> >>-MACHINE_FEATURES:remove:bsp-mainline = "gpu"
> >>-
> >>  # GC320 support requires out-of-tree drivers not available in mainline
> >>  MACHINE_FEATURES:remove:bsp-mainline = "gc320"
> >>@@ -34,10 +30,6 @@ BSP_KERNEL_VERSION:bsp-next = "%"
> >>  BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
> >>  BSP_BOOTLOADER_VERSION:bsp-next = "%"
> >>-# GPU support requires out-of-tree SGX and Rogue drivers not available
> >>-# in next, usually present in TI staging or derivative like BB.org
> >>-MACHINE_FEATURES:remove:bsp-next = "gpu"
> >>-
> >>  # GC320 support requires out-of-tree drivers not available in next
> >>  MACHINE_FEATURES:remove:bsp-next = "gc320"
> >>-- 
> >>2.39.2
Andrew Davis Sept. 17, 2025, 9:54 p.m. UTC | #4
On 9/12/25 1:24 PM, Denys Dmytriyenko wrote:
> On Fri, Sep 12, 2025 at 11:31:19AM -0500, Andrew Davis wrote:
>> On 9/9/25 3:44 PM, Denys Dmytriyenko wrote:
>>> On Tue, Sep 09, 2025 at 10:10:24AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
>>>> Setting or removing the gpu MACHINE_FEATURE does not actually change
>>>> if the GPU driver is built or not. That is done based on the setting
>>>> of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
>>>> are default empty for BSP versions without supported GPU drivers, which
>>>> will correctly cause a fallback to SW rendering when the GPU driver is
>>>> not available.
>>>
>>> While cleaning the remaining uses of "gpu" MACHINE_FEATURE, why not remove it
>>> completely from all the machine configs?
>>>
>>
>> I thought about that, but it could still be useful to key off of that for
>> other reasons, or even maybe turn the "gpu" MACHINE_FEATURE into "rgx" and
>> "sgx" so we can later switch on that in the mesa-pvr driver.
> 
> Heh, this MACHINE_FEATURE used to be called "sgx" back in the day. When Rogue
> was being added, I briefly had a separate "rgx" flag, but eventually combined
> both into "gpu" one...
> 

Okay so then I have two options, I can switch back to "sgx" and "rgx" for
some later use, or I can just drop the MACHINE_FEATURE completely, any
preference?

> 
>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>> ---
>>>>   meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
>>>>   1 file changed, 8 deletions(-)
>>>>
>>>> diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>> index 262aa884..a5d9a51f 100644
>>>> --- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>> +++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>> @@ -18,10 +18,6 @@ BSP_KERNEL_VERSION:bsp-mainline = "%"
>>>>   BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
>>>>   BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
>>>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>>>> -# in mainline, usually present in TI staging or derivative like BB.org
>>>> -MACHINE_FEATURES:remove:bsp-mainline = "gpu"
>>>> -
>>>>   # GC320 support requires out-of-tree drivers not available in mainline
>>>>   MACHINE_FEATURES:remove:bsp-mainline = "gc320"
>>>> @@ -34,10 +30,6 @@ BSP_KERNEL_VERSION:bsp-next = "%"
>>>>   BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
>>>>   BSP_BOOTLOADER_VERSION:bsp-next = "%"
>>>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>>>> -# in next, usually present in TI staging or derivative like BB.org
>>>> -MACHINE_FEATURES:remove:bsp-next = "gpu"
>>>> -
>>>>   # GC320 support requires out-of-tree drivers not available in next
>>>>   MACHINE_FEATURES:remove:bsp-next = "gc320"
>>>> -- 
>>>> 2.39.2
Randolph Sapp Sept. 17, 2025, 9:57 p.m. UTC | #5
On Wed Sep 17, 2025 at 4:54 PM CDT, Andrew Davis wrote:
> On 9/12/25 1:24 PM, Denys Dmytriyenko wrote:
>> On Fri, Sep 12, 2025 at 11:31:19AM -0500, Andrew Davis wrote:
>>> On 9/9/25 3:44 PM, Denys Dmytriyenko wrote:
>>>> On Tue, Sep 09, 2025 at 10:10:24AM -0500, Andrew Davis via lists.yoctoproject.org wrote:
>>>>> Setting or removing the gpu MACHINE_FEATURE does not actually change
>>>>> if the GPU driver is built or not. That is done based on the setting
>>>>> of the BSP_{SGX,ROGUE}_{DRIVER,UMLIBS}_{PROVIDER,VERSION} vars. These
>>>>> are default empty for BSP versions without supported GPU drivers, which
>>>>> will correctly cause a fallback to SW rendering when the GPU driver is
>>>>> not available.
>>>>
>>>> While cleaning the remaining uses of "gpu" MACHINE_FEATURE, why not remove it
>>>> completely from all the machine configs?
>>>>
>>>
>>> I thought about that, but it could still be useful to key off of that for
>>> other reasons, or even maybe turn the "gpu" MACHINE_FEATURE into "rgx" and
>>> "sgx" so we can later switch on that in the mesa-pvr driver.
>> 
>> Heh, this MACHINE_FEATURE used to be called "sgx" back in the day. When Rogue
>> was being added, I briefly had a separate "rgx" flag, but eventually combined
>> both into "gpu" one...
>> 
>
> Okay so then I have two options, I can switch back to "sgx" and "rgx" for
> some later use, or I can just drop the MACHINE_FEATURE completely, any
> preference?

I'm partial to just dropping it entirely. If we don't intend external layers to
read it, then it shouldn't be a MACHINE_FEATURE. We're already tracking that
information in other variables anyway.

- Randolph

>>>>> Signed-off-by: Andrew Davis <afd@ti.com>
>>>>> ---
>>>>>   meta-ti-bsp/conf/machine/include/ti-bsp.inc | 8 --------
>>>>>   1 file changed, 8 deletions(-)
>>>>>
>>>>> diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>>> index 262aa884..a5d9a51f 100644
>>>>> --- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>>> +++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
>>>>> @@ -18,10 +18,6 @@ BSP_KERNEL_VERSION:bsp-mainline = "%"
>>>>>   BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
>>>>>   BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
>>>>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>>>>> -# in mainline, usually present in TI staging or derivative like BB.org
>>>>> -MACHINE_FEATURES:remove:bsp-mainline = "gpu"
>>>>> -
>>>>>   # GC320 support requires out-of-tree drivers not available in mainline
>>>>>   MACHINE_FEATURES:remove:bsp-mainline = "gc320"
>>>>> @@ -34,10 +30,6 @@ BSP_KERNEL_VERSION:bsp-next = "%"
>>>>>   BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
>>>>>   BSP_BOOTLOADER_VERSION:bsp-next = "%"
>>>>> -# GPU support requires out-of-tree SGX and Rogue drivers not available
>>>>> -# in next, usually present in TI staging or derivative like BB.org
>>>>> -MACHINE_FEATURES:remove:bsp-next = "gpu"
>>>>> -
>>>>>   # GC320 support requires out-of-tree drivers not available in next
>>>>>   MACHINE_FEATURES:remove:bsp-next = "gc320"
>>>>> -- 
>>>>> 2.39.2
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/ti-bsp.inc b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
index 262aa884..a5d9a51f 100644
--- a/meta-ti-bsp/conf/machine/include/ti-bsp.inc
+++ b/meta-ti-bsp/conf/machine/include/ti-bsp.inc
@@ -18,10 +18,6 @@  BSP_KERNEL_VERSION:bsp-mainline = "%"
 BSP_BOOTLOADER_PROVIDER:bsp-mainline = "u-boot-ti-mainline"
 BSP_BOOTLOADER_VERSION:bsp-mainline = "%"
 
-# GPU support requires out-of-tree SGX and Rogue drivers not available
-# in mainline, usually present in TI staging or derivative like BB.org
-MACHINE_FEATURES:remove:bsp-mainline = "gpu"
-
 # GC320 support requires out-of-tree drivers not available in mainline
 MACHINE_FEATURES:remove:bsp-mainline = "gc320"
 
@@ -34,10 +30,6 @@  BSP_KERNEL_VERSION:bsp-next = "%"
 BSP_BOOTLOADER_PROVIDER:bsp-next = "u-boot-ti-next"
 BSP_BOOTLOADER_VERSION:bsp-next = "%"
 
-# GPU support requires out-of-tree SGX and Rogue drivers not available
-# in next, usually present in TI staging or derivative like BB.org
-MACHINE_FEATURES:remove:bsp-next = "gpu"
-
 # GC320 support requires out-of-tree drivers not available in next
 MACHINE_FEATURES:remove:bsp-next = "gc320"