summaryrefslogtreecommitdiff
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:59 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-09-20 12:24:39 -0400
commit5dc270d366bd0a67896ec46e874cb69ade513591 (patch)
treee07148819f74195e8d258a18998d2746cc0c933f /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent2fa73a101cd812bceb9d865fee296fc1057541a2 (diff)
drm/amd: Add a module parameter for seamless boot
The module parameter can be used to test more easily enabling seamless boot support on additional ASICs. 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.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7187eeb8ffa6..2116e016178a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1367,11 +1367,25 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
*/
bool amdgpu_device_seamless_boot_supported(struct amdgpu_device *adev)
{
+ switch (amdgpu_seamless) {
+ case -1:
+ break;
+ case 1:
+ return true;
+ case 0:
+ return false;
+ default:
+ DRM_ERROR("Invalid value for amdgpu.seamless: %d\n",
+ amdgpu_seamless);
+ return false;
+ }
+
+ if (adev->mman.keep_stolen_vga_memory)
+ return false;
+
switch (adev->ip_versions[DCE_HWIP][0]) {
case IP_VERSION(3, 0, 1):
- if (!adev->mman.keep_stolen_vga_memory)
- return true;
- break;
+ return true;
default:
break;
}