summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-02-24 12:40:36 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-02-24 12:40:36 +0000
commit3c35ceeaae745d6b655e818cfdfb7b7f3cf40ac0 (patch)
tree9fff6548d67869f628933dac6cfd704af194f11f /sys/dev/pci/drm/amd/amdgpu/amdgpu.h
parente9dccfcb32ee5ebc63a7c3c9f8da1e858ac2116e (diff)
drm/amd: Warn users about potential s0ix problems
From Mario Limonciello 64519c9e32ac548fd47cf16767f4b779a8cbdd14 in linux 5.15.y/5.15.25 a6ed2035878e5ad2e43ed175d8812ac9399d6c40 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu.h b/sys/dev/pci/drm/amd/amdgpu/amdgpu.h
index 75dc34ecab3..df282ca51b0 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu.h
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu.h
@@ -1428,12 +1428,10 @@ int amdgpu_acpi_smart_shift_update(struct drm_device *dev, enum amdgpu_ss ss_sta
int amdgpu_acpi_pcie_notify_device_ready(struct amdgpu_device *adev);
void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps);
-bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev);
void amdgpu_acpi_detect(void);
#else
static inline int amdgpu_acpi_init(struct amdgpu_device *adev) { return 0; }
static inline void amdgpu_acpi_fini(struct amdgpu_device *adev) { }
-static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; }
static inline void amdgpu_acpi_detect(void) { }
static inline bool amdgpu_acpi_is_power_shift_control_supported(void) { return false; }
static inline int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
@@ -1442,6 +1440,12 @@ static inline int amdgpu_acpi_smart_shift_update(struct drm_device *dev,
enum amdgpu_ss ss_state) { return 0; }
#endif
+#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
+bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev);
+#else
+static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; }
+#endif
+
int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
uint64_t addr, struct amdgpu_bo **bo,
struct amdgpu_bo_va_mapping **mapping);