[7/7] dt-bindings: display: add panel-timing property to sitronix,st7789v

Message ID 20230314115644.3775169-8-gerald.loacker@wolfvision.net
State New
Headers
Series Add timing override to sitronix,st7789v |

Commit Message

Gerald Loacker March 14, 2023, 11:56 a.m. UTC
  The sitronix-st7789v driver now considers the panel-timing property.
Add the property to the documentation.

Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
---
 .../display/panel/sitronix,st7789v.yaml         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
  

Comments

Krzysztof Kozlowski March 15, 2023, 7:51 a.m. UTC | #1
On 14/03/2023 12:56, Gerald Loacker wrote:
> The sitronix-st7789v driver now considers the panel-timing property.
> Add the property to the documentation.
> 
> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
  
Rob Herring March 16, 2023, 9:57 p.m. UTC | #2
On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
> The sitronix-st7789v driver now considers the panel-timing property.

I read the patch for that and still don't know 'why'. Commit messages 
should answer why.

> Add the property to the documentation.

We generally don't put timings in DT for panels. Why is this one 
special?

> 
> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
> ---
>  .../display/panel/sitronix,st7789v.yaml         | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
> index ed942cd3620f..8810f123dedf 100644
> --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
> @@ -21,6 +21,7 @@ properties:
>    reset-gpios: true
>    power-supply: true
>    backlight: true
> +  panel-timing: true
>    port: true
>    rotation: true
>  
> @@ -54,6 +55,22 @@ examples:
>              spi-cpol;
>              spi-cpha;
>  
> +            panel-timing {
> +                clock-frequency = <7000000>;
> +                hactive = <240>;
> +                vactive = <320>;
> +                hfront-porch = <38>;
> +                hback-porch = <10>;
> +                hsync-len = <10>;
> +                vfront-porch = <8>;
> +                vback-porch = <4>;
> +                vsync-len = <4>;
> +                hsync-active = <1>;
> +                vsync-active = <1>;
> +                de-active = <1>;
> +                pixelclk-active = <1>;
> +            };
> +
>              port {
>                  panel_input: endpoint {
>                      remote-endpoint = <&tcon0_out_panel>;
> -- 
> 2.37.2
>
  
Michael Riesch March 16, 2023, 10:29 p.m. UTC | #3
Hi Rob,

On 3/16/23 22:57, Rob Herring wrote:
> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
>> The sitronix-st7789v driver now considers the panel-timing property.
> 
> I read the patch for that and still don't know 'why'. Commit messages 
> should answer why.
> 
>> Add the property to the documentation.
> 
> We generally don't put timings in DT for panels. Why is this one 
> special?

For now, having the timings in the device tree allows for setting the
hsync/vsync/de polarity.

As a next step, we aim to implement the partial mode feature of this
panel. It is possible to use only a certain region of the panel, which
is helpful e.g., when a part of the panel is occluded and should not be
considered by DRM. We thought that this could be specified as timing in DT.

(The hactive and vactive properties serve as dimensions of this certain
region, of course. We still need to specify somehow the position of the
region. Maybe with additional properties hactive-start and vactive-start?)

What do you think about that?

Thanks and best regards,
Michael

> 
>>
>> Signed-off-by: Gerald Loacker <gerald.loacker@wolfvision.net>
>> ---
>>  .../display/panel/sitronix,st7789v.yaml         | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
>> index ed942cd3620f..8810f123dedf 100644
>> --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
>> +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
>> @@ -21,6 +21,7 @@ properties:
>>    reset-gpios: true
>>    power-supply: true
>>    backlight: true
>> +  panel-timing: true
>>    port: true
>>    rotation: true
>>  
>> @@ -54,6 +55,22 @@ examples:
>>              spi-cpol;
>>              spi-cpha;
>>  
>> +            panel-timing {
>> +                clock-frequency = <7000000>;
>> +                hactive = <240>;
>> +                vactive = <320>;
>> +                hfront-porch = <38>;
>> +                hback-porch = <10>;
>> +                hsync-len = <10>;
>> +                vfront-porch = <8>;
>> +                vback-porch = <4>;
>> +                vsync-len = <4>;
>> +                hsync-active = <1>;
>> +                vsync-active = <1>;
>> +                de-active = <1>;
>> +                pixelclk-active = <1>;
>> +            };
>> +
>>              port {
>>                  panel_input: endpoint {
>>                      remote-endpoint = <&tcon0_out_panel>;
>> -- 
>> 2.37.2
>>
  
Maxime Ripard March 29, 2023, 9:16 a.m. UTC | #4
On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
> Hi Rob,
> 
> On 3/16/23 22:57, Rob Herring wrote:
> > On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
> >> The sitronix-st7789v driver now considers the panel-timing property.
> > 
> > I read the patch for that and still don't know 'why'. Commit messages 
> > should answer why.
> > 
> >> Add the property to the documentation.
> > 
> > We generally don't put timings in DT for panels. Why is this one 
> > special?
> 
> For now, having the timings in the device tree allows for setting the
> hsync/vsync/de polarity.
> 
> As a next step, we aim to implement the partial mode feature of this
> panel. It is possible to use only a certain region of the panel, which
> is helpful e.g., when a part of the panel is occluded and should not be
> considered by DRM. We thought that this could be specified as timing in DT.
>
> (The hactive and vactive properties serve as dimensions of this certain
> region, of course. We still need to specify somehow the position of the
> region. Maybe with additional properties hactive-start and vactive-start?)
> 
> What do you think about that?

I don't see why we would need the device tree to support that. What you
described is essentially what overscan is for HDMI/analog output, and we
already have everything to deal with overscan properly in KMS.

Maxime
  
Michael Riesch March 29, 2023, 10:08 a.m. UTC | #5
Hi Maxime,

On 3/29/23 11:16, Maxime Ripard wrote:
> On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
>> Hi Rob,
>>
>> On 3/16/23 22:57, Rob Herring wrote:
>>> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
>>>> The sitronix-st7789v driver now considers the panel-timing property.
>>>
>>> I read the patch for that and still don't know 'why'. Commit messages 
>>> should answer why.
>>>
>>>> Add the property to the documentation.
>>>
>>> We generally don't put timings in DT for panels. Why is this one 
>>> special?
>>
>> For now, having the timings in the device tree allows for setting the
>> hsync/vsync/de polarity.
>>
>> As a next step, we aim to implement the partial mode feature of this
>> panel. It is possible to use only a certain region of the panel, which
>> is helpful e.g., when a part of the panel is occluded and should not be
>> considered by DRM. We thought that this could be specified as timing in DT.
>>
>> (The hactive and vactive properties serve as dimensions of this certain
>> region, of course. We still need to specify somehow the position of the
>> region. Maybe with additional properties hactive-start and vactive-start?)
>>
>> What do you think about that?
> 
> I don't see why we would need the device tree to support that. What you
> described is essentially what overscan is for HDMI/analog output, and we
> already have everything to deal with overscan properly in KMS.

Thanks for your response, but I am afraid I don't quite follow.

How are we supposed to expose control over the hsync/vsync/data enable
polarity? I only know that the display controller and the panel need to
agree on a setting that works for both. What is the canonical way to do
this?

A different question is the partial mode, for which (IIUC) you suggest
the overscan feature. As I have never heard of this before, it would be
very nice if you could point me to some examples. Where would the
effective resolution be set in this case?

We thought that this should enter the device tree as in our case the
display is partially occluded due to hardware constraints. For the user
there is only one reasonable configuration.

Alternatively, we could follow a different approach and handle a
separate compatible in the panel driver. Would this be acceptable for
mainline inclusion?

Best regards,
Michael
  
Maxime Ripard March 30, 2023, 2:58 p.m. UTC | #6
On Wed, Mar 29, 2023 at 12:08:50PM +0200, Michael Riesch wrote:
> On 3/29/23 11:16, Maxime Ripard wrote:
> > On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
> >> Hi Rob,
> >>
> >> On 3/16/23 22:57, Rob Herring wrote:
> >>> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
> >>>> The sitronix-st7789v driver now considers the panel-timing property.
> >>>
> >>> I read the patch for that and still don't know 'why'. Commit messages 
> >>> should answer why.
> >>>
> >>>> Add the property to the documentation.
> >>>
> >>> We generally don't put timings in DT for panels. Why is this one 
> >>> special?
> >>
> >> For now, having the timings in the device tree allows for setting the
> >> hsync/vsync/de polarity.
> >>
> >> As a next step, we aim to implement the partial mode feature of this
> >> panel. It is possible to use only a certain region of the panel, which
> >> is helpful e.g., when a part of the panel is occluded and should not be
> >> considered by DRM. We thought that this could be specified as timing in DT.
> >>
> >> (The hactive and vactive properties serve as dimensions of this certain
> >> region, of course. We still need to specify somehow the position of the
> >> region. Maybe with additional properties hactive-start and vactive-start?)
> >>
> >> What do you think about that?
> > 
> > I don't see why we would need the device tree to support that. What you
> > described is essentially what overscan is for HDMI/analog output, and we
> > already have everything to deal with overscan properly in KMS.
> 
> Thanks for your response, but I am afraid I don't quite follow.
> 
> How are we supposed to expose control over the hsync/vsync/data enable
> polarity? I only know that the display controller and the panel need to
> agree on a setting that works for both. What is the canonical way to do
> this?

So typically, it would come from the panel datasheet and would thus be
exposed by the panel driver. st7789v is not a panel itself but a (pretty
flexible) panel controller so it's not fixed and I don't think we have a
good answer to that (yet).

> A different question is the partial mode, for which (IIUC) you suggest
> the overscan feature. As I have never heard of this before, it would be
> very nice if you could point me to some examples. Where would the
> effective resolution be set in this case?

So, back when CRT were a thing the edges of the tube were masked by the
plastic case. HDMI inherited from that and that's why you still have
some UI on some devices (like consoles) to setup the active area of the
display.

The underlying issue is exactly what you describe: the active area is
larger than what the plastic case allows to see. I don't think anyone
ever had the usecase you have, but it would be the right solution to me
to solve essentially the same issue the same way we do on other output
types.

Maxime
  
Michael Riesch March 31, 2023, 9:36 a.m. UTC | #7
Hi Maxime,

On 3/30/23 16:58, Maxime Ripard wrote:
> On Wed, Mar 29, 2023 at 12:08:50PM +0200, Michael Riesch wrote:
>> On 3/29/23 11:16, Maxime Ripard wrote:
>>> On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
>>>> Hi Rob,
>>>>
>>>> On 3/16/23 22:57, Rob Herring wrote:
>>>>> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
>>>>>> The sitronix-st7789v driver now considers the panel-timing property.
>>>>>
>>>>> I read the patch for that and still don't know 'why'. Commit messages 
>>>>> should answer why.
>>>>>
>>>>>> Add the property to the documentation.
>>>>>
>>>>> We generally don't put timings in DT for panels. Why is this one 
>>>>> special?
>>>>
>>>> For now, having the timings in the device tree allows for setting the
>>>> hsync/vsync/de polarity.
>>>>
>>>> As a next step, we aim to implement the partial mode feature of this
>>>> panel. It is possible to use only a certain region of the panel, which
>>>> is helpful e.g., when a part of the panel is occluded and should not be
>>>> considered by DRM. We thought that this could be specified as timing in DT.
>>>>
>>>> (The hactive and vactive properties serve as dimensions of this certain
>>>> region, of course. We still need to specify somehow the position of the
>>>> region. Maybe with additional properties hactive-start and vactive-start?)
>>>>
>>>> What do you think about that?
>>>
>>> I don't see why we would need the device tree to support that. What you
>>> described is essentially what overscan is for HDMI/analog output, and we
>>> already have everything to deal with overscan properly in KMS.
>>
>> Thanks for your response, but I am afraid I don't quite follow.
>>
>> How are we supposed to expose control over the hsync/vsync/data enable
>> polarity? I only know that the display controller and the panel need to
>> agree on a setting that works for both. What is the canonical way to do
>> this?
> 
> So typically, it would come from the panel datasheet and would thus be
> exposed by the panel driver. st7789v is not a panel itself but a (pretty
> flexible) panel controller so it's not fixed and I don't think we have a
> good answer to that (yet).

Then it seems to me that creating a panel driver (= st8879v panel
controller driver with a new compatible) would make sense. By
coincidence Sebastian Reichel has come up with this approach recently,
see
https://lore.kernel.org/dri-devel/20230317232355.1554980-1-sre@kernel.org/
We just need a way to resolve the conflicts between the two series.

Cc: Sebastian

>> A different question is the partial mode, for which (IIUC) you suggest
>> the overscan feature. As I have never heard of this before, it would be
>> very nice if you could point me to some examples. Where would the
>> effective resolution be set in this case?
> 
> So, back when CRT were a thing the edges of the tube were masked by the
> plastic case. HDMI inherited from that and that's why you still have
> some UI on some devices (like consoles) to setup the active area of the
> display.
> 
> The underlying issue is exactly what you describe: the active area is
> larger than what the plastic case allows to see. I don't think anyone
> ever had the usecase you have, but it would be the right solution to me
> to solve essentially the same issue the same way we do on other output
> types.

OK, we'll look into the overscan feature. But still the information
about the active area should come from the driver, right?

Thanks and best regards,
Michael
  
Maxime Ripard April 4, 2023, 4:04 p.m. UTC | #8
On Fri, Mar 31, 2023 at 11:36:43AM +0200, Michael Riesch wrote:
> On 3/30/23 16:58, Maxime Ripard wrote:
> > On Wed, Mar 29, 2023 at 12:08:50PM +0200, Michael Riesch wrote:
> >> On 3/29/23 11:16, Maxime Ripard wrote:
> >>> On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
> >>>> Hi Rob,
> >>>>
> >>>> On 3/16/23 22:57, Rob Herring wrote:
> >>>>> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
> >>>>>> The sitronix-st7789v driver now considers the panel-timing property.
> >>>>>
> >>>>> I read the patch for that and still don't know 'why'. Commit messages 
> >>>>> should answer why.
> >>>>>
> >>>>>> Add the property to the documentation.
> >>>>>
> >>>>> We generally don't put timings in DT for panels. Why is this one 
> >>>>> special?
> >>>>
> >>>> For now, having the timings in the device tree allows for setting the
> >>>> hsync/vsync/de polarity.
> >>>>
> >>>> As a next step, we aim to implement the partial mode feature of this
> >>>> panel. It is possible to use only a certain region of the panel, which
> >>>> is helpful e.g., when a part of the panel is occluded and should not be
> >>>> considered by DRM. We thought that this could be specified as timing in DT.
> >>>>
> >>>> (The hactive and vactive properties serve as dimensions of this certain
> >>>> region, of course. We still need to specify somehow the position of the
> >>>> region. Maybe with additional properties hactive-start and vactive-start?)
> >>>>
> >>>> What do you think about that?
> >>>
> >>> I don't see why we would need the device tree to support that. What you
> >>> described is essentially what overscan is for HDMI/analog output, and we
> >>> already have everything to deal with overscan properly in KMS.
> >>
> >> Thanks for your response, but I am afraid I don't quite follow.
> >>
> >> How are we supposed to expose control over the hsync/vsync/data enable
> >> polarity? I only know that the display controller and the panel need to
> >> agree on a setting that works for both. What is the canonical way to do
> >> this?
> > 
> > So typically, it would come from the panel datasheet and would thus be
> > exposed by the panel driver. st7789v is not a panel itself but a (pretty
> > flexible) panel controller so it's not fixed and I don't think we have a
> > good answer to that (yet).
> 
> Then it seems to me that creating a panel driver (= st8879v panel
> controller driver with a new compatible) would make sense.

I don't see why? The entire controller is the same except (maybe) for
some initialization data. Doing a new driver for it seems like taking
the easy way out?

> By coincidence Sebastian Reichel has come up with this approach
> recently, see
> https://lore.kernel.org/dri-devel/20230317232355.1554980-1-sre@kernel.org/
> We just need a way to resolve the conflicts between the two series.
> 
> Cc: Sebastian

That's not a new driver though? That approach looks sane to me.

> >> A different question is the partial mode, for which (IIUC) you suggest
> >> the overscan feature. As I have never heard of this before, it would be
> >> very nice if you could point me to some examples. Where would the
> >> effective resolution be set in this case?
> > 
> > So, back when CRT were a thing the edges of the tube were masked by the
> > plastic case. HDMI inherited from that and that's why you still have
> > some UI on some devices (like consoles) to setup the active area of the
> > display.
> > 
> > The underlying issue is exactly what you describe: the active area is
> > larger than what the plastic case allows to see. I don't think anyone
> > ever had the usecase you have, but it would be the right solution to me
> > to solve essentially the same issue the same way we do on other output
> > types.
> 
> OK, we'll look into the overscan feature. But still the information
> about the active area should come from the driver, right?

No, the userspace is in charge there.

Maxime
  
Michael Riesch April 4, 2023, 4:26 p.m. UTC | #9
Hi Maxime,

On 4/4/23 18:04, Maxime Ripard wrote:
> On Fri, Mar 31, 2023 at 11:36:43AM +0200, Michael Riesch wrote:
>> On 3/30/23 16:58, Maxime Ripard wrote:
>>> On Wed, Mar 29, 2023 at 12:08:50PM +0200, Michael Riesch wrote:
>>>> On 3/29/23 11:16, Maxime Ripard wrote:
>>>>> On Thu, Mar 16, 2023 at 11:29:53PM +0100, Michael Riesch wrote:
>>>>>> Hi Rob,
>>>>>>
>>>>>> On 3/16/23 22:57, Rob Herring wrote:
>>>>>>> On Tue, Mar 14, 2023 at 12:56:44PM +0100, Gerald Loacker wrote:
>>>>>>>> The sitronix-st7789v driver now considers the panel-timing property.
>>>>>>>
>>>>>>> I read the patch for that and still don't know 'why'. Commit messages 
>>>>>>> should answer why.
>>>>>>>
>>>>>>>> Add the property to the documentation.
>>>>>>>
>>>>>>> We generally don't put timings in DT for panels. Why is this one 
>>>>>>> special?
>>>>>>
>>>>>> For now, having the timings in the device tree allows for setting the
>>>>>> hsync/vsync/de polarity.
>>>>>>
>>>>>> As a next step, we aim to implement the partial mode feature of this
>>>>>> panel. It is possible to use only a certain region of the panel, which
>>>>>> is helpful e.g., when a part of the panel is occluded and should not be
>>>>>> considered by DRM. We thought that this could be specified as timing in DT.
>>>>>>
>>>>>> (The hactive and vactive properties serve as dimensions of this certain
>>>>>> region, of course. We still need to specify somehow the position of the
>>>>>> region. Maybe with additional properties hactive-start and vactive-start?)
>>>>>>
>>>>>> What do you think about that?
>>>>>
>>>>> I don't see why we would need the device tree to support that. What you
>>>>> described is essentially what overscan is for HDMI/analog output, and we
>>>>> already have everything to deal with overscan properly in KMS.
>>>>
>>>> Thanks for your response, but I am afraid I don't quite follow.
>>>>
>>>> How are we supposed to expose control over the hsync/vsync/data enable
>>>> polarity? I only know that the display controller and the panel need to
>>>> agree on a setting that works for both. What is the canonical way to do
>>>> this?
>>>
>>> So typically, it would come from the panel datasheet and would thus be
>>> exposed by the panel driver. st7789v is not a panel itself but a (pretty
>>> flexible) panel controller so it's not fixed and I don't think we have a
>>> good answer to that (yet).
>>
>> Then it seems to me that creating a panel driver (= st8879v panel
>> controller driver with a new compatible) would make sense.
> 
> I don't see why? The entire controller is the same except (maybe) for
> some initialization data. Doing a new driver for it seems like taking
> the easy way out?
> 
>> By coincidence Sebastian Reichel has come up with this approach
>> recently, see
>> https://lore.kernel.org/dri-devel/20230317232355.1554980-1-sre@kernel.org/
>> We just need a way to resolve the conflicts between the two series.
>>
>> Cc: Sebastian
> 
> That's not a new driver though? That approach looks sane to me.

Sorry for the ambiguity. The plan is now to add a new compatible to the
st8879v panel controller driver.

>>>> A different question is the partial mode, for which (IIUC) you suggest
>>>> the overscan feature. As I have never heard of this before, it would be
>>>> very nice if you could point me to some examples. Where would the
>>>> effective resolution be set in this case?
>>>
>>> So, back when CRT were a thing the edges of the tube were masked by the
>>> plastic case. HDMI inherited from that and that's why you still have
>>> some UI on some devices (like consoles) to setup the active area of the
>>> display.
>>>
>>> The underlying issue is exactly what you describe: the active area is
>>> larger than what the plastic case allows to see. I don't think anyone
>>> ever had the usecase you have, but it would be the right solution to me
>>> to solve essentially the same issue the same way we do on other output
>>> types.
>>
>> OK, we'll look into the overscan feature. But still the information
>> about the active area should come from the driver, right?
> 
> No, the userspace is in charge there.

I'd prefer not to have the hardware description in user space. But we
can continue this discussing once our v2 is out.

Best regards,
Michael
  
Maxime Ripard April 5, 2023, 3:01 p.m. UTC | #10
On Tue, Apr 04, 2023 at 06:26:25PM +0200, Michael Riesch wrote:
> >>>> A different question is the partial mode, for which (IIUC) you suggest
> >>>> the overscan feature. As I have never heard of this before, it would be
> >>>> very nice if you could point me to some examples. Where would the
> >>>> effective resolution be set in this case?
> >>>
> >>> So, back when CRT were a thing the edges of the tube were masked by the
> >>> plastic case. HDMI inherited from that and that's why you still have
> >>> some UI on some devices (like consoles) to setup the active area of the
> >>> display.
> >>>
> >>> The underlying issue is exactly what you describe: the active area is
> >>> larger than what the plastic case allows to see. I don't think anyone
> >>> ever had the usecase you have, but it would be the right solution to me
> >>> to solve essentially the same issue the same way we do on other output
> >>> types.
> >>
> >> OK, we'll look into the overscan feature. But still the information
> >> about the active area should come from the driver, right?
> > 
> > No, the userspace is in charge there.
> 
> I'd prefer not to have the hardware description in user space. But we
> can continue this discussing once our v2 is out.

I'm not sure if it's worth doing something if you don't agree with it :)

At the end of the day, "the hardware" is a matter of semantics, and you
would argue that it's only the (user) visible part of the display, and I
would argue that it's the whole panel and we would both be somewhat
right.

The thing is: having the margins definition allows the userspace to be
aware that there's overscan to deal with, and for example setup the
scaler to properly display whatever you put in there.

If you just report a weird mode that doesn't match any kind of standard,
well, you could still do that, but you would need to tell the compositor
which mode you would need to scale down from.

In both case the userspace is involved. One is generic, the other isn't
and probably requires some extra development.

Maxime
  

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
index ed942cd3620f..8810f123dedf 100644
--- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
+++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml
@@ -21,6 +21,7 @@  properties:
   reset-gpios: true
   power-supply: true
   backlight: true
+  panel-timing: true
   port: true
   rotation: true
 
@@ -54,6 +55,22 @@  examples:
             spi-cpol;
             spi-cpha;
 
+            panel-timing {
+                clock-frequency = <7000000>;
+                hactive = <240>;
+                vactive = <320>;
+                hfront-porch = <38>;
+                hback-porch = <10>;
+                hsync-len = <10>;
+                vfront-porch = <8>;
+                vback-porch = <4>;
+                vsync-len = <4>;
+                hsync-active = <1>;
+                vsync-active = <1>;
+                de-active = <1>;
+                pixelclk-active = <1>;
+            };
+
             port {
                 panel_input: endpoint {
                     remote-endpoint = <&tcon0_out_panel>;