dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Raphael GALLAIS-POU - foss <raphael.gallais-pou@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Raphael GALLAIS-POU <raphael.gallais-pou@st.com>,
	David Airlie <airlied@linux.ie>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yannick FERTRE - foss <yannick.fertre@foss.st.com>,
	Philippe CORNU <philippe.cornu@st.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Alexandre TORGUE - foss <alexandre.torgue@foss.st.com>,
	Yannick FERTRE <yannick.fertre@st.com>,
	Philippe CORNU - foss <philippe.cornu@foss.st.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Stephen Boyd <swboyd@chromium.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>
Subject: Re: [PATCH] drm/stm: ltdc: improve pm_runtime to stop clocks
Date: Wed, 30 Jun 2021 02:35:05 +0200	[thread overview]
Message-ID: <420e243d-7541-a07e-177b-d2db11c26aef@denx.de> (raw)
In-Reply-To: <20210629115709.16145-1-raphael.gallais-pou@foss.st.com>

On 6/29/21 1:58 PM, Raphael GALLAIS-POU - foss wrote:

[...]

> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -425,10 +425,17 @@ static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc,
>   {
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
>   	struct drm_device *ddev = crtc->dev;
> +	int ret;
>   
>   	DRM_DEBUG_DRIVER("\n");
>   
> -	pm_runtime_get_sync(ddev->dev);
> +	if (!pm_runtime_active(ddev->dev)) {
> +		ret = pm_runtime_get_sync(ddev->dev);

All these if (!pm_runtime_active()) then pm_runtime_get_sync() calls 
look like workaround for some larger issue. Shouldn't the pm_runtime do 
some refcounting on its own , so this shouldn't be needed ?

  reply	other threads:[~2021-06-30  0:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 11:58 [PATCH] drm/stm: ltdc: improve pm_runtime to stop clocks Raphael GALLAIS-POU - foss
2021-06-30  0:35 ` Marek Vasut [this message]
2021-07-02  9:23   ` Raphael Gallais-Pou
2021-07-02 18:07     ` Marek Vasut
2021-08-17  9:43       ` Raphael Gallais-Pou
2021-08-19 22:22         ` Marek Vasut
2021-07-06 15:21 ` yannick Fertre

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=420e243d-7541-a07e-177b-d2db11c26aef@denx.de \
    --to=marex@denx.de \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@foss.st.com \
    --cc=benjamin.gaignard@linaro.org \
    --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=philippe.cornu@foss.st.com \
    --cc=philippe.cornu@st.com \
    --cc=raphael.gallais-pou@foss.st.com \
    --cc=raphael.gallais-pou@st.com \
    --cc=swboyd@chromium.org \
    --cc=yannick.fertre@foss.st.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;
as well as URLs for NNTP newsgroup(s).