All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: fast models: Fix FVP video RAM size
@ 2020-04-21 23:14 Peter Collingbourne
  2020-04-23 23:30 ` Peter Collingbourne
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Collingbourne @ 2020-04-21 23:14 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Will Deacon, Kevin Brodsky, Peter Collingbourne, Linux ARM

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.

Signed-off-by: Peter Collingbourne <pcc@google.com>
---
 arch/arm64/boot/dts/arm/fvp-base-revc.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
index 66381d89c1ce..72c018188c40 100644
--- a/arch/arm64/boot/dts/arm/fvp-base-revc.dts
+++ b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
@@ -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;
 		};
 	};
-- 
2.26.1.301.g55bc3eb7cb9-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: fast models: Fix FVP video RAM size
  2020-04-21 23:14 [PATCH] arm64: dts: fast models: Fix FVP video RAM size Peter Collingbourne
@ 2020-04-23 23:30 ` Peter Collingbourne
  2020-04-23 23:49   ` [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM Peter Collingbourne
  2020-04-28 13:06   ` [PATCH] arm64: dts: fast models: Fix FVP video RAM size Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Collingbourne @ 2020-04-23 23:30 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Kevin Brodsky, Will Deacon, Linux ARM

On Tue, Apr 21, 2020 at 4:14 PM Peter Collingbourne <pcc@google.com> wrote:
>
> 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
>
> Signed-off-by: Peter Collingbourne <pcc@google.com>
> ---
>  arch/arm64/boot/dts/arm/fvp-base-revc.dts | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> index 66381d89c1ce..72c018188c40 100644
> --- a/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> +++ b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> @@ -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;
>                 };
>         };
> --
> 2.26.1.301.g55bc3eb7cb9-goog
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM
  2020-04-23 23:30 ` Peter Collingbourne
@ 2020-04-23 23:49   ` Peter Collingbourne
  2020-04-24 13:20     ` Sudeep Holla
  2020-04-28 13:06   ` [PATCH] arm64: dts: fast models: Fix FVP video RAM size Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Collingbourne @ 2020-04-23 23:49 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Will Deacon, Kevin Brodsky, Peter Collingbourne, Linux ARM

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 <pcc@google.com>
---
 arch/arm64/boot/dts/arm/fvp-base-revc.dts | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
index 66381d89c1ce..57641f16f22e 100644
--- a/arch/arm64/boot/dts/arm/fvp-base-revc.dts
+++ b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
@@ -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;
 		};
 	};
-- 
2.26.2.303.gf8c07b1a785-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM
  2020-04-23 23:49   ` [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM Peter Collingbourne
@ 2020-04-24 13:20     ` Sudeep Holla
  0 siblings, 0 replies; 5+ messages in thread
From: Sudeep Holla @ 2020-04-24 13:20 UTC (permalink / raw)
  To: Peter Collingbourne
  Cc: Linus Walleij, Kevin Brodsky, Will Deacon, Linux ARM, Sudeep Holla

On Thu, Apr 23, 2020 at 04:49:03PM -0700, Peter Collingbourne wrote:
> 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 <pcc@google.com>
> ---
>  arch/arm64/boot/dts/arm/fvp-base-revc.dts | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/arm/fvp-base-revc.dts b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> index 66381d89c1ce..57641f16f22e 100644
> --- a/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> +++ b/arch/arm64/boot/dts/arm/fvp-base-revc.dts
> @@ -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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: fast models: Fix FVP video RAM size
  2020-04-23 23:30 ` Peter Collingbourne
  2020-04-23 23:49   ` [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM Peter Collingbourne
@ 2020-04-28 13:06   ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2020-04-28 13:06 UTC (permalink / raw)
  To: Peter Collingbourne; +Cc: Kevin Brodsky, Will Deacon, Linux ARM

On Fri, Apr 24, 2020 at 1:30 AM Peter Collingbourne <pcc@google.com> wrote:
> On Tue, Apr 21, 2020 at 4:14 PM Peter Collingbourne <pcc@google.com> wrote:
> >
> > 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.

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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-28 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 23:14 [PATCH] arm64: dts: fast models: Fix FVP video RAM size Peter Collingbourne
2020-04-23 23:30 ` Peter Collingbourne
2020-04-23 23:49   ` [PATCH] arm64: dts: fast models: Switch to dynamically allocated VRAM Peter Collingbourne
2020-04-24 13:20     ` Sudeep Holla
2020-04-28 13:06   ` [PATCH] arm64: dts: fast models: Fix FVP video RAM size Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.