aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2019-10-28 18:47:38 +0000
committerAlex Deucher <[email protected]>2019-11-19 21:42:49 +0000
commita69cba42b11ae5e8cede2ee6a61d9faf5187df9b (patch)
tree124af9689a7714a9785da6e0922dbd3c3698ea7a /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/amdgpu: add supports_baco callback for NV asics. (diff)
downloadkernel-a69cba42b11ae5e8cede2ee6a61d9faf5187df9b.tar.gz
kernel-a69cba42b11ae5e8cede2ee6a61d9faf5187df9b.zip
drm/amdgpu: add a amdgpu_device_supports_baco helper
BACO - Bus Active, Chip Off To check if a device supports BACO or not. This will be used in determining when to enable runtime pm. Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 27ed48bde3fa..314138a95ccd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -154,6 +154,21 @@ bool amdgpu_device_is_px(struct drm_device *dev)
}
/**
+ * amdgpu_device_supports_baco - Does the device support BACO
+ *
+ * @dev: drm_device pointer
+ *
+ * Returns true if the device supporte BACO,
+ * otherwise return false.
+ */
+bool amdgpu_device_supports_baco(struct drm_device *dev)
+{
+ struct amdgpu_device *adev = dev->dev_private;
+
+ return amdgpu_asic_supports_baco(adev);
+}
+
+/**
* VRAM access helper functions.
*
* amdgpu_device_vram_access - read/write a buffer in vram