aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorSrinivasan Shanmugam <[email protected]>2024-03-20 01:12:38 +0000
committerAlex Deucher <[email protected]>2024-08-21 02:06:43 +0000
commitdba1a6cfc311833e10df978f07147ea93b7045fa (patch)
tree78bc42ece0af8f27fa7c431ad4fcee4cba1b593d /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentdrm/amdgpu: abort KIQ waits when there is a pending reset (diff)
downloadkernel-dba1a6cfc311833e10df978f07147ea93b7045fa.tar.gz
kernel-dba1a6cfc311833e10df978f07147ea93b7045fa.zip
drm/amdgpu: Enforce isolation as part of the job
This patch adds a new parameter 'enforce_isolation' to the amdgpu_job structure. This parameter is used to determine whether shader isolation should be enforced for a job. The enforce_isolation parameter is then stored in the amdgpu_job structure and used when flushing the VM. The enforce_isolation field of the amdgpu_job structure is set directly after the job is allocated This change allows more fine-grained control over shader isolation, making it possible to enforce isolation on a per-job basis rather than globally. This can be useful in scenarios where only certain jobs require isolation. Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> Suggested-by: Christian König <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 71ef3308be92..1468222ea0cd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -682,7 +682,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
ring->funcs->emit_wreg;
if (adev->gfx.enable_cleaner_shader &&
- ring->funcs->emit_cleaner_shader)
+ ring->funcs->emit_cleaner_shader &&
+ job->enforce_isolation)
ring->funcs->emit_cleaner_shader(ring);
if (!vm_flush_needed && !gds_switch_needed && !need_pipe_sync)