2023-01-21 16:25:31

by Rayyan Ansari

[permalink] [raw]
Subject: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

Signed-off-by: Rayyan Ansari <[email protected]>
---
.../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
index dd64f70b5014..eb33bfd805db 100644
--- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
+++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml
@@ -106,6 +106,14 @@ properties:
- x2r10g10b10
- x8r8g8b8

+ width-mm:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Physical width of the display in millimetres
+
+ height-mm:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Physical height of the display in millimetres
+
display:
$ref: /schemas/types.yaml#/definitions/phandle
description: Primary display hardware node
--
2.39.0


2023-01-22 15:31:48

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties


On Sat, 21 Jan 2023 15:35:44 +0000, Rayyan Ansari wrote:
> Signed-off-by: Rayyan Ansari <[email protected]>
> ---
> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/simple-framebuffer.yaml: properties:width-mm: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/simple-framebuffer.yaml: properties:height-mm: '$ref' should not be valid under {'const': '$ref'}
hint: Standard unit suffix properties don't need a type $ref
from schema $id: http://devicetree.org/meta-schemas/core.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2023-01-22 15:37:09

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
>

Why do you need this change?

The 'simple-framebuffer' contains data on how the bootloader
configured the display. The bootloader doesn't configure the display
size, so this information doesn't belong here. The information should
already be in the panel node, so also no point in duplicating it here.

> Signed-off-by: Rayyan Ansari <[email protected]>
> ---
> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)

2023-01-22 15:43:22

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

Hi,

On 1/22/23 16:36, Rob Herring wrote:
> On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
>>
>
> Why do you need this change?
>
> The 'simple-framebuffer' contains data on how the bootloader
> configured the display. The bootloader doesn't configure the display
> size, so this information doesn't belong here. The information should
> already be in the panel node, so also no point in duplicating it here.

The idea is that early boot code which uses the simplefb node (no more
complex display driver loaded yet) knows the panel's DPI so that it can
decide if hi-dpi rendering / scaling is necessary or not.

This definitely is a useful feature to have.

I guess that for dt systems an alternative approach could be to
add a link to the panel node to the simplefb dt-node.

Regards,

Hans




2023-01-22 17:25:47

by Rayyan Ansari

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On 22/01/2023 15:36, Rob Herring wrote:
> On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
>>
>
> Why do you need this change?
>
> The 'simple-framebuffer' contains data on how the bootloader
> configured the display. The bootloader doesn't configure the display
> size, so this information doesn't belong here. The information should
> already be in the panel node, so also no point in duplicating it here.
>
>> Signed-off-by: Rayyan Ansari <[email protected]>
>> ---
>> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
>> 1 file changed, 8 insertions(+)

Hi Rob,

There is the usecase that Hans has mentioned, but I have also mentioned
another usecase previously.

