* [PATCH] drm/amdgpu: Fix build error reported for some config
@ 2021-07-27 6:28 Pratik Vishwakarma
2021-07-28 11:03 ` Lazar, Lijo
0 siblings, 1 reply; 2+ messages in thread
From: Pratik Vishwakarma @ 2021-07-27 6:28 UTC (permalink / raw
To: Alexander.Deucher, amd-gfx
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’:
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function)
1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: note: each undeclared identifier is reported only once for each function it appears in
CC [M] drivers/media/usb/dvb-usb/nova-t-usb2.o
CC [M] drivers/usb/gadget/legacy/audio.o
CC [M] drivers/net/ethernet/intel/igc/igc_tsn.o
CC [M] net/mac80211/mlme.o
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:59: error: ‘PM_SUSPEND_TO_IDLE’ undeclared (first use in this function)
1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
| ^~~~~~~~~~~~~~~~~~
CC [M] drivers/usb/gadget/function/f_sourcesink.o
make[4]: *** [scripts/Makefile.build:272: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.o] Error 1
make[3]: *** [scripts/Makefile.build:515: drivers/gpu/drm/amd/amdgpu] Error 2
Check if PM_SLEEP and SUSPEND are supported.
Fixes: 69e81db337c1 drm/amdgpu: Check pmops for desired suspend state
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 0c281c7f5cea..4c1f2ac61f9a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1040,10 +1040,12 @@ 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_SUSPEND) && 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;
}
+#endif
#endif
return false;
}
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: Fix build error reported for some config
2021-07-27 6:28 [PATCH] drm/amdgpu: Fix build error reported for some config Pratik Vishwakarma
@ 2021-07-28 11:03 ` Lazar, Lijo
0 siblings, 0 replies; 2+ messages in thread
From: Lazar, Lijo @ 2021-07-28 11:03 UTC (permalink / raw
To: Pratik Vishwakarma, Alexander.Deucher, amd-gfx
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
On 7/27/2021 11:58 AM, Pratik Vishwakarma wrote:
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function ‘amdgpu_acpi_is_s0ix_active’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: error: ‘pm_suspend_target_state’ undeclared (first use in this function)
> 1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
> | ^~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:32: note: each undeclared identifier is reported only once for each function it appears in
> CC [M] drivers/media/usb/dvb-usb/nova-t-usb2.o
> CC [M] drivers/usb/gadget/legacy/audio.o
> CC [M] drivers/net/ethernet/intel/igc/igc_tsn.o
> CC [M] net/mac80211/mlme.o
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:1045:59: error: ‘PM_SUSPEND_TO_IDLE’ undeclared (first use in this function)
> 1045 | return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
> | ^~~~~~~~~~~~~~~~~~
> CC [M] drivers/usb/gadget/function/f_sourcesink.o
> make[4]: *** [scripts/Makefile.build:272: drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.o] Error 1
> make[3]: *** [scripts/Makefile.build:515: drivers/gpu/drm/amd/amdgpu] Error 2
>
> Check if PM_SLEEP and SUSPEND are supported.
>
> Fixes: 69e81db337c1 drm/amdgpu: Check pmops for desired suspend state
> Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 0c281c7f5cea..4c1f2ac61f9a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1040,10 +1040,12 @@ 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_SUSPEND) && 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;
> }
> +#endif
> #endif
> return false;
> }
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-28 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-27 6:28 [PATCH] drm/amdgpu: Fix build error reported for some config Pratik Vishwakarma
2021-07-28 11:03 ` Lazar, Lijo
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.