Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Isaac Scott <isaac.scott@ideasonboard.com>,
	Liu Ying <victor.liu@nxp.com>,
	dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Lucas Stach <l.stach@pengutronix.de>,
	"Lukas F.Hartmann" <lukas@mntmn.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>, Stefan Agner <stefan@agner.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	imx@lists.linux.dev, kernel@dh-electronics.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm: lcdif: Use adjusted_mode .clock instead of .crtc_clock
Date: Sun, 20 Oct 2024 04:49:29 +0200	[thread overview]
Message-ID: <eee5649b-ca5a-42c5-a6ec-246ee21fb6e4@denx.de> (raw)
In-Reply-To: <172937454426.2485972.12472740284222343769@ping.linuxembedded.co.uk>

On 10/19/24 11:49 PM, Kieran Bingham wrote:
> Quoting Marek Vasut (2024-10-12 21:37:59)
>> On 10/11/24 5:10 AM, Liu Ying wrote:
>>
>> Hi,
>>
>>>>>> This Video PLL1 configuration since moved to &media_blk_ctrl {} , but it is still in the imx8mp.dtsi . Therefore, to make your panel work at the correct desired pixel clock frequency instead of some random one inherited from imx8mp.dtsi, add the following to the pollux DT, I believe that will fix the problem and is the correct fix:
>>>>>>
>>>>>> &media_blk_ctrl {
>>>>>>       // 506800000 = 72400000 * 7 (for single-link LVDS, this is enough)
>>>>>>       // there is no need to multiply the clock by * 2
>>>>>>       assigned-clock-rates = <500000000>, <200000000>, <0>, <0>, <500000000>, <506800000>;
>>>>>
>>>>> This assigns "video_pll1" clock rate to 506.8MHz which is currently not
>>>>> listed in imx_pll1443x_tbl[].
>>>>
>>>> Since commit b09c68dc57c9 ("clk: imx: pll14xx: Support dynamic rates") the 1443x PLLs can be configured to arbitrary rates which for video PLL is desirable as those should produce accurate clock.
>>>
>>> Ack.
>>>
>>>>
>>>>> Does the below patch[1] fix the regression issue? It explicitly sets
>>>>> the clock frequency of the panel timing to 74.25MHz.
>>>>>
>>>>> [1] https://patchwork.freedesktop.org/patch/616905/?series=139266&rev=1
>>>> That patch is wrong, there is an existing entry for this panel in panel-simple.c which is correct and precise, please do not add that kind of imprecise duplicate timings into DT.
>>>
>>> At least the patch[1] is legitimate now to override the display
>>> timing of the panel because the override mode is something
>>> panel-simple.c supports.
>>
>> It may be possible to override the mode, but why would this be the
>> desired if the panel-simple.c already contains valid accurate timings
>> for this particular panel ?
> 
> I'm confused a little here. Why is it that setting the panel timings in
> the DT as per [1] make the display work, while the panel timeings in
> panel-simple alone are not enough?
> 
> Is there some difference in code path for 'how' the panel timings are
> set as to whether they will apply fully or not ?
Because [1] sets inaccurate pixel clock of 74.25 MHz, which can be 
divided down from random default Video PLL setting of 1039.5 MHz set in 
imx8mp.dtsi media_blk_ctrl , 1039.5 / 74.25 = 14 .

The panel-simple pixel clock are 72.4 MHz, to achieve that accurately, 
it is necessary to reconfigure the Video PLL frequency to 506.8 MHz , 
which LCDIFv3 can do, but LDB can not, hence it has to be done in DT for 
now.

  reply	other threads:[~2024-10-20  5:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 20:27 [PATCH] drm: lcdif: Use adjusted_mode .clock instead of .crtc_clock Marek Vasut
2024-06-24  9:19 ` Alexander Stein
2024-07-06  0:16   ` Marek Vasut
2024-10-07 17:01     ` Isaac Scott
2024-10-07 18:06       ` Marek Vasut
2024-10-08 10:07         ` Isaac Scott
2024-10-08 14:37           ` Marek Vasut
2024-10-08 21:48           ` Marek Vasut
2024-10-09  9:55             ` Isaac Scott
2024-10-09 15:47               ` Marek Vasut
2024-10-09 15:58                 ` Isaac Scott
2024-10-10  0:38                   ` Marek Vasut
2024-10-10  5:31             ` Liu Ying
2024-10-10 15:54               ` Isaac Scott
2024-10-10 16:02                 ` Isaac Scott
2024-10-10 17:29               ` Marek Vasut
2024-10-11  3:10                 ` Liu Ying
2024-10-12 20:37                   ` Marek Vasut
2024-10-19 21:49                     ` Kieran Bingham
2024-10-20  2:49                       ` Marek Vasut [this message]
2024-10-21 11:10                         ` Kieran Bingham
2024-10-21 21:00                           ` Marek Vasut
2024-10-21 11:48                         ` Maxime Ripard
2024-10-21 21:07                           ` 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=eee5649b-ca5a-42c5-a6ec-246ee21fb6e4@denx.de \
    --to=marex@denx.de \
    --cc=airlied@gmail.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=isaac.scott@ideasonboard.com \
    --cc=kernel@dh-electronics.com \
    --cc=kernel@pengutronix.de \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lukas@mntmn.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    --cc=tzimmermann@suse.de \
    --cc=victor.liu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox