arm64: dts: fast models: Fix FVP video RAM size
Subsystems (2)
PATCH 1/1 arm64: dts: fast models: Fix FVP video RAM size
According to the Fast Models Reference Manual, FVP has 32MB of video RAM starting at physical address 0x18000000, but the DTS only declares 8MB. Fix that.
--- arch/arm64/boot/dts/arm/fvp-base-revc.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/arm/fvp-base-revc.dts +2 -2
@@ -105,9 +105,9 @@ reserved-memory { /* Chipselect 2,00000000 is physically at 0x18000000 */ vram: vram@18000000 { - /* 8 MB of designated video RAM */ + /* 32 MB of designated video RAM */ compatible = "shared-dma-pool"; - reg = <0x00000000 0x18000000 0 0x00800000>; + reg = <0x00000000 0x18000000 0 0x02000000>; no-map; }; };
Signature · 7 lines
2.26.1.301.g55bc3eb7cb9-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 4 lines · Peter Collingbourne
According to the Fast Models Reference Manual, FVP has 32MB of video RAM starting at physical address
0x18000000, but the DTS only declares 8MB. Fix that.
I may have sent this out too soon. After further debugging I discovered that Android requires more than the designated 32MB of video RAM.
It turns out that FVP supports DMA between the graphics device and DRAM. Therefore I propose to change the DTS for FVP to use a dynamic allocation of 256MB of DRAM for video RAM. I will send a patch to do this shortly. With that (together with [1]) I can boot Android with graphical output over DRM.
Peter
[1] https://patchwork.kernel.org/patch/11506759/
Peter
Quoted 23 lines
Signed-off-by Peter Collingbourne <[email protected]>--- arch/arm64/boot/dts/arm/fvp-base-revc.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/arm/fvp-base-revc.dts +2
-3@@ -105,9 +105,9 @@ reserved-memory { /* Chipselect 2,00000000 is physically at 0x18000000 */ vram: vram@18000000 { - /* 8 MB of designated video RAM */ + /* 32 MB of designated video RAM */ compatible = "shared-dma-pool"; - reg = <0x00000000 0x18000000 0 0x00800000>; + reg = <0x00000000 0x18000000 0 0x02000000>; no-map; }; }; --
Quoted 2 lines
2.26.1.301.g55bc3eb7cb9-goog
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 arm64: dts: fast models: Switch to dynamically allocated VRAM
According to the Fast Models Reference Manual, FVP has 32MB of video RAM, However, even 32MB is not sufficient for some applications, such as Android, which requires around 100-200MB when textures are allocated in VRAM via DRM.
FVP supports DMA between DRAM and the graphics device. Therefore, use a dynamically allocated region of reserved memory to provide a sufficient amount of video RAM. The allocation is of size 256MB, which ought to be enough for anyone.
Although this means that the designated VRAM ends up being left unused, FVP allows the size of DRAM to be configurable, so this should not be a problem in practice.
--- arch/arm64/boot/dts/arm/fvp-base-revc.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/arm/fvp-base-revc.dts +2 -4
@@ -103,11 +103,9 @@ reserved-memory { #size-cells = <2>; ranges; - /* Chipselect 2,00000000 is physically at 0x18000000 */ - vram: vram@18000000 { - /* 8 MB of designated video RAM */ + vram: vram { compatible = "shared-dma-pool"; - reg = <0x00000000 0x18000000 0 0x00800000>; + size = <0 0x10000000>; no-map; }; };
Signature · 7 lines
2.26.2.303.gf8c07b1a785-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM
Quoted 24 lines · Peter Collingbourne
According to the Fast Models Reference Manual, FVP has 32MB of video RAM, However, even 32MB is not sufficient for some applications, such as Android, which requires around 100-200MB when textures are allocated in VRAM via DRM.
FVP supports DMA between DRAM and the graphics device. Therefore, use a dynamically allocated region of reserved memory to provide a sufficient amount of video RAM. The allocation is of size 256MB, which ought to be enough for anyone.
Although this means that the designated VRAM ends up being left unused, FVP allows the size of DRAM to be configurable, so this should not be a problem in practice.
Signed-off-by Peter Collingbourne <[email protected]>--- arch/arm64/boot/dts/arm/fvp-base-revc.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)arch/arm64/boot/dts/arm/fvp-base-revc.dts +0
-0
arch/arm64/boot/dts/arm/fvp-base-revc.dts reserved-memory { · line 110
Quoted 9 lines
arch/arm64/boot/dts/arm/fvp-base-revc.dts +1
-4@@ -103,11 +103,9 @@ reserved-memory { #size-cells = <2>; ranges; - /* Chipselect 2,00000000 is physically at 0x18000000 */ - vram: vram@18000000 { - /* 8 MB of designated video RAM */ + vram: vram { compatible = "shared-dma-pool"; - reg = <0x00000000 0x18000000 0 0x00800000>;
I am not sure if it is valid to just specify the size without the reg field. The reverse is valid IIUC. Moreover I assume the idea is to populate the reg field based on the model parameters ? If so, who can't the reg and size field be modified instead of deleting here and adding it elsewhere.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 10 lines · Peter Collingbourne
Quoted 4 lines · Peter Collingbourne
According to the Fast Models Reference Manual, FVP has 32MB of video RAM starting at physical address
0x18000000, but the DTS only declares 8MB. Fix that.I may have sent this out too soon. After further debugging I discovered that Android requires more than the designated 32MB of video RAM.
Quoted 5 lines
It turns out that FVP supports DMA between the graphics device and DRAM. Therefore I propose to change the DTS for FVP to use a dynamic allocation of 256MB of DRAM for video RAM. I will send a patch to do this shortly. With that (together with [1]) I can boot Android with graphical output over DRM.
Hey that is quite an accomplishment :D
When I started to convert the ARM Reference designs to use the DRM PL111 driver we didn't know if we'd find any real-world use case for it other than being a good role model and running some old boards.
Now it is suddenly really useful.
Thanks!
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel