mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/amdgpu: adjust enforce_isolation handling
Switch from a bool to an enum and allow more options for enforce isolation. There are now 3 modes of operation: - Disabled (0) - Enabled (serialization and cleaner shader) (1) - Enabled in legacy mode (no serialization or cleaner shader) (2) This provides better flexibility for more use cases. Acked-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -2145,8 +2145,26 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev)
|
||||
|
||||
adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
|
||||
|
||||
for (i = 0; i < MAX_XCP; i++)
|
||||
adev->enforce_isolation[i] = !!enforce_isolation;
|
||||
for (i = 0; i < MAX_XCP; i++) {
|
||||
switch (amdgpu_enforce_isolation) {
|
||||
case -1:
|
||||
case 0:
|
||||
default:
|
||||
/* disable */
|
||||
adev->enforce_isolation[i] = AMDGPU_ENFORCE_ISOLATION_DISABLE;
|
||||
break;
|
||||
case 1:
|
||||
/* enable */
|
||||
adev->enforce_isolation[i] =
|
||||
AMDGPU_ENFORCE_ISOLATION_ENABLE;
|
||||
break;
|
||||
case 2:
|
||||
/* enable legacy mode */
|
||||
adev->enforce_isolation[i] =
|
||||
AMDGPU_ENFORCE_ISOLATION_ENABLE_LEGACY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user