All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state" failed to apply to 5.14-stable tree
@ 2021-09-16 13:06 gregkh
  2021-09-16 15:24 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2021-09-16 13:06 UTC (permalink / raw)
  To: bp, alexander.deucher, lijo.lazar; +Cc: stable


The patch below does not apply to the 5.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a47f6a5806da4f24fbb66148a1519bf72fe060db Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>
Date: Tue, 24 Aug 2021 11:42:47 +0200
Subject: [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state
 module export

Building a randconfig here triggered:

  ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

because the module export of that symbol happens in
kernel/power/suspend.c which is enabled with CONFIG_SUSPEND.

The ifdef guards in amdgpu_acpi_is_s0ix_supported(), however, test for
CONFIG_PM_SLEEP which is defined like this:

  config PM_SLEEP
          def_bool y
          depends on SUSPEND || HIBERNATE_CALLBACKS

and that randconfig has:

  # CONFIG_SUSPEND is not set
  CONFIG_HIBERNATE_CALLBACKS=y

leading to the module export missing.

Change the ifdeffery to depend directly on CONFIG_SUSPEND.

Fixes: 5706cb3c910c ("drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/YSP6Lv53QV0cOAsd@zn.tnic
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 260ba01d303e..4811b0faafd9 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_active(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;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: FAILED: patch "[PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state" failed to apply to 5.14-stable tree
  2021-09-16 13:06 FAILED: patch "[PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state" failed to apply to 5.14-stable tree gregkh
@ 2021-09-16 15:24 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2021-09-16 15:24 UTC (permalink / raw)
  To: gregkh; +Cc: alexander.deucher, lijo.lazar, stable

On Thu, Sep 16, 2021 at 03:06:31PM +0200, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 5.14-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From a47f6a5806da4f24fbb66148a1519bf72fe060db Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <bp@suse.de>
> Date: Tue, 24 Aug 2021 11:42:47 +0200
> Subject: [PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state
>  module export
> 
> Building a randconfig here triggered:
> 
>   ERROR: modpost: "pm_suspend_target_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
> 
> because the module export of that symbol happens in
> kernel/power/suspend.c which is enabled with CONFIG_SUSPEND.
> 
> The ifdef guards in amdgpu_acpi_is_s0ix_supported(), however, test for
> CONFIG_PM_SLEEP which is defined like this:
> 
>   config PM_SLEEP
>           def_bool y
>           depends on SUSPEND || HIBERNATE_CALLBACKS
> 
> and that randconfig has:
> 
>   # CONFIG_SUSPEND is not set
>   CONFIG_HIBERNATE_CALLBACKS=y
> 
> leading to the module export missing.
> 
> Change the ifdeffery to depend directly on CONFIG_SUSPEND.
> 
> Fixes: 5706cb3c910c ("drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled")

Right, that Fixes tag points to a patch which is in:

$ git describe 5706cb3c910c
v5.14-rc3-28-g5706cb3c910c

and this here patch is in 5.14 (and trivially in 5.14-stable) already
too.

So I'm guessing that is a noop here.

Looking at lkml, you've queued that one for 5.13

Subject: [PATCH 5.13 027/113] drm/amdgpu: Fix build with missing pm_suspend_target_state module export

probably because the commit in Fixes was backported there too.

/me goes and checks...

Yap, it is:

commit 8330879408e590b0d576e2e65a0ced4d9ae804bb
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Thu Jul 29 20:03:47 2021 -0700

    drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled
    
    commit 5706cb3c910cc8283f344bc37a889a8d523a2c6d upstream.


Ok, all clear.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-16 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 13:06 FAILED: patch "[PATCH] drm/amdgpu: Fix build with missing pm_suspend_target_state" failed to apply to 5.14-stable tree gregkh
2021-09-16 15:24 ` Borislav Petkov

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.