Adding the width-mm and height-mm properties allows user interfaces such
as Phosh (https://puri.sm/posts/phosh-overview/) to scale correctly to
the screen. In my case, a panel node is not available and the
aforementioned interface is in fact running on the SimpleDRM driver
(which binds to the simple-framebuffer device).

Here is the device I have tested this patch on, the Lumia 735 phone:
https://wiki.postmarketos.org/images/c/c3/Lumia_735_Phosh.png
Without this patch, this would appear quite small on the screen.

See https://patchwork.freedesktop.org/patch/519107/?series=113053&rev=1
for some background info about this patch.

Regards,
--
Rayyan Ansari
https://ansari.sh


2023-01-22 17:28:37

by Rayyan Ansari

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On 22/01/2023 15:31, Rob Herring wrote:
>
> On Sat, 21 Jan 2023 15:35:44 +0000, Rayyan Ansari wrote:
>> Signed-off-by: Rayyan Ansari <[email protected]>
>> ---
>> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/simple-framebuffer.yaml: properties:width-mm: '$ref' should not be valid under {'const': '$ref'}
> hint: Standard unit suffix properties don't need a type $ref
> from schema $id: http://devicetree.org/meta-schemas/core.yaml#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/simple-framebuffer.yaml: properties:height-mm: '$ref' should not be valid under {'const': '$ref'}
> hint: Standard unit suffix properties don't need a type $ref
> from schema $id: http://devicetree.org/meta-schemas/core.yaml#
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>

I will remove the $ref property in v2, but I will also wait if there is
any other feedback to address.

--
Rayyan Ansari
https://ansari.sh


2023-01-23 17:53:48

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On Sun, Jan 22, 2023 at 05:25:38PM +0000, Rayyan Ansari wrote:
> On 22/01/2023 15:36, Rob Herring wrote:
> > On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
> > >
> >
> > Why do you need this change?
> >
> > The 'simple-framebuffer' contains data on how the bootloader
> > configured the display. The bootloader doesn't configure the display
> > size, so this information doesn't belong here. The information should
> > already be in the panel node, so also no point in duplicating it here.
> >
> > > Signed-off-by: Rayyan Ansari <[email protected]>
> > > ---
> > > .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
> > > 1 file changed, 8 insertions(+)
>
> Hi Rob,
>
> There is the usecase that Hans has mentioned, but I have also mentioned
> another usecase previously.
>
> Adding the width-mm and height-mm properties allows user interfaces such as
> Phosh (https://puri.sm/posts/phosh-overview/) to scale correctly to the
> screen. In my case, a panel node is not available and the aforementioned
> interface is in fact running on the SimpleDRM driver (which binds to the
> simple-framebuffer device).

Why is the panel node not available? Why not add it? Presumably it is
not there because you aren't (yet) using the simple-panel driver (and
others that would need). But presumably you will eventually as I'd
imagine turning the screen off and back on might be a desired feature.

So why add a temporary DT property that's tied to your *current* kernel?
The DT should not be tightly coupled to the kernel.

Rob

2023-01-24 22:19:18

by Rayyan Ansari

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On 23/01/2023 17:53, Rob Herring wrote:
> On Sun, Jan 22, 2023 at 05:25:38PM +0000, Rayyan Ansari wrote:
>> On 22/01/2023 15:36, Rob Herring wrote:
>>> On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
>>>>
>>>
>>> Why do you need this change?
>>>
>>> The 'simple-framebuffer' contains data on how the bootloader
>>> configured the display. The bootloader doesn't configure the display
>>> size, so this information doesn't belong here. The information should
>>> already be in the panel node, so also no point in duplicating it here.
>>>
>>>> Signed-off-by: Rayyan Ansari <[email protected]>
>>>> ---
>>>> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
>>>> 1 file changed, 8 insertions(+)
>>
>> Hi Rob,
>>
>> There is the usecase that Hans has mentioned, but I have also mentioned
>> another usecase previously.
>>
>> Adding the width-mm and height-mm properties allows user interfaces such as
>> Phosh (https://puri.sm/posts/phosh-overview/) to scale correctly to the
>> screen. In my case, a panel node is not available and the aforementioned
>> interface is in fact running on the SimpleDRM driver (which binds to the
>> simple-framebuffer device).
>
> Why is the panel node not available? Why not add it? Presumably it is
> not there because you aren't (yet) using the simple-panel driver (and
> others that would need). But presumably you will eventually as I'd
> imagine turning the screen off and back on might be a desired feature.

It requires more than using the simple-panel driver: first the SoC side
display hardware needs to be brought up, then a panel driver that
implements the proper DCS initialisation sequence needs to be written
(which is currently not fully known).

>
> So why add a temporary DT property that's tied to your *current* kernel? > The DT should not be tightly coupled to the kernel.

I'm not sure what you mean by it being "tightly coupled" to the kernel.

>
> Rob

--
Rayyan Ansari
https://ansari.sh


2023-01-24 22:41:24

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

> Date: Tue, 24 Jan 2023 22:19:09 +0000
> From: Rayyan Ansari <[email protected]>
>
> On 23/01/2023 17:53, Rob Herring wrote:
> > On Sun, Jan 22, 2023 at 05:25:38PM +0000, Rayyan Ansari wrote:
> >> On 22/01/2023 15:36, Rob Herring wrote:
> >>> On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
> >>>>
> >>>
> >>> Why do you need this change?
> >>>
> >>> The 'simple-framebuffer' contains data on how the bootloader
> >>> configured the display. The bootloader doesn't configure the display
> >>> size, so this information doesn't belong here. The information should
> >>> already be in the panel node, so also no point in duplicating it here.
> >>>
> >>>> Signed-off-by: Rayyan Ansari <[email protected]>
> >>>> ---
> >>>> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
> >>>> 1 file changed, 8 insertions(+)
> >>
> >> Hi Rob,
> >>
> >> There is the usecase that Hans has mentioned, but I have also mentioned
> >> another usecase previously.
> >>
> >> Adding the width-mm and height-mm properties allows user interfaces such as
> >> Phosh (https://puri.sm/posts/phosh-overview/) to scale correctly to the
> >> screen. In my case, a panel node is not available and the aforementioned
> >> interface is in fact running on the SimpleDRM driver (which binds to the
> >> simple-framebuffer device).
> >
> > Why is the panel node not available? Why not add it? Presumably it is
> > not there because you aren't (yet) using the simple-panel driver (and
> > others that would need). But presumably you will eventually as I'd
> > imagine turning the screen off and back on might be a desired feature.
>
> It requires more than using the simple-panel driver: first the SoC side
> display hardware needs to be brought up, then a panel driver that
> implements the proper DCS initialisation sequence needs to be written
> (which is currently not fully known).

You don't really need a driver. You can just lookup the panel node
from your simple-framebuffer driver and get the values of the
properties there.

2023-01-25 07:28:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] dt-bindings: display: simple-framebuffer: Document physical width and height properties

