All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: "Svyatoslav Ryhel" <clamor95@gmail.com>,
	"David Heidelberg" <david@ixit.cz>,
	"Raffaele Tranquillini" <raffaele.tranquillini@gmail.com>,
	"Ion Agorria" <ion@agorria.com>,
	"Maxim Schwalm" <maxim.schwalm@gmail.com>,
	"Pedro Ângelo" <pangelo@void.io>,
	"Matt Merhar" <mattmerhar@protonmail.com>,
	"Zack Pearsall" <zpearsall@yahoo.com>,
	linux-tegra@vger.kernel.org
Subject: Re: LVDS panel compatible strings
Date: Mon, 17 Jul 2023 15:25:07 +0200	[thread overview]
Message-ID: <ZLVBM23xjgzN_-ZV@orome> (raw)
In-Reply-To: <78ba744f-d7f6-2388-0330-1a5105c9dca5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4112 bytes --]

On Mon, Jul 17, 2023 at 11:50:03AM +0300, Dmitry Osipenko wrote:
> 17.07.2023 10:16, Thierry Reding пишет:
> > 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.
> 
> If panel-simple supported timings override from DT, then panel-lvds
> indeed could be removed. But panel-simple doesn't support it:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a21f18a993c56566db94ba836684bc32c070a82c

I clearly didn't look at that patch closely enough. panel-simple has
supported override modes since:

commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
Author: Sean Paul <seanpaul@chromium.org>
Date:   Thu Jul 11 13:34:53 2019 -0700

    drm/panel: simple: Add ability to override typical timing
    
    This patch adds the ability to override the typical display timing for a
    given panel. This is useful for devices which have timing constraints
    that do not apply across the entire display driver (eg: to avoid
    crosstalk between panel and digitizer on certain laptops). The rules are
    as follows:
    
    - panel must not specify fixed mode (since the override mode will
      either be the same as the fixed mode, or we'll be unable to
      check the bounds of the overried)
    - panel must specify at least one display_timing range which will be
      used to ensure the override mode fits within its bounds
    
    Changes in v2:
     - Parse the full display-timings node (using the native-mode) (Rob)
    Changes in v3:
     - No longer parse display-timings subnode, use panel-timing (Rob)
    Changes in v4:
     - Don't add mode from timing if override was specified (Thierry)
     - Add warning if timing and fixed mode was specified (Thierry)
     - Don't add fixed mode if timing was specified (Thierry)
     - Refactor/rename a bit to avoid extra indentation from "if" tests
     - i should be unsigned (Thierry)
     - Add annoying WARN_ONs for some cases (Thierry)
     - Simplify 'No display_timing found' handling (Thierry)
     - Rename to panel_simple_parse_override_mode() (Thierry)
    Changes in v5:
     - Added Heiko's Tested-by
    Changes in v6:
     - Rebased to drm-misc next
     - Added tags
    
    Cc: Doug Anderson <dianders@chromium.org>
    Cc: Eric Anholt <eric@anholt.net>
    Cc: Heiko Stuebner <heiko@sntech.de>
    Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
    Cc: Rob Herring <robh+dt@kernel.org>
    Cc: Stéphane Marchesin <marcheu@chromium.org>
    Cc: Thierry Reding <thierry.reding@gmail.com>
    Cc: devicetree@vger.kernel.org
    Cc: dri-devel@lists.freedesktop.org
    Signed-off-by: Sean Paul <seanpaul@chromium.org>
    Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
    Signed-off-by: Douglas Anderson <dianders@chromium.org>
    Tested-by: Heiko Stuebner <heiko@sntech.de>
    Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
    Acked-by: Thierry Reding <thierry.reding@gmail.com>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190711203455.125667-2-dianders@chromium.org

Looking at the error message cited in the linked commit, the problem is
that the Chunghwa panel has a fixed mode listed in the driver. However I
don't see a reason why we can't get rid of that. The only place where I
can find the compatible string for that used is for the Nexus 7, so we
should be able to replace the fixed mode with the timings for that panel
and remove the fixed mode.

The initial Chunghwa panel driver support doesn't seem to have been
based on the Nexus 7, so I suppose if we make the above change we could
technically be breaking some setup out there, but since we have no way
of knowing which device this was on, or if anybody still has access, the
best we can do is hope that nothing breaks and fix things up if somebody
complains.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-07-17 13:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 14:38 LVDS panel compatible strings Thierry Reding
2023-07-14 15:00 ` Svyatoslav Ryhel
2023-07-14 15:16   ` Thierry Reding
2023-07-14 15:57     ` Svyatoslav Ryhel
2023-07-17  7:16       ` Thierry Reding
2023-07-17  7:25         ` Svyatoslav Ryhel
2023-07-17  8:08         ` Svyatoslav Ryhel
2023-07-17  8:50         ` Dmitry Osipenko
2023-07-17 13:25           ` Thierry Reding [this message]
2023-07-22  1:26             ` Dmitry Osipenko
2023-07-18 20:55   ` Maxim Schwalm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZLVBM23xjgzN_-ZV@orome \
    --to=thierry.reding@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=david@ixit.cz \
    --cc=digetx@gmail.com \
    --cc=ion@agorria.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mattmerhar@protonmail.com \
    --cc=maxim.schwalm@gmail.com \
    --cc=pangelo@void.io \
    --cc=raffaele.tranquillini@gmail.com \
    --cc=zpearsall@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.