From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Francois Dugast <francois.dugast@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v2 1/1] drm/xe/display: Use acpi_target_system_state only if ACPI_SLEEP is enabled
Date: Tue, 5 Sep 2023 17:08:46 -0400 [thread overview]
Message-ID: <ZPeY3vOAHuusDtZe@intel.com> (raw)
In-Reply-To: <20230905194942.7-2-francois.dugast@intel.com>
On Tue, Sep 05, 2023 at 07:49:42PM +0000, Francois Dugast wrote:
> 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>
> ---
> drivers/gpu/drm/xe/xe_display.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
> index b6b547c4877c..a453946ad108 100644
> --- a/drivers/gpu/drm/xe/xe_display.c
> +++ b/drivers/gpu/drm/xe/xe_display.c
> @@ -329,9 +329,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;
>
> @@ -360,7 +369,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;
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-09-05 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 19:49 [Intel-xe] [PATCH v2 0/1] Use acpi_target_system_state only if ACPI_SLEEP is enabled Francois Dugast
2023-09-05 19:49 ` [Intel-xe] [PATCH v2 1/1] drm/xe/display: " Francois Dugast
2023-09-05 21:08 ` Rodrigo Vivi [this message]
2023-09-05 20:05 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-09-05 20:05 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-05 20:06 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-05 20:13 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-05 20:13 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-09-05 20:15 ` [Intel-xe] ✓ CI.checksparse: success " Patchwork
2023-09-07 17:29 ` [Intel-xe] ✗ CI.Patch_applied: failure for Use acpi_target_system_state only if ACPI_SLEEP is enabled (rev2) Patchwork
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=ZPeY3vOAHuusDtZe@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.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 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).