[PATCH 01/17] drm/amdgpu: handle enforce isolation on non-0 gfxhub

SRINIVASAN SHANMUGAM srinivasan.shanmugam at amd.com
Thu Aug 15 03:00:43 UTC 2024


On 8/15/2024 5:34 AM, Alex Deucher wrote:
> Some chips have more than one gfxhub so check if we
> are a gfxhub rather than just gfxhub 0.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> index b6a8bddada4c..6608eeb61e5a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> @@ -484,7 +484,7 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
>   bool amdgpu_vmid_uses_reserved(struct amdgpu_vm *vm, unsigned int vmhub)
>   {
>   	return vm->reserved_vmid[vmhub] ||
> -		(enforce_isolation && (vmhub == AMDGPU_GFXHUB(0)));
> +		(enforce_isolation && AMDGPU_IS_GFXHUB(vmhub));
>   }
>   
>   int amdgpu_vmid_alloc_reserved(struct amdgpu_device *adev,
Modification to check if the vmhub is a gfxhub, rather than just 
checking for gfxhub 0, is a necessary for memory management and data 
transfer in systems with multiple gfxhubs, It ensures that all gfxhubs 
are considered for multiple GPU's.

Based on my this understanding of the changes.

Acked-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>


More information about the amd-gfx mailing list