On 24/01/2023 23:19, Rayyan Ansari wrote:
> On 23/01/2023 17:53, Rob Herring wrote:
>> On Sun, Jan 22, 2023 at 05:25:38PM +0000, Rayyan Ansari wrote:
>>> On 22/01/2023 15:36, Rob Herring wrote:
>>>> On Sat, Jan 21, 2023 at 9:36 AM Rayyan Ansari <[email protected]> wrote:
>>>>>
>>>>
>>>> Why do you need this change?
>>>>
>>>> The 'simple-framebuffer' contains data on how the bootloader
>>>> configured the display. The bootloader doesn't configure the display
>>>> size, so this information doesn't belong here. The information should
>>>> already be in the panel node, so also no point in duplicating it here.
>>>>
>>>>> Signed-off-by: Rayyan Ansari <[email protected]>
>>>>> ---
>>>>> .../devicetree/bindings/display/simple-framebuffer.yaml | 8 ++++++++
>>>>> 1 file changed, 8 insertions(+)
>>>
>>> Hi Rob,
>>>
>>> There is the usecase that Hans has mentioned, but I have also mentioned
>>> another usecase previously.
>>>
>>> Adding the width-mm and height-mm properties allows user interfaces such as
>>> Phosh (https://puri.sm/posts/phosh-overview/) to scale correctly to the
>>> screen. In my case, a panel node is not available and the aforementioned
>>> interface is in fact running on the SimpleDRM driver (which binds to the
>>> simple-framebuffer device).
>>
>> Why is the panel node not available? Why not add it? Presumably it is
>> not there because you aren't (yet) using the simple-panel driver (and
>> others that would need). But presumably you will eventually as I'd
>> imagine turning the screen off and back on might be a desired feature.
>
> It requires more than using the simple-panel driver: first the SoC side
> display hardware needs to be brought up, then a panel driver that
> implements the proper DCS initialisation sequence needs to be written
> (which is currently not fully known).
>
>>
>> So why add a temporary DT property that's tied to your *current* kernel? > The DT should not be tightly coupled to the kernel.
>
> I'm not sure what you mean by it being "tightly coupled" to the kernel.

It means that you used current Linux driver support (or lack) for some
hardware as an argument for bindings. If you add later the driver, the
bindings should be changed? Answer is: not. Bindings should be
independent of Linux drivers, thus whatever kernel is missing now, is
not an argument in favor of this property.

Best regards,
Krzysztof