All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Lijo Lazar <Lijo.Lazar@amd.com>,
	Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
Date: Mon, 23 Aug 2021 16:31:42 -0400	[thread overview]
Message-ID: <CADnq5_PEOr=bcmLF2x67hx24=EWwH7DAgEsPjYqXgf8i-beEhg@mail.gmail.com> (raw)
In-Reply-To: <YSQE6fN9uO0CIWeh@zn.tnic>

On Mon, Aug 23, 2021 at 4:27 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Mon, Aug 23, 2021 at 03:49:39PM -0400, Alex Deucher wrote:
> > Maybe fixed with this patch?
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5706cb3c910cc8283f344bc37a889a8d523a2c6d
>
> Nope, this one is already in:
>
> $ git tag --contains 5706cb3c910cc8283f344bc37a889a8d523a2c6d
> v5.14-rc5
> v5.14-rc6
> v5.14-rc7
>
> also, from only a quick poke so IMHO, the error says:
>
> ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
>
> which means you need the
>
> EXPORT_SYMBOL_GPL(pm_suspend_target_state);
>
> which is in kernel/power/suspend.c which gets enabled with
>
> obj-$(CONFIG_SUSPEND)           += suspend.o
>
> and if you look at PM_SLEEP:
>
> config PM_SLEEP
>         def_bool y
>         depends on SUSPEND || HIBERNATE_CALLBACKS
>
> (notice the ||)
>
> and my randconfig has:
>
> $ grep -E "(HIBERNATE_CALLBACKS|SUSPEND)" .config
> # CONFIG_SUSPEND is not set
> CONFIG_HIBERNATE_CALLBACKS=y
>
> which means, you need:
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 4137e848f6a2..a9ce3b20d371 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
>   */
>  bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
>  {
> -#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
> +#if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_SUSPEND)
>         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;
>
>
> but whether that gives you what you want for amdgpu, you probably need
> to ponder on a bit.
>
> I sincerely hope that helps a little.

Thanks.  I think that should do the trick.  Care to send that as a formal patch?

Alex

  reply	other threads:[~2021-08-23 20:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 19:42 ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Borislav Petkov
2021-08-23 19:49 ` Alex Deucher
2021-08-23 19:49   ` Alex Deucher
2021-08-23 20:28   ` Borislav Petkov
2021-08-23 20:31     ` Alex Deucher [this message]
2021-08-23 20:31       ` Alex Deucher
2021-08-23 20:46       ` Borislav Petkov
2021-08-23 20:49         ` Alex Deucher
2021-08-23 20:49           ` Alex Deucher
2021-08-24  9:42           ` [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state module export Borislav Petkov
2021-08-24 13:08             ` Lazar, Lijo
2021-08-24 13:40               ` Borislav Petkov
2021-08-24 13:52                 ` Lazar, Lijo
2021-08-24 14:37                   ` Borislav Petkov
2021-08-24 15:16             ` Lazar, Lijo
2021-08-24 15:57               ` Alex Deucher
2021-08-24 15:57                 ` Alex Deucher

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_PEOr=bcmLF2x67hx24=EWwH7DAgEsPjYqXgf8i-beEhg@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Lijo.Lazar@amd.com \
    --cc=Pratik.Vishwakarma@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    /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.