mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philippe CORNU <philippe.cornu@st.com>
To: Yannick FERTRE <yannick.fertre@st.com>,
	Benjamin GAIGNARD <benjamin.gaignard@st.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	"Alexandre TORGUE" <alexandre.torgue@st.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/stm: ltdc: remove call of pm-runtime functions
Date: Thu, 2 Jul 2020 12:18:46 +0000	[thread overview]
Message-ID: <3b6e02b8-0f54-4eb0-9728-b304a1aa85d5@st.com> (raw)
In-Reply-To: <20200701120402.6444-1-yannick.fertre@st.com>



On 7/1/20 2:04 PM, Yannick Fertre wrote:
> It is not necessary to suspend or stop the ltdc clocks
> to modify the pixel clock.
> 
> Signed-off-by: Yannick Fertre <yannick.fertre@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 16 ----------------
>   1 file changed, 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 3f590d916e91..6e28f707092f 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -506,15 +506,7 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   				 struct drm_display_mode *adjusted_mode)
>   {
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> -	struct drm_device *ddev = crtc->dev;
>   	int rate = mode->clock * 1000;
> -	bool runtime_active;
> -	int ret;
> -
> -	runtime_active = pm_runtime_active(ddev->dev);
> -
> -	if (runtime_active)
> -		pm_runtime_put_sync(ddev->dev);
>   
>   	if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
>   		DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
> @@ -523,14 +515,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   
>   	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
>   
> -	if (runtime_active) {
> -		ret = pm_runtime_get_sync(ddev->dev);
> -		if (ret) {
> -			DRM_ERROR("Failed to fixup mode, cannot get sync\n");
> -			return false;
> -		}
> -	}
> -
>   	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
>   			 mode->clock, adjusted_mode->clock);
>   
> 
Hi Yannick,
Many thanks for your patch,
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Philippe :-)

  reply	other threads:[~2020-07-02 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 12:04 Yannick Fertre
2020-07-02 12:18 ` Philippe CORNU [this message]
2020-07-08  9:49   ` Benjamin Gaignard

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=3b6e02b8-0f54-4eb0-9728-b304a1aa85d5@st.com \
    --to=philippe.cornu@st.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@st.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=yannick.fertre@st.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

all inboxes | Powered by JetHome®