aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-09-05 14:25:58 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-09-20 12:24:21 -0400
commitbb0f84293e61f052f96f8bec75844b43ea2e3822 (patch)
treeae46d4108b967b1b1b6210a33a599f8eb7dc1ded /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent3ef07651a5756e7de65615e18eacbf8822c23016 (diff)
downloadlinux-bb0f84293e61f052f96f8bec75844b43ea2e3822.tar.gz
linux-bb0f84293e61f052f96f8bec75844b43ea2e3822.tar.bz2
linux-bb0f84293e61f052f96f8bec75844b43ea2e3822.zip
drm/amd: Move seamless boot check out of display
This will allow base driver to dictate whether seamless should be enabled. No intended functional changes. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ca56b5a543b4..7187eeb8ffa6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1359,6 +1359,27 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
}
/*
+ * Check whether seamless boot is supported.
+ *
+ * So far we only support seamless boot on select ASICs.
+ * If everything goes well, we may consider expanding
+ * seamless boot to other ASICs.
+ */
+bool amdgpu_device_seamless_boot_supported(struct amdgpu_device *adev)
+{
+ switch (adev->ip_versions[DCE_HWIP][0]) {
+ case IP_VERSION(3, 0, 1):
+ if (!adev->mman.keep_stolen_vga_memory)
+ return true;
+ break;
+ default:
+ break;
+ }
+
+ return false;
+}
+
+/*
* Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
* speed switching. Until we have confirmation from Intel that a specific host
* supports it, it's safer that we keep it disabled for all.