mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-14 06:45:43 -04:00
drm/xe/display: Use acpi_target_system_state only if ACPI_SLEEP is enabled
This fixes the build error below with CONFIG_ACPI_SLEEP=n: drivers/gpu/drm/xe/xe_display.c:334:23: error: implicit declaration of function ‘acpi_target_system_state’; did you mean ‘acpi_get_system_info’? [-Werror=implicit-function-declaration] 334 | bool s2idle = acpi_target_system_state() < ACPI_STATE_S3; Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
committed by
Rodrigo Vivi
parent
9914e19cc2
commit
04316b4ae6
@@ -319,9 +319,18 @@ static void intel_suspend_encoders(struct xe_device *xe)
|
||||
drm_modeset_unlock_all(dev);
|
||||
}
|
||||
|
||||
static bool suspend_to_idle(void)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_ACPI_SLEEP)
|
||||
if (acpi_target_system_state() < ACPI_STATE_S3)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void xe_display_pm_suspend(struct xe_device *xe)
|
||||
{
|
||||
bool s2idle = acpi_target_system_state() < ACPI_STATE_S3;
|
||||
bool s2idle = suspend_to_idle();
|
||||
if (!xe->info.enable_display)
|
||||
return;
|
||||
|
||||
@@ -350,7 +359,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
|
||||
|
||||
void xe_display_pm_suspend_late(struct xe_device *xe)
|
||||
{
|
||||
bool s2idle = acpi_target_system_state() < ACPI_STATE_S3;
|
||||
bool s2idle = suspend_to_idle();
|
||||
if (!xe->info.enable_display)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user