[PATCH] drm/amdgpu: Update VM flush condition for 'enforce_isolation'
Christian König
christian.koenig at amd.com
Tue Dec 10 08:55:44 UTC 2024
Am 10.12.24 um 09:50 schrieb Srinivasan Shanmugam:
> This patch updates the `amdgpu_vm_flush` function to ensure the cleaner
> shader is emitted when `enforce_isolation` is true and `vmid` is not set
> (ie., when job does not have a specific, unique memory space assigned to
> it. Instead, it uses a shared or common memory space that is accessible
> to multiple jobs or processes). Previously, the cleaner shader could be
> skipped if no VM flush, GDS switch, or pipe sync was needed, causing
> issues when manually triggering the cleaner shader.
>
> The new condition includes a check for `!(job->enforce_isolation &&
> !job->vmid)`, ensuring the cleaner shader is emitted when necessary in
> scenarios requiring enforced isolation.
>
> Fixes: 2feee98e6f2c ("drm/amdgpu: Update VM flush condition for 'enforce_isolation'")
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Suggested-by: Christian König <christian.koenig at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index db913d533898..77af9c389eae 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -674,7 +674,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
> pasid_mapping_needed &= adev->gmc.gmc_funcs->emit_pasid_mapping &&
> ring->funcs->emit_wreg;
>
> - if (!vm_flush_needed && !gds_switch_needed && !need_pipe_sync)
> + if (!vm_flush_needed && !gds_switch_needed && !need_pipe_sync &&
> + !(job->enforce_isolation && !job->vmid))
> return 0;
>
> amdgpu_ring_ib_begin(ring);
More information about the amd-gfx
mailing list