On Thu, Aug 22, 2024 at 03:20:21PM +1000, Jonathan Gray wrote:
> On Wed, Aug 21, 2024 at 10:11:45PM -0400, Josh Rickmar wrote:
> > >Synopsis:  S3 amdgpu resume broken on latest kernels
> > >Category:  amdgpu
> > >Environment:
> >     System      : OpenBSD 7.6
> >     Details     : OpenBSD 7.6-beta (GENERIC.MP) #48: Wed Aug 21 21:59:08 
> > EDT 2024
> >                      
> > jr...@desktop.zettaport.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > 
> >     Architecture: OpenBSD.amd64
> >     Machine     : amd64
> > >Description:
> > 
> > Initially I thought this was due to S0ix but after building my own
> > bisecting my own kernels, it seems something tickled the S3 codepath
> > for me in a way that breaks my resume.  I've bisected it down to this
> > commit:
> > 
> > 2024-08-16 cc2e793a kettenis  Hook up a few more bits of suspend/resume 
> > power management code.  This
> > 
> > and more specifically, an added call to amdgpu_pmops_suspend_noirq()
> > that seems like it should not be running on my hardware.
> 
> does this help?

No, still fails to resume with the full patch below.

> 
> reverts our rev 1.16 'Skip the FADT check on OpenBSD' and adds
> 
> 'drm/amd: Explicitly check for GFXOFF to be enabled for s0ix'
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=e4c44b1a19625348fc004ce8c5f828d5d80d037e
> 
> if it helps, is removing the ifdef without adding the if block enough?
> 
> Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c,v
> diff -u -p -r1.16 amdgpu_acpi.c
> --- sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c  17 Aug 2024 10:41:24 -0000      
> 1.16
> +++ sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c  22 Aug 2024 05:12:52 -0000
> @@ -1519,7 +1519,9 @@ bool amdgpu_acpi_is_s0ix_active(struct a
>       if (adev->asic_type < CHIP_RAVEN)
>               return false;
>  
> -#ifdef __linux__
> +     if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
> +             return false;
> +
>       /*
>        * 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
> @@ -1532,7 +1534,6 @@ 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