diff mbox series

[v2,1/7] dt-bindings: display: simple-framebuffer: Support system memory framebuffers

Message ID 20221007124946.406808-2-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/simpledrm: Support system memory framebuffers | expand

Commit Message

Thierry Reding Oct. 7, 2022, 12:49 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

In order to support framebuffers residing in system memory, allow the
memory-region property to override the framebuffer memory specification
in the "reg" property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 .../devicetree/bindings/display/simple-framebuffer.yaml      | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Rob Herring (Arm) Oct. 7, 2022, 2 p.m. UTC | #1
On Fri, 07 Oct 2022 14:49:40 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> In order to support framebuffers residing in system memory, allow the
> memory-region property to override the framebuffer memory specification
> in the "reg" property.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  .../devicetree/bindings/display/simple-framebuffer.yaml      | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Thomas Zimmermann Oct. 10, 2022, 9:37 a.m. UTC | #2
Hi

Am 07.10.22 um 14:49 schrieb Thierry Reding:
> From: Thierry Reding <treding@nvidia.com>
> 
> In order to support framebuffers residing in system memory, allow the
> memory-region property to override the framebuffer memory specification
> in the "reg" property.

What happens if both properties are present and they disagree with each 
other?

I understand that the framebuffer is behind 'memory-region', but does 
'reg' still contain device memory?  Do we need to acquire ownership from 
within the driver?

Best regards
Thomas

> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>   .../devicetree/bindings/display/simple-framebuffer.yaml      | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> index dd64f70b5014..3e9857eb002e 100644
> --- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> +++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
> @@ -63,6 +63,11 @@ properties:
>     reg:
>       description: Location and size of the framebuffer memory
>   
> +  memory-region:
> +    maxItems: 1
> +    description: Phandle to a node describing the memory to be used for the
> +      framebuffer. If present, overrides the "reg" property (if one exists).
> +
>     clocks:
>       description: List of clocks used by the framebuffer.
>
Thierry Reding Oct. 17, 2022, 2:38 p.m. UTC | #3
On Mon, Oct 10, 2022 at 11:37:37AM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 07.10.22 um 14:49 schrieb Thierry Reding:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > In order to support framebuffers residing in system memory, allow the
> > memory-region property to override the framebuffer memory specification
> > in the "reg" property.
> 
> What happens if both properties are present and they disagree with each
> other?
> 
> I understand that the framebuffer is behind 'memory-region', but does 'reg'
> still contain device memory?  Do we need to acquire ownership from within
> the driver?

The intention is for both memory-region and reg properties to be
mutually exclusive. I can't think of a scenario where you would need or
want both.

Note also the documentation for the memory-region property:

|  memory-region:
|    maxItems: 1
|    description: Phandle to a node describing the memory to be used for the
|      framebuffer. If present, overrides the "reg" property (if one exists).

Thierry
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
index dd64f70b5014..3e9857eb002e 100644
--- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
@@ -63,6 +63,11 @@  properties:
   reg:
     description: Location and size of the framebuffer memory
 
+  memory-region:
+    maxItems: 1
+    description: Phandle to a node describing the memory to be used for the
+      framebuffer. If present, overrides the "reg" property (if one exists).
+
   clocks:
     description: List of clocks used by the framebuffer.