public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Inbaraj E" <inbaraj.e@samsung.com>
To: "'Stephen Boyd'" <sboyd@kernel.org>, <alim.akhtar@samsung.com>,
	<cw00.choi@samsung.com>, <krzk@kernel.org>,
	<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-samsung-soc@vger.kernel.org>, <mturquette@baylibre.com>,
	<s.nawrocki@samsung.com>
Cc: <pankaj.dubey@samsung.com>, <gost.dev@samsung.com>
Subject: RE: [PATCH] clk: samsung: fsd: Mark PLL_CAM_CSI as critical
Date: Thu, 19 Sep 2024 17:03:49 +0530	[thread overview]
Message-ID: <00f001db0a87$cd9ddfa0$68d99ee0$@samsung.com> (raw)
In-Reply-To: <0d43a00985a815c1869ebc6c441a2aed.sboyd@kernel.org>



> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: 19 September 2024 15:51
> To: Inbaraj E <inbaraj.e@samsung.com>; alim.akhtar@samsung.com;
> cw00.choi@samsung.com; krzk@kernel.org; linux-clk@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-samsung-soc@vger.kernel.org;
> mturquette@baylibre.com; s.nawrocki@samsung.com
> Cc: pankaj.dubey@samsung.com; gost.dev@samsung.com; Inbaraj E
> <inbaraj.e@samsung.com>
> Subject: Re: [PATCH] clk: samsung: fsd: Mark PLL_CAM_CSI as critical
> 
> Quoting Inbaraj E (2024-09-17 03:10:16)
> > PLL_CAM_CSI is the parent clock for the ACLK and PCLK in the
> > CMU_CAM_CSI block. When we gate ACLK or PCLK, the clock framework
> will
> > subsequently disables the parent clocks(PLL_CAM_CSI). Disabling
> > PLL_CAM_CSI is causing sytem level halt.
> >
> > It was observed on FSD SoC, when we gate the ACLK and PCLK during CSI
> > stop streaming through pm_runtime_put system is getting halted. So
> > marking PLL_CAM_CSI as critical to prevent disabling.
> >
> > Signed-off-by: Inbaraj E <inbaraj.e@samsung.com>
> > ---
> 
> Please add a fixes tag. Although this is likely a band-aid fix because marking
> something critical leaves it enabled forever.

Sure, will add fixes tag. As per HW manual, this PLL_CAM_CSI is
supplying clock even for CMU SFR access of CSI block, so we can't
gate this.

> 
> >  drivers/clk/samsung/clk-fsd.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/clk/samsung/clk-fsd.c
> > b/drivers/clk/samsung/clk-fsd.c index 6f984cfcd33c..b1764aab9429
> > 100644
> > --- a/drivers/clk/samsung/clk-fsd.c
> > +++ b/drivers/clk/samsung/clk-fsd.c
> > @@ -1637,8 +1637,9 @@ static const struct samsung_pll_rate_table
> > pll_cam_csi_rate_table[] __initconst  };
> >
> >  static const struct samsung_pll_clock cam_csi_pll_clks[] __initconst = {
> > -       PLL(pll_142xx, 0, "fout_pll_cam_csi", "fin_pll",
> > -           PLL_LOCKTIME_PLL_CAM_CSI, PLL_CON0_PLL_CAM_CSI,
> pll_cam_csi_rate_table),
> > +       __PLL(pll_142xx, 0, "fout_pll_cam_csi", "fin_pll",
> > +               CLK_GET_RATE_NOCACHE | CLK_IS_CRITICAL,
> > + PLL_LOCKTIME_PLL_CAM_CSI,
> 
> Please add a comment indicating that this clk can never turn off because
> <insert reason here>.

Sure, will post v2 after adding comment explaining reason behind
marking this clock as critical.

Regards,
Inbaraj E


  reply	other threads:[~2024-09-19 11:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240917101102epcas5p3b17d2774cb74fd4cf61ea52fde85c300@epcas5p3.samsung.com>
2024-09-17 10:10 ` [PATCH] clk: samsung: fsd: Mark PLL_CAM_CSI as critical Inbaraj E
2024-09-19 10:21   ` Stephen Boyd
2024-09-19 11:33     ` Inbaraj E [this message]
2024-09-19 12:03       ` Krzysztof Kozlowski
2024-09-20  4:04         ` Inbaraj E
2024-09-20  4:15         ` Inbaraj E
2024-09-20 12:36           ` Krzysztof Kozlowski
2024-10-01  9:24             ` Inbaraj E
2024-10-01 10:00               ` Krzysztof Kozlowski
2024-10-10 10:45                 ` Inbaraj E
2024-10-21  9:50                   ` Krzysztof Kozlowski

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='00f001db0a87$cd9ddfa0$68d99ee0$@samsung.com' \
    --to=inbaraj.e@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=gost.dev@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    /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