> From: Greg Steuck <gne...@openbsd.org>
> Date: Thu, 15 Aug 2024 20:36:03 -0700
> 
> Mark Kettenis <mark.kette...@xs4all.nl> writes:
> 
> > The diff also defines CONFIG_AMD_PMC and #ifdefs out the FADT check.
> > With that suspend-to-idle also works on that m715q.  I'm still not
> > entirely sure what to do there.  But I'll probably propose to commit
> > those separately such that we can easily back those bits out.
> >
> > Thoughts?  Tests?  ok?
> 
> My machine is now reliably going to sleep and wakes up. Thanks for the patch!

I've now committed the diff, except for the bit that #ifdefs out the
FADT low power S0 idle bit check.  See below.

Your machine defenitely doesn't have that FADT bit set.  In hindsight
that may be not so surprising as this machine seems to be desktop
instead of a laptop.

I looked a bit at the how the in_s0ix variable is used in amdgpu(4)
and there seem to be extensive firmware interactions that get bypassed
if that variable isn't set.  So the comment in the code that checks
the bit makes some sense.

So can you try what happens on your machine if you try to suspend with
the check still enabled (i.e. what's in the tree right now).  If that
works, and you have a means to check power consumption, can you check
if applying the diff below lowers the power consumption?

Thanks,

Mark


Index: amdgpu_acpi.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c,v
diff -u -p -r1.15 amdgpu_acpi.c
--- amdgpu_acpi.c       16 Aug 2024 10:26:20 -0000      1.15
+++ amdgpu_acpi.c       16 Aug 2024 11:10:25 -0000
@@ -1519,6 +1519,7 @@ bool amdgpu_acpi_is_s0ix_active(struct a
        if (adev->asic_type < CHIP_RAVEN)
                return false;
 
+#ifdef __linux__
        /*
         * If ACPI_FADT_LOW_POWER_S0 is not set in the FADT, it is generally
         * risky to do any special firmware-related preparations for entering
@@ -1531,6 +1532,7 @@ bool amdgpu_acpi_is_s0ix_active(struct a
                              "To use suspend-to-idle change the sleep mode in 
BIOS setup.\n");
                return false;
        }
+#endif
 
 #if !IS_ENABLED(CONFIG_AMD_PMC)
        dev_err_once(adev->dev,

Reply via email to