Re: LVDS panel compatible strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



пн, 17 лип. 2023 р. о 10:16 Thierry Reding <thierry.reding@xxxxxxxxx> пише:
>
> On Fri, Jul 14, 2023 at 06:57:01PM +0300, Svyatoslav Ryhel wrote:
> > пт, 14 лип. 2023 р. о 18:16 Thierry Reding <thierry.reding@xxxxxxxxx> пише:
> > >
> > > On Fri, Jul 14, 2023 at 06:00:43PM +0300, Svyatoslav Ryhel wrote:
> > > > пт, 14 лип. 2023 р. о 17:38 Thierry Reding <thierry.reding@xxxxxxxxx> пише:
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > I've been working on converting all Tegra-related device tree bindings
> > > > > to json-schema so that eventually we can fully validate device tree
> > > > > files. Getting all the bindings reviewed and merged has been slow, but
> > > > > I have a local tree where pretty much all validation errors and warnings
> > > > > have been fixed. The remaining warnings that I'm not sure how to resolve
> > > > > are these:
> > > > >
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-tilapia-E1565.dtb: display-panel: compatible:0: 'panel-lvds' is not one of ['auo,b101ew05', 'tbs,a711-panel']
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-tilapia-E1565.dtb: display-panel: compatible: ['panel-lvds'] is too short
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-tilapia-E1565.dtb: display-panel: Unevaluated properties are not allowed ('compatible' was unexpected)
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-E1565.dtb: display-panel: compatible:0: 'panel-lvds' is not one of ['auo,b101ew05', 'tbs,a711-panel']
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-E1565.dtb: display-panel: compatible: ['panel-lvds'] is too short
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-E1565.dtb: display-panel: Unevaluated properties are not allowed ('compatible' was unexpected)
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-PM269.dtb: display-panel: compatible:0: 'panel-lvds' is not one of ['auo,b101ew05', 'tbs,a711-panel']
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-PM269.dtb: display-panel: compatible: ['panel-lvds'] is too short
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-asus-nexus7-grouper-PM269.dtb: display-panel: Unevaluated properties are not allowed ('compatible' was unexpected)
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dtb: display-panel: compatible:0: 'panel-lvds' is not one of ['auo,b101ew05', 'tbs,a711-panel']
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dtb: display-panel: compatible: ['panel-lvds'] is too short
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > > >     arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dtb: display-panel: Unevaluated properties are not allowed ('compatible' was unexpected)
> > > > >         from schema $id: http://devicetree.org/schemas/display/panel/panel-lvds.yaml#
> > > >
> > > > Hello Thierry! Pegatron Chagall uses a Hannstar similar to one used in
> > > > ASUS TF201 but unfortunately it is not compatible with existing simple
> > > > panel setup (blurry image if used). My assumption is that chagall as
> > > > different revision of this panel like HSD101PWW3-B00 or
> > > > HSD101PWW1-A00 which is more likely or panel is highly modified which
> > > > is unlikely. I propose to use "hannstar,hsd101pww1" which is more wide
> > > > spread.
> > >
> > > Interesting. So is the problem the HSD101PWW2 timings that are off, or
> > > is it because the panel-lvds code does something special to make this
> > > blurry image go away?
> > >
> > timings are different
>
> For cases where the timings are the only things that differ, the DT
> bindings allow overriding the timings specifically. So you might get
> away with using one of the existing panels if it is close enough and
> patch up the timings in DT.
>
> Comparing what you've got for Chagall, the porches exceed what the
> HSD101PWW2 allows, but the timing values in the simple-panel driver look
> a little arbitrary, to be honest, so I think those could be extended.
> Looking at a datasheet that I found online, it's very unspecific about
> the porch lengths since it only mentions minimum, typical and maximum
> values for the total frame blanking times:
>
>         vertical: 3, 23, 223
>         horizontal: 54, 160, 681
>
> So I think we can be more generous in how these are split up. So we
> could for example do this:
>
> --- >8 ---
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 18dc251749fb..b2fb7943f2ed 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -2108,13 +2108,13 @@ static const struct panel_desc hannstar_hsd100pxn1 = {
>  static const struct display_timing hannstar_hsd101pww2_timing = {
>         .pixelclock = { 64300000, 71100000, 82000000 },
>         .hactive = { 1280, 1280, 1280 },
> -       .hfront_porch = { 1, 1, 10 },
> -       .hback_porch = { 1, 1, 10 },
> -       .hsync_len = { 58, 158, 661 },
> +       .hfront_porch = { 1, 1, 64 },
> +       .hback_porch = { 1, 1, 64 },
> +       .hsync_len = { 58, 158, 553 },
>         .vactive = { 800, 800, 800 },
> -       .vfront_porch = { 1, 1, 10 },
> -       .vback_porch = { 1, 1, 10 },
> -       .vsync_len = { 1, 21, 203 },
> +       .vfront_porch = { 1, 1, 32 },
> +       .vback_porch = { 1, 1, 32 },
> +       .vsync_len = { 1, 21, 159 },
>         .flags = DISPLAY_FLAGS_DE_HIGH,
>  };
>
> --- >8 ---
>
> And then we could move the compatible string from simple to LVDS:
>
> --- >8 ---
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> index 929fe046d1e7..344e5df40c2f 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
> @@ -40,6 +40,8 @@ properties:
>      items:
>        - enum:
>            - auo,b101ew05
> +          # HannStar Display Corp. HSD101PWW2 10.1" WXGA (1280x800) LVDS panel
> +          - hannstar,hsd101pww2
>            - tbs,a711-panel
>
>        - const: panel-lvds
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> index df1cec8fd21b..f4d9da4afefd 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> @@ -168,8 +168,6 @@ properties:
>        - hannstar,hsd070pww1
>          # HannStar Display Corp. HSD100PXN1 10.1" XGA LVDS panel
>        - hannstar,hsd100pxn1
> -        # HannStar Display Corp. HSD101PWW2 10.1" WXGA (1280x800) LVDS panel
> -      - hannstar,hsd101pww2
>          # Hitachi Ltd. Corporation 9" WVGA (800x480) TFT LCD panel
>        - hit,tx23d38vm0caa
>          # InfoVision Optoelectronics M133NWF4 R0 13.3" FHD (1920x1080) TFT LCD panel
> diff --git a/arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dts b/arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dts
> index c81d5875c31c..4012f9c799a8 100644
> --- a/arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dts
> +++ b/arch/arm/boot/dts/nvidia/tegra30-pegatron-chagall.dts
> @@ -2628,7 +2628,7 @@ cpu3: cpu@3 {
>         };
>
>         display-panel {
> -               compatible = "panel-lvds";
> +               compatible = "hannstar,hsd101pww2", "panel-lvds";
>
>                 width-mm = <217>;
>                 height-mm = <136>;
> --- >8 ---
>
> That gets rid of the DT validation warning for me. Would you be able to
> test this on actual hardware? I think the compatible matching would
> result in this matching the simple-panel driver and that does have some
> support for LVDS, but I'm not sure if it's exactly equal to what you get
> with only the panel-lvds matching, which makes this get handled by the
> panel-lvds driver.
>
> I'm attaching the full patch to make it a bit easier to apply this.

I have just tested new timings with my TF201 and can confirm that I see no
regressions for TF201. Testing on Chagall will be nearly impossible because
the owner of Chagall does not have it in reach and will not be able to
test it in
the next few months.

As for now I see no downsides of this patch for both Chagall and TF201.
Chagall will substitute its own timings and TF201 is confirmed to work fine.

Best Regards,
Svyatoslav R.

> Thierry




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux