From: Miaoqian Lin <linmq006@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>, Eric Anholt <eric@anholt.net>,
dri-devel@lists.freedesktop.org, Emma Anholt <emma@anholt.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] drm/v3d/v3d_drv: Fix PM disable depth imbalance
Date: Thu, 2 Jun 2022 10:05:20 +0800 [thread overview]
Message-ID: <59ea53d6-2856-fedd-3a5e-6ad5bdcd4a20@gmail.com> (raw)
In-Reply-To: <Ypd76wmrBsIgeE3O@orome>
Hi, Thierry
On 2022/6/1 22:47, Thierry Reding wrote:
> On Wed, Jun 01, 2022 at 09:55:02PM +0800, Miaoqian Lin wrote:
>> Hi, Daniel
>>
>> On 2022/6/1 21:26, Daniel Vetter wrote:
>>> On Wed, Jun 01, 2022 at 04:20:50PM +0400, Miaoqian Lin wrote:
>>>> The pm_runtime_enable will increase power disable depth.
>>>> If the probe fails, we should use pm_runtime_disable() to balance
>>>> pm_runtime_enable().
>>>> Also call disable function in remove function.
>>>>
>>>> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
>>>> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
>>>> ---
>>>> Changes in v3:
>>>> - call pm_runtime_disable() in v3d_platform_drm_remove
>>>> - update commit message
>>>>
>>>> Changes in v2
>>>> - put pm_runtime_disable before dma_free_wc
>>>> - rename dma_free to pm_disable
>>>>
>>>> v1: https://lore.kernel.org/r/20220105120442.14418-1-linmq006@gmail.com
>>>> v2: https://lore.kernel.org/r/20220106124657.32737-1-linmq006@gmail.com
>>> Maybe a bit late since we're at v3 already, but are there no devm_
>>> functions here that would dtrt automatically?
>> Sorry I don't see one, or we can use devm_add_action_or_reset() to add handling
>>
>> action. something like disp_cc_sm8250_probe() in drivers/clk/qcom/dispcc-sm8250.c
>>
>> How do you think?
> Looks like there's a devm_pm_runtime_enable() helper that does exactly
> that. See commit b3636a3a2c51 ("PM: runtime: add devm_pm_runtime_enable
> helper"). I haven't seen any large janitorial series yet for that, so
> perhaps it's just not widely known yet.
Great, very helpful. Thanks for your kind reminder.
> Thierry
WARNING: multiple messages have this Message-ID (diff)
From: Miaoqian Lin <linmq006@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Emma Anholt <emma@anholt.net>, David Airlie <airlied@linux.ie>,
Eric Anholt <eric@anholt.net>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] drm/v3d/v3d_drv: Fix PM disable depth imbalance
Date: Thu, 2 Jun 2022 10:05:20 +0800 [thread overview]
Message-ID: <59ea53d6-2856-fedd-3a5e-6ad5bdcd4a20@gmail.com> (raw)
In-Reply-To: <Ypd76wmrBsIgeE3O@orome>
Hi, Thierry
On 2022/6/1 22:47, Thierry Reding wrote:
> On Wed, Jun 01, 2022 at 09:55:02PM +0800, Miaoqian Lin wrote:
>> Hi, Daniel
>>
>> On 2022/6/1 21:26, Daniel Vetter wrote:
>>> On Wed, Jun 01, 2022 at 04:20:50PM +0400, Miaoqian Lin wrote:
>>>> The pm_runtime_enable will increase power disable depth.
>>>> If the probe fails, we should use pm_runtime_disable() to balance
>>>> pm_runtime_enable().
>>>> Also call disable function in remove function.
>>>>
>>>> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
>>>> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
>>>> ---
>>>> Changes in v3:
>>>> - call pm_runtime_disable() in v3d_platform_drm_remove
>>>> - update commit message
>>>>
>>>> Changes in v2
>>>> - put pm_runtime_disable before dma_free_wc
>>>> - rename dma_free to pm_disable
>>>>
>>>> v1: https://lore.kernel.org/r/20220105120442.14418-1-linmq006@gmail.com
>>>> v2: https://lore.kernel.org/r/20220106124657.32737-1-linmq006@gmail.com
>>> Maybe a bit late since we're at v3 already, but are there no devm_
>>> functions here that would dtrt automatically?
>> Sorry I don't see one, or we can use devm_add_action_or_reset() to add handling
>>
>> action. something like disp_cc_sm8250_probe() in drivers/clk/qcom/dispcc-sm8250.c
>>
>> How do you think?
> Looks like there's a devm_pm_runtime_enable() helper that does exactly
> that. See commit b3636a3a2c51 ("PM: runtime: add devm_pm_runtime_enable
> helper"). I haven't seen any large janitorial series yet for that, so
> perhaps it's just not widely known yet.
Great, very helpful. Thanks for your kind reminder.
> Thierry
next prev parent reply other threads:[~2022-06-02 2:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 12:20 [PATCH v3] drm/v3d/v3d_drv: Fix PM disable depth imbalance Miaoqian Lin
2022-06-01 13:26 ` Daniel Vetter
2022-06-01 13:26 ` Daniel Vetter
2022-06-01 13:55 ` Miaoqian Lin
2022-06-01 14:47 ` Thierry Reding
2022-06-01 14:47 ` Thierry Reding
2022-06-02 2:05 ` Miaoqian Lin [this message]
2022-06-02 2:05 ` Miaoqian Lin
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=59ea53d6-2856-fedd-3a5e-6ad5bdcd4a20@gmail.com \
--to=linmq006@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=emma@anholt.net \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.