mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
	Mark Brown <broonie@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Chen-Yu Tsai <wens@csie.org>, Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [v2,03/10] drm/sun4i: Protect the TCON pixel clocks
Date: Fri, 23 Feb 2018 15:05:26 +0100	[thread overview]
Message-ID: <287984f8-bcac-3789-d573-2f0c54fb537d@micronovasrl.com> (raw)
In-Reply-To: <d5224d2e81ecf73dc09f234e580ada52c00eaee3.1519204731.git-series.maxime.ripard@bootlin.com>

From: Maxime Ripard <maxime.ripard@free-electrons.com>

Both TCON clocks are very sensitive to clock changes, since any change
might lead to improper timings.

Make sure our rate is never changed.

Tested-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
  drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c 
b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index b73acab74867..cbe87cee13d1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -261,7 +261,7 @@ static void sun4i_tcon0_mode_set_common(struct 
sun4i_tcon *tcon,
  					const struct drm_display_mode *mode)
  {
  	/* Configure the dot clock */
-	clk_set_rate(tcon->dclk, mode->crtc_clock * 1000);
+	clk_set_rate_exclusive(tcon->dclk, mode->crtc_clock * 1000);

  	/* Set the resolution */
  	regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG,
@@ -419,7 +419,7 @@ static void sun4i_tcon1_mode_set(struct sun4i_tcon 
*tcon,
  	WARN_ON(!tcon->quirks->has_channel_1);

  	/* Configure the dot clock */
-	clk_set_rate(tcon->sclk1, mode->crtc_clock * 1000);
+	clk_set_rate_exclusive(tcon->sclk1, mode->crtc_clock * 1000);

  	/* Adjust clock delay */
  	clk_delay = sun4i_tcon_get_clk_delay(mode, 1);

  reply	other threads:[~2018-02-23 14:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21  9:20 [PATCH v2 00/10] drm/sun4i: Allwinner MIPI-DSI support Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 01/10] regmap: mmio: Add function to attach a clock Maxime Ripard
2018-02-26 11:17   ` Applied "regmap: mmio: Add function to attach a clock" to the regmap tree Mark Brown
2018-02-26 13:12   ` [PATCH v2 01/10] regmap: mmio: Add function to attach a clock Mark Brown
2018-02-21  9:20 ` [PATCH v2 02/10] drm/sun4i: tcon: Add TRI finish interrupt for vblank Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 03/10] drm/sun4i: Protect the TCON pixel clocks Maxime Ripard
2018-02-23 14:05   ` Giulio Benetti [this message]
2018-02-23 23:31   ` [v2,03/10] " Giulio Benetti
2018-02-26 11:15     ` Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 04/10] dt-bindings: display: Add Allwinner MIPI-DSI bindings Maxime Ripard
2018-03-01 22:15   ` Rob Herring
2018-03-06 13:23     ` Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 05/10] drm/sun4i: Add Allwinner A31 MIPI-DSI controller support Maxime Ripard
2018-02-21 14:48   ` kbuild test robot
2018-02-21  9:20 ` [PATCH v2 06/10] dt-bindings: vendor: Add Huarui Lighting Maxime Ripard
2018-03-01 22:38   ` Rob Herring
2018-02-21  9:20 ` [PATCH v2 07/10] dt-bindings: panel: Add Huarui LHR050H41 panel documentation Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 08/10] drm/panel: Add Huarui LHR050H41 panel driver Maxime Ripard
2018-02-21 15:05   ` [RFC PATCH] drm/panel: lhr050h41_init[] can be static kbuild test robot
2018-02-21 15:05   ` [PATCH v2 08/10] drm/panel: Add Huarui LHR050H41 panel driver kbuild test robot
2018-02-21 15:36   ` Chen-Yu Tsai
2018-03-02  9:52     ` Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 09/10] arm: dts: sun8i: a33: Add the DSI-related nodes Maxime Ripard
2018-02-21  9:20 ` [PATCH v2 10/10] [DO NOT MERGE] arm: dts: sun8i: bpi-m2m: Add DSI display Maxime Ripard

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=287984f8-bcac-3789-d573-2f0c54fb537d@micronovasrl.com \
    --to=giulio.benetti@micronovasrl.com \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.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

all inboxes | Powered by JetHome®