diff mbox series

[1/2] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Fix broken overlay root

Message ID 20250226-qcom-nonroot-overlays-v1-1-26c6e7605833@trvn.ru (mailing list archive)
State Superseded
Headers show
Series {vision/navigation}-mezzanine: Fix overlay root node | expand

Commit Message

Nikita Travkin Feb. 26, 2025, 2:29 p.m. UTC
When converting to the overlay format, it was missed that "/" in the
overlay corresponds to the overlay's own root node and not the fragment
targeted to update root of the base dts, which should be "&{/}" instead.
This results in the cma node never actually being applied by libfdt.

Fix the overlay to use correct target node.

Fixes: 231c03c6119d ("arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Convert mezzanine riser to dtbo")
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Herring (Arm) Feb. 26, 2025, 7:22 p.m. UTC | #1
On Wed, Feb 26, 2025 at 8:30 AM Nikita Travkin <nikita@trvn.ru> wrote:
>
> When converting to the overlay format, it was missed that "/" in the
> overlay corresponds to the overlay's own root node and not the fragment
> targeted to update root of the base dts, which should be "&{/}" instead.
> This results in the cma node never actually being applied by libfdt.
>
> Fix the overlay to use correct target node.
>
> Fixes: 231c03c6119d ("arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Convert mezzanine riser to dtbo")
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
>  arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
> index ae256c713a36078afdadc67193f381a19ea8e5d3..254df3d518d8cbfb1082511f38e132435b7fdf59 100644
> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
> @@ -9,7 +9,7 @@
>  #include <dt-bindings/clock/qcom,camcc-sm8250.h>
>  #include <dt-bindings/gpio/gpio.h>
>
> -/ {
> +&{/} {
>         reserved-memory {

IMO, this should be applied to the /reserved-memory node rather than
the root node. Though I also think using overlays to set CMA size is
questionable. It's much easier to change the kernel command line than
apply an overlay.

>                 linux,cma {
>                         compatible = "shared-dma-pool";
>
> --
> 2.48.1
>
Nikita Travkin Feb. 27, 2025, 9:18 a.m. UTC | #2
Rob Herring писал(а) 27.02.2025 00:22:
> On Wed, Feb 26, 2025 at 8:30 AM Nikita Travkin <nikita@trvn.ru> wrote:
>>
>> When converting to the overlay format, it was missed that "/" in the
>> overlay corresponds to the overlay's own root node and not the fragment
>> targeted to update root of the base dts, which should be "&{/}" instead.
>> This results in the cma node never actually being applied by libfdt.
>>
>> Fix the overlay to use correct target node.
>>
>> Fixes: 231c03c6119d ("arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Convert mezzanine riser to dtbo")
>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> ---
>>  arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
>> index ae256c713a36078afdadc67193f381a19ea8e5d3..254df3d518d8cbfb1082511f38e132435b7fdf59 100644
>> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
>> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
>> @@ -9,7 +9,7 @@
>>  #include <dt-bindings/clock/qcom,camcc-sm8250.h>
>>  #include <dt-bindings/gpio/gpio.h>
>>
>> -/ {
>> +&{/} {
>>         reserved-memory {
> 
> IMO, this should be applied to the /reserved-memory node rather than

Hm, considering pretty much no qcom dtb will be without reserved-memory,
you're right...

> the root node. Though I also think using overlays to set CMA size is
> questionable. It's much easier to change the kernel command line than
> apply an overlay.

...and deleting the node altogether would be effectively keeping the
existing behavior, which, I just now realized, was introduced in an
extra commit after the conversion (which I assumed was the cause of
the mistake) so my Fixes: for both commits are wrong.

I think I will leave it to Bryan to decide whether this should be
fixed or original commit to be reverted.

> 
>>                 linux,cma {
>>                         compatible = "shared-dma-pool";
>>
>> --
>> 2.48.1
>>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
index ae256c713a36078afdadc67193f381a19ea8e5d3..254df3d518d8cbfb1082511f38e132435b7fdf59 100644
--- a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dtso
@@ -9,7 +9,7 @@ 
 #include <dt-bindings/clock/qcom,camcc-sm8250.h>
 #include <dt-bindings/gpio/gpio.h>
 
-/ {
+&{/} {
 	reserved-memory {
 		linux,cma {
 			compatible = "shared-dma-pool";