/**
* DOC: enforce_isolation (int)
* enforce process isolation between graphics and compute.
- * (-1 = auto, 0 = disable, 1 = enable, 2 = enable legacy mode)
+ * (-1 = auto, 0 = disable, 1 = enable, 2 = enable legacy mode, 3 = enable without cleaner shader)
*/
module_param_named(enforce_isolation, amdgpu_enforce_isolation, int, 0444);
MODULE_PARM_DESC(enforce_isolation,
-"enforce process isolation between graphics and compute. (-1 = auto, 0 = disable, 1 = enable, 2 = enable legacy mode)");
+"enforce process isolation between graphics and compute. (-1 = auto, 0 = disable, 1 = enable, 2 = enable legacy mode, 3 = enable without cleaner shader)");
/**
* DOC: modeset (int)
* Provides the sysfs read interface to get the current settings of the 'enforce_isolation'
* feature for each GPU partition. Reading from the 'enforce_isolation'
* sysfs file returns the isolation settings for all partitions, where '0'
- * indicates disabled, '1' indicates enabled, and '2' indicates enabled in legacy mode.
+ * indicates disabled, '1' indicates enabled, and '2' indicates enabled in legacy mode,
+ * and '3' indicates enabled without cleaner shader.
*
* Return: The number of bytes read from the sysfs file.
*/
* @count: The size of the input data
*
* This function allows control over the 'enforce_isolation' feature, which
- * serializes access to the graphics engine. Writing '1', '2', or '0' to the
- * 'enforce_isolation' sysfs file enables (full or legacy) or disables process
- * isolation for each partition. The input should specify the setting for all
+ * serializes access to the graphics engine. Writing '0' to disable, '1' to
+ * enable isolation with cleaner shader, '2' to enable legacy isolation without
+ * cleaner shader, or '3' to enable process isolation without submitting the
+ * cleaner shader to the 'enforce_isolation' sysfs file sets the isolation mode
+ * for each partition. The input should specify the setting for all
* partitions.
*
* Return: The number of bytes written to the sysfs file.
for (i = 0; i < num_partitions; i++) {
if (partition_values[i] != 0 &&
partition_values[i] != 1 &&
- partition_values[i] != 2)
+ partition_values[i] != 2 &&
+ partition_values[i] != 3)
return -EINVAL;
}
adev->enforce_isolation[i] =
AMDGPU_ENFORCE_ISOLATION_ENABLE_LEGACY;
break;
+ case 3:
+ adev->enforce_isolation[i] =
+ AMDGPU_ENFORCE_ISOLATION_NO_CLEANER_SHADER;
+ break;
}
}
mutex_unlock(&adev->enforce_isolation_mutex);