drm/amdgpu: kfd vmid should start after vmid for gfx userqueues end
Subsystems (2)
PATCH v2 1/2 drm/amdgpu: kfd vmid should start after vmid for gfx userqueues end
For GMC11, when KGD userqueues are enabled we should have vmid for kfd queues start after KGD userqueues VMID ends.
Use the variable gfx.disable_uq instead of gfx_disable_kq to check if userqueues are enabled or not. For mode 1 even when kernel queue submission is enabled but userqueues is also enabled at same time.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1 -1
@@ -846,7 +846,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.first_kfd_vmid = adev->gfx.disable_kq ?1 :8 ; + adev->vm_manager.first_kfd_vmid = adev->gfx.disable_uq ?1 :8 ;amdgpu_vm_manager_init (adev);
Signature · 1 line
2.34.1
PATCH v2 2/2 drm/amdgpu: kfd vmid should start after vmid for gfx userqueues end
For GMC12, when KGD userqueues are enabled we should have vmid for kfd queues start after KGD userqueues VMID ends.
Use the variable gfx.disable_uq instead of gfx_disable_kq to check if userqueues are enabled or not. For mode 1 even when kernel queue submission is enabled but userqueues is also enabled at same time.
--- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +1 -1
@@ -950,7 +950,7 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block)amdgpu_ip_version (adev,GC_HWIP ,0 ) ==IP_VERSION (12 ,1 ,0 ) ?3 :8 ; adev->vm_manager.first_kfd_vmid = - adev->gfx.disable_kq ?1 : (adev->vm_manager.first_kfd_vmid); + adev->gfx.disable_uq ?1 : (adev->vm_manager.first_kfd_vmid);amdgpu_vm_manager_init (adev);
Signature · 1 line
2.34.1
Christian König
maintainerQuoted 6 lines · Sunil Khatri
For GMC11, when KGD userqueues are enabled we should have vmid for kfd queues start after KGD userqueues VMID ends.
Use the variable gfx.disable_uq instead of
gfx_disable_kqto check if userqueues are enabled or not. For mode 1 even when kernel queue submission is enabled but userqueues is also enabled at same time.
Of hand that doesn't looks correct to me.
On GFX11 adev->vm_manager.first_kfd_vmid is the first VMID the MES will use and that should 8 when kq are enabled independent of the graphics userq feature.
Regards,
Christian.
Quoted 19 lines
Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1
-1@@ -846,7 +846,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.first_kfd_vmid = adev->gfx.disable_kq ?1 :8 ; + adev->vm_manager.first_kfd_vmid = adev->gfx.disable_uq ?1 :8 ;amdgpu_vm_manager_init (adev);
Quoted 5 lines · Christian König
Quoted 3 lines · Sunil Khatri
For GMC11, when KGD userqueues are enabled we should have vmid for kfd queues start after KGD userqueues VMID ends.
Quoted 8 lines
Quoted 3 lines
Use the variable gfx.disable_uq instead of
gfx_disable_kqto check if userqueues are enabled or not. For mode 1 even when kernel queue submission is enabled but userqueues is also enabled at same time.Of hand that doesn't looks correct to me.
On GFX11
adev->vm_manager.first_kfd_vmidis the first VMID the MES will use and that should 8 when kq are enabled independent of the graphics userq feature.
Right. When kernel queues are disabled, all of the vmids (except 0) are available to the MES for userqs (KGD or KFD).
Alex
Quoted 23 lines
Regards,
Christian.Quoted 19 lines
Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1
-1@@ -846,7 +846,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.first_kfd_vmid = adev->gfx.disable_kq ?1 :8 ; + adev->vm_manager.first_kfd_vmid = adev->gfx.disable_uq ?1 :8 ;amdgpu_vm_manager_init (adev);
Quoted 9 lines · Alex Deucher
Quoted 7 lines · Christian König
Quoted 6 lines · Sunil Khatri
For GMC11, when KGD userqueues are enabled we should have vmid for kfd queues start after KGD userqueues VMID ends.
Use the variable gfx.disable_uq instead of
gfx_disable_kqto check if userqueues are enabled or not. For mode 1 even when kernel queue submission is enabled but userqueues is also enabled at same time.
Quoted 8 lines
Quoted 4 lines
Of hand that doesn't looks correct to me.
On GFX11
adev->vm_manager.first_kfd_vmidis the first VMID the MES will use and that should 8 when kq are enabled independent of the graphics userq feature.Right. When kernel queues are disabled, all of the vmids (except 0) are available to the MES for userqs (KGD or KFD).
Alex
Got it. Thanks Alex and Christian.
Actually we are getting KFD SQ interrupts while we are only using the KGD userqueues, probably some other issue here.
Regards
Sunil Khatri
Quoted 22 lines
Quoted 22 lines
Regards,
Christian.Quoted 18 lines
Signed-off-by Sunil Khatri <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +1
-1@@ -846,7 +846,7 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)* amdgpu graphics/compute will use VMIDs 1-7 * amdkfd will use VMIDs 8-15 */ - adev->vm_manager.first_kfd_vmid = adev->gfx.disable_kq ?1 :8 ; + adev->vm_manager.first_kfd_vmid = adev->gfx.disable_uq ?1 :8 ;amdgpu_vm_manager_init (adev);