Skip to content

Adjust dGPU handling for BACO

Mario Limonciello amd-gfx 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v1 RFC3 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* Rework flags and flow
* Try to do runtime suspend first, and if it fails do system suspend

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/amd: Allow dGPUs that support BACO to use smart suspenddrivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+16 -160 replies
2/3drm/amd: Don't always set s3 for dGPUs in all sleep modesdrivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+6 -20 replies
3/3drm/amd: Add special handling for system s0ix state w/ dGPUsdrivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+12 -32 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] Adjust dGPU handling for BACO

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(-)
Signature · 1 line
2.34.1