From: Nikolaus Voss <nv@vosn.de>
To: Marek Vasut <marex@denx.de>
Cc: Liu Ying <victor.liu@oss.nxp.com>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Liu Ying <victor.liu@nxp.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Fabio Estevam <festevam@denx.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
nikolaus.voss@haag-streit.com, miquel.raynal@bootlin.com
Subject: Re: [PATCH] drm: bridge: fsl-ldb: fixup mode on freq mismatch
Date: Wed, 04 Dec 2024 11:55:00 +0100 [thread overview]
Message-ID: <21ea39dba5e35e99ea499b4408cb1bdf@vosn.de> (raw)
In-Reply-To: <b86666cc-da63-405d-9036-96cb4e69dafb@denx.de>
Hi Marek,
On 04.12.2024 00:40, Marek Vasut wrote:
> On 12/3/24 8:20 AM, Nikolaus Voss wrote:
>> On 03.12.2024 04:12, Marek Vasut wrote:
>>> On 12/3/24 3:22 AM, Liu Ying wrote:
>>>
>>> [...]
>>>
>>>>>> I doubt that pixel clock tree cannot find appropriate division
>>>>>> ratios
>>>>>> for some pixel clock rates, especially for dual-link LVDS on
>>>>>> i.MX8MP
>>>>>> and i.MX93 platforms, because PLL clock rate should be 7x faster
>>>>>> than
>>>>>> pixel clock rate and 2x faster than "ldb" clock rate so that the
>>>>>> 3.5
>>>>>> folder between "ldb" clock and pixel clock can be met. That means
>>>>>> the
>>>>>> PLL clock rate needs to be explicitly set first for this case.
>>>>>>
>>>>>> Can you assign the PLL clock rate in DT to satisfy the "ldb" and
>>>>>> pixel
>>>>>> clock rates like the below commit does, if you use a LVDS panel?
>>>>>>
>>>>>> 4fbb73416b10 ("arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1
>>>>>> frequency to 506.8 MHz")
>>>>>
>>>>> I probably could. The point of my patch is you don't have to know
>>>>> in
>>>>> advance which LVDS panel is connected, and you don't have to
>>>>> calculate
>>>>> the base PLL clock by hand and store it in the device tree.
>>>>>
>>>>> In my test system, I have three different LVDS panels with EDID
>>>>> EEPROM,
>>>>> none of which worked with the stock driver, but all work with this
>>>>> patch.
>>>>> With slightly adapted pixel clocks though.
>>>>
>>>> If each of the three LVDS panels has only one display mode, you may
>>>> assign the PLL clock rates in DT overlays for the panels.
>>> I temporarily agree.
>>>
>>> I also currently use DTOs for various panels including their PLL
>>> setting, but in the end, I think/hope the work of Miquel and co. is
>>> going to make that PLL setting part unnecessary.
>>
>> That is exactly what my patch is about. I want to use one DT for all
>> panels
>
> Right
>
>> and store the panel's timing in EDID EEPROM.
> Oh, that is a new one. Does the EDID EEPROM store the entirety of
> 'struct display_timing {}' somehow , or is that a custom format ?
Well, sort of ;-). VESA has taken care of this 30 years ago
(https://en.wikipedia.org/wiki/Extended_Display_Identification_Data).
DRM handles this with drm_get_edid() and siblings, e.g. :
@@ -86,16 +92,36 @@ static int panel_lvds_get_modes(struct drm_panel
*panel,
{
struct panel_lvds *lvds = to_panel_lvds(panel);
struct drm_display_mode *mode;
+ int num = 0;
+
+ /* probe EDID if a DDC bus is available */
+ if (lvds->ddc) {
+ pm_runtime_get_sync(lvds->dev);
+
+ if (!lvds->edid)
+ lvds->edid = drm_get_edid(connector, lvds->ddc);
+
+ if (lvds->edid)
+ num += drm_add_edid_modes(connector,
lvds->edid);
+
+ pm_runtime_mark_last_busy(lvds->dev);
+ pm_runtime_put_autosuspend(lvds->dev);
+ }
panel-simple.c does that in mainline, I added it to panel-lvds.c.
The kernel subdir tools/edid has some code to generate the EEPROM data
from timings and flags.
We keep the DDC EEPROM on a small adapter glued to to back of the panel
so we can replace the usually short-lived panel with a successor.
--
Nikolaus Voss
next prev parent reply other threads:[~2024-12-04 10:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 15:45 [PATCH] drm: bridge: fsl-ldb: fixup mode on freq mismatch Nikolaus Voss
2024-11-26 18:20 ` Luca Ceresoli
2024-11-30 9:35 ` Dmitry Baryshkov
2024-11-30 18:57 ` Nikolaus Voss
2024-11-30 20:14 ` Dmitry Baryshkov
2024-12-02 6:32 ` Liu Ying
2024-12-02 10:13 ` Nikolaus Voss
2024-12-03 2:22 ` Liu Ying
2024-12-03 3:12 ` Marek Vasut
2024-12-03 7:20 ` Nikolaus Voss
2024-12-03 23:40 ` Marek Vasut
2024-12-04 10:55 ` Nikolaus Voss [this message]
2024-12-07 11:30 ` Marek Vasut
2024-12-09 8:46 ` Nikolaus Voss
2024-12-09 21:46 ` Marek Vasut
2024-12-11 16:54 ` Nikolaus Voss
2024-12-03 7:54 ` Nikolaus Voss
2024-12-23 9:44 ` Liu Ying
2024-12-09 7:41 ` Martin Kepplinger
2024-12-02 12:56 ` Marek Vasut
2024-12-02 17:03 ` Nikolaus Voss
2024-12-02 19:11 ` Marek Vasut
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=21ea39dba5e35e99ea499b4408cb1bdf@vosn.de \
--to=nv@vosn.de \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@denx.de \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=marex@denx.de \
--cc=miquel.raynal@bootlin.com \
--cc=neil.armstrong@linaro.org \
--cc=nikolaus.voss@haag-streit.com \
--cc=rfoss@kernel.org \
--cc=victor.liu@nxp.com \
--cc=victor.liu@oss.nxp.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.