drm/amdgpu: Make enforce_isolation setting per GPU
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Mon, 29 Jul 2024 16:05:26 +0000 (21:35 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Aug 2024 18:27:45 +0000 (14:27 -0400)
commit96595204195d7e13736a84295e217316610d4cdb
tree5d4a0c67dae7ca3565e3bc2f8df43908f70c267d
parentee7a846ea27bcbef5182d15923339a7bf182ec65
drm/amdgpu: Make enforce_isolation setting per GPU

This commit makes enforce_isolation setting to be per GPU and per
partition by adding the enforce_isolation array to the adev structure.
The adev variable is set based on the global enforce_isolation module
parameter during device initialization.

In amdgpu_ids.c, the adev->enforce_isolation value for the current GPU
is used to determine whether to enforce isolation between graphics and
compute processes on that GPU.

In amdgpu_ids.c, the adev->enforce_isolation value for the current GPU
and partition is used to determine whether to enforce isolation between
graphics and compute processes on that GPU and partition.

This allows the enforce_isolation setting to be controlled individually
for each GPU and each partition, which is useful in a system with
multiple GPUs and partitions where different isolation settings might be
desired for different GPUs and partitions.

v2: fix loop in amdgpu_vmid_mgr_init() (Alex)

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h