From: Randy Dunlap <rdunlap@infradead.org>
To: Maxime Ripard <maxime@cerno.tech>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Daniel Vetter <daniel.vetter@intel.com>,
David Airlie <airlied@linux.ie>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-rpi-kernel@lists.infradead.org,
Florian Fainelli <f.fainelli@gmail.com>,
Nicolas Saenz Julienne <nsaenz@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Nathan Chancellor <nathan@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH v2] drm/vc4: Unselect PM
Date: Fri, 24 Sep 2021 13:41:55 -0700 [thread overview]
Message-ID: <2779d5a5-8b02-ef32-0388-2f50c121e72d@infradead.org> (raw)
In-Reply-To: <20210924152334.1342630-1-maxime@cerno.tech>
On 9/24/21 8:23 AM, Maxime Ripard wrote:
> It turns out we can't select PM when allowing the compilation for
> COMPILE_TEST. Indeed, PM might not be defined at all, or come with extra
> requirements we can't meet.
>
> This select was initially introduced since we need to call the
> vc4_hdmi_runtime_resume() at probe time to make sure our device is
> properly powered at bind time, no matter whether PM is there or not, and
> we needed to make sure we didn't have a defined but not used warning for
> vc4_hdmi_runtime_suspend().
>
> This will still happen on platforms that don't define PM though, since
> SET_RUNTIME_PM_OPS will then be a nop. In order to fix both issues,
> let's remove the select, and add a __maybe_unused attribute to
> vc4_hdmi_runtime_resume().
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>
LGTM. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> ---
>
> I'm not sure how to merge this one, since this commit has been reverted
> in Linus tree, and un-reverted in linux-next. Should we wait a bit until
> the reworked version of the original commit has been merged again?
>
> Maxime
>
> Changes from v1:
> - remove select
> - add __maybe_unused to vc4_hdmi_runtime_resume
> - reword the commit log
> ---
> drivers/gpu/drm/vc4/Kconfig | 1 -
> drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig
> index 52a1c309cb4a..345a5570a3da 100644
> --- a/drivers/gpu/drm/vc4/Kconfig
> +++ b/drivers/gpu/drm/vc4/Kconfig
> @@ -9,7 +9,6 @@ config DRM_VC4
> select DRM_KMS_CMA_HELPER
> select DRM_GEM_CMA_HELPER
> select DRM_PANEL_BRIDGE
> - select PM
> select SND_PCM
> select SND_PCM_ELD
> select SND_SOC_GENERIC_DMAENGINE_PCM
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 500cdd56b335..1f2690ed8542 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -2122,7 +2122,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)
> return 0;
> }
>
> -static int vc4_hdmi_runtime_suspend(struct device *dev)
> +static int __maybe_unused vc4_hdmi_runtime_suspend(struct device *dev)
> {
> struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
>
>
--
~Randy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-09-24 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 15:23 [PATCH v2] drm/vc4: Unselect PM Maxime Ripard
2021-09-24 15:46 ` Nathan Chancellor
2021-09-24 20:41 ` Randy Dunlap [this message]
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=2779d5a5-8b02-ef32-0388-2f50c121e72d@infradead.org \
--to=rdunlap@infradead.org \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime@cerno.tech \
--cc=nathan@kernel.org \
--cc=nsaenz@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=tzimmermann@suse.de \
/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.