Enable legacy enforce isolation (just serialize kernel
GC submissions) for gfx9+.  This way we can reset a ring and
only affect the the process currently using that ring.
This mirrors what windows does.

Reviewed-by: Christian König <christian.koe...@amd.com>
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 13070211dc69c..508546ef55787 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2148,9 +2148,7 @@ static int amdgpu_device_check_arguments(struct 
amdgpu_device *adev)
 
        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;
@@ -2164,6 +2162,17 @@ static int amdgpu_device_check_arguments(struct 
amdgpu_device *adev)
                        adev->enforce_isolation[i] =
                                AMDGPU_ENFORCE_ISOLATION_ENABLE_LEGACY;
                        break;
+               case -1:
+               default:
+                       /* disable by default on GFX8 and older */
+                       if (adev->asic_type <= CHIP_VEGAM)
+                               /* disable */
+                               adev->enforce_isolation[i] = 
AMDGPU_ENFORCE_ISOLATION_DISABLE;
+                       else
+                               /* enable legacy mode */
+                               adev->enforce_isolation[i] =
+                                       AMDGPU_ENFORCE_ISOLATION_ENABLE_LEGACY;
+                       break;
                case 3:
                        /* enable only process isolation without submitting 
cleaner shader */
                        adev->enforce_isolation[i] =
-- 
2.49.0

Reply via email to