devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaustabh Chakraborty <kauschluss@disroot.org>
To: Inki Dae <daeinki@gmail.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	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>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH v3 09/13] drm/bridge: samsung-dsim: increase timeout value for PLL_STABLE
Date: Tue, 29 Jul 2025 15:44:03 +0000	[thread overview]
Message-ID: <b732d2588112932ab399df47fb58e3f5@disroot.org> (raw)
In-Reply-To: <CAAQKjZMLMbwDVZRb5+Xb_5yz3AEP4uuzFJMuuZy9NFDu13VU5w@mail.gmail.com>

On 2025-07-29 05:44, Inki Dae wrote:
> 2025년 7월 7일 (월) 오전 3:28, Kaustabh Chakraborty 
> <kauschluss@disroot.org>님이 작성:
>> 
>> Exynos7870's DSIM requires more time to stabilize its PLL. The current
>> timeout value, 1000, doesn't suffice. Increase the value to 3000, 
>> which
>> is just about enough as observed experimentally.
>> 
>> Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
>> ---
>>  drivers/gpu/drm/bridge/samsung-dsim.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c 
>> b/drivers/gpu/drm/bridge/samsung-dsim.c
>> index 
>> fb2cb09cfd5a4f2fb50f802dc434c0956107b4e9..4b49707730db76aa8fd3ab973b02507436750889 
>> 100644
>> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
>> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
>> @@ -755,7 +755,7 @@ static unsigned long samsung_dsim_set_pll(struct 
>> samsung_dsim *dsi,
>> 
>>         samsung_dsim_write(dsi, DSIM_PLLCTRL_REG, reg);
>> 
>> -       timeout = 1000;
>> +       timeout = 3000;
> 
> Relying on an implicit loop to wait for PLL stabilization is not an
> ideal solution.
> According to the datasheet, this can be addressed more explicitly by
> using the DSIM_PLLTMR (PLL timer) register instead.
> 
> By configuring the pll timer field in DSIM_PLLTMR appropriately, we
> can avoid arbitrary loops.
> For example according to data sheet:
> If the APB clock is 80 MHz and the desired delay is 20 µs,
> the pll timer field should be set to:
> delay_time * apb_clock = 20 * 80 = 1600 (0x3E80)
> 
> Once this value is set and the MskPllStable field in the DSIM_INTMSK
> register is unmasked,
> the pll_stable field in the DSIM_INTSRC register will be set after the
> specified delay (20 µs in this example).
> We can then check this field to determine whether the PLL has 
> stabilized.
> 
> While the current patch relies on an implicit method, I’m fine with
> merging it as-is for now.
> However, since this patch series likely has sufficient time to
> mainline, I believe this is a good opportunity to improve the related
> logic.
> 
> Would you be open to trying the approach described above?

Interesting. I will try implementing it sometime in the near future.
(can't commit to it at the moment, preoccupied)

> 
> Thanks,
> Inki Dae
> 
>>         do {
>>                 if (timeout-- == 0) {
>>                         dev_err(dsi->dev, "PLL failed to 
>> stabilize\n");
>> 
>> --
>> 2.49.0
>> 
>> 

  reply	other threads:[~2025-07-29 15:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-06 18:25 [PATCH v3 00/13] Support for Exynos7870 DSIM bridge Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 01/13] drm/bridge: samsung-dsim: support separate LINK and DPHY status registers Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 02/13] drm/bridge: samsung-dsim: add SFRCTRL register Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 03/13] drm/bridge: samsung-dsim: add flag to control header FIFO wait Kaustabh Chakraborty
2025-07-29  3:55   ` Inki Dae
2025-07-06 18:25 ` [PATCH v3 04/13] drm/bridge: samsung-dsim: allow configuring bits and offsets of CLKCTRL register Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 05/13] drm/bridge: samsung-dsim: allow configuring the MAIN_VSA offset Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 06/13] drm/bridge: samsung-dsim: allow configuring the VIDEO_MODE bit Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 07/13] drm/bridge: samsung-dsim: allow configuring PLL_M and PLL_S offsets Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 08/13] drm/bridge: samsung-dsim: allow configuring the PLL_STABLE bit Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 09/13] drm/bridge: samsung-dsim: increase timeout value for PLL_STABLE Kaustabh Chakraborty
2025-07-29  5:44   ` Inki Dae
2025-07-29 15:44     ` Kaustabh Chakraborty [this message]
2025-07-06 18:25 ` [PATCH v3 10/13] drm/bridge: samsung-dsim: add ability to define clock names for every variant Kaustabh Chakraborty
2025-07-29  7:02   ` Inki Dae
2025-07-29 16:29     ` Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 11/13] dt-bindings: samsung,mipi-dsim: document exynos7870 DSIM compatible Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 12/13] drm/bridge: samsung-dsim: add driver support for exynos7870 DSIM bridge Kaustabh Chakraborty
2025-07-06 18:25 ` [PATCH v3 13/13] drm/exynos: dsi: add support for exynos7870 Kaustabh Chakraborty
2025-07-29  7:35 ` [PATCH v3 00/13] Support for Exynos7870 DSIM bridge Inki Dae

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=b732d2588112932ab399df47fb58e3f5@disroot.org \
    --to=kauschluss@disroot.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=daeinki@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sw0312.kim@samsung.com \
    --cc=tzimmermann@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).