Skip to contentSkip to conversation

drm/amdgpu/acpi: unify ATCS handling (v2)

PATCH New Alex Deucher 1 participant 1 message May 19, 2021

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/acpi: unify ATCS handling (v2)

Treat it like ATIF and check both the dGPU and APU for the method. This is required because ATCS may be hung off of the APU in ACPI on A+A systems.

v2: add back accidently removed ACPI handle check.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h      |  17 +---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 124 ++++++++++++++++-------
 2 files changed, 91 insertions(+), 50 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -15
index 3147c1c935c8..b92eb068be12 100644
@@ -269,6 +269,7 @@ struct amdgpu_irq_src;
 struct amdgpu_fpriv;
 struct amdgpu_bo_va_mapping;
 struct amdgpu_atif;
+struct amdgpu_atcs;
 struct kfd_vm_fault_info;
 struct amdgpu_hive_info;
 struct amdgpu_reset_context;
@@ -685,20 +686,6 @@ struct amdgpu_vram_scratch {
 	u64				gpu_addr;
 };
 
-/*
- * ACPI
- */
-struct amdgpu_atcs_functions {
-	bool get_ext_state;
-	bool pcie_perf_req;
-	bool pcie_dev_rdy;
-	bool pcie_bus_width;
-};
-
-struct amdgpu_atcs {
-	struct amdgpu_atcs_functions functions;
-};
-
 /*
  * CGS
  */
@@ -829,7 +816,7 @@ struct amdgpu_device {
 	struct amdgpu_i2c_chan		*i2c_bus[AMDGPU_MAX_I2C_BUS];
 	struct debugfs_blob_wrapper     debugfs_vbios_blob;
 	struct amdgpu_atif		*atif;
-	struct amdgpu_atcs		atcs;
+	struct amdgpu_atcs		*atcs;
 	struct mutex			srbm_mutex;
 	/* GRBM index mutex. Protects concurrent access to GRBM index */
 	struct mutex                    grbm_idx_mutex;
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +89 -35

261 lines not on this page · raw message

Signature · 6 lines
2.31.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx