LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Linux-Next Mailing List" <linux-next@vger.kernel.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled
Date: Fri, 30 Jul 2021 10:37:54 -0400 [thread overview]
Message-ID: <CADnq5_PPYtdb17WLtgjeS3THXBeHw_DyMKueZ4LP8cVS1G8Tcw@mail.gmail.com> (raw)
In-Reply-To: <20210730030347.13996-1-rdunlap@infradead.org>
Applied. Thanks!
Alex
On Thu, Jul 29, 2021 at 11:03 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP
> is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set,
> PM_SLEEP is not set, so this variable cannot be used.
>
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’:
> ../drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1046:11: error: ‘pm_suspend_target_state’ undeclared (first use in this function); did you mean ‘__KSYM_pm_suspend_target_state’?
> return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
> ^~~~~~~~~~~~~~~~~~~~~~~
> __KSYM_pm_suspend_target_state
>
> Also use shorter IS_ENABLED(CONFIG_foo) notation for checking the
> 2 config symbols.
>
> Fixes: 91b03fc6b50c ("drm/amdgpu: Check pmops for desired suspend state")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-next@vger.kernel.org
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linext-20210729.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ linext-20210729/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
> */
> bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
> {
> -#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
> +#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
> if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
> if (adev->flags & AMD_IS_APU)
> return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
prev parent reply other threads:[~2021-07-30 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 3:03 Randy Dunlap
2021-07-30 14:37 ` Alex Deucher [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=CADnq5_PPYtdb17WLtgjeS3THXBeHw_DyMKueZ4LP8cVS1G8Tcw@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=Xinhui.Pan@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@infradead.org \
--subject='Re: [PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled' \
/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
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).