This series adjusts the handling for dGPUs when the system is going into s2idle. The intent is to match the following truth table below: +-------------------+----------------------------------+----------------------------------+-----------------------------+ | | s2idle (no FADT) | s2idle (FADT) | deep | +-------------------+----------------------------------+----------------------------------+-----------------------------+ | APU Prepare | 0 | 0 | 0 | | APU Suspend | Run | Run | Run | | BACO dGPU Prepare | 1 if suspended | 1 if suspended | 1 if suspended | | BACO dGPU Suspend | Runtime suspend if prepare was 0 | Runtime suspend if prepare was 0 | S3 suspend if prepare was 0 | | BOCO dGPU Prepare | 1 | 1 | 1 if suspended | | BOCO dGPU Suspend | Runtime suspend if prepare was 0 | Runtime suspend if prepare was 0 | S3 suspend if prepare was 0 | +-------------------+----------------------------------+----------------------------------+-----------------------------+ That is BACO and BOCO are handled very similarly when system is doing s2idle. v1->v2: * Rework flags and flow * Try to do runtime suspend first, and if it fails do system suspend Mario Limonciello (3): drm/amd: Allow dGPUs that support BACO to use smart suspend drm/amd: Don't always set s3 for dGPUs in all sleep modes drm/amd: Add special handling for system s0ix state w/ dGPUs drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 44 +++++++++++++++--------- 2 files changed, 34 insertions(+), 21 deletions(-) -- 2.34.1