drm/amdgpu/gfx9: only init the apertures used by KGD
Subsystems (2)
PATCH 1/1 drm/amdgpu/gfx9: only init the apertures used by KGD
Use adev->vm_manager.id_mgr[0].num_ids rather than hardcoded 16.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -1
@@ -1526,7 +1526,7 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ mutex_lock (&adev->srbm_mutex); -for (i =0 ; i <16 ; i++) { +for (i =0 ; i < adev->vm_manager.id_mgr[0 ].num_ids; i++) {soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ if (i ==0 ) {
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180101211725.9404-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Chunming Zhou
Reviewed-byQuoted 13 lines · Alex Deucher
Use adev->vm_manager.id_mgr[0].num_ids rather than hardcoded 16.
Noticed-by Felix Kuehling <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_gpu_init(struct amdgpu_device *adev) · line 1532
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-1@@ -1526,7 +1526,7 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ mutex_lock (&adev->srbm_mutex); -for (i =0 ; i <16 ; i++) { +for (i =0 ; i < adev->vm_manager.id_mgr[0 ].num_ids; i++) {soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ if (i ==0 ) {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 01.01.2018 um 22:17 schrieb Alex Deucher:
Quoted 13 lines
Use adev->vm_manager.id_mgr[0].num_ids rather than hardcoded 16.
Noticed-by Felix Kuehling <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_gpu_init(struct amdgpu_device *adev) · line 1529
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-1@@ -1526,7 +1526,7 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)/* XXX SH_MEM regs */ /* where to put LDS, scratch, GPUVM in FSA64 space */ mutex_lock (&adev->srbm_mutex); -for (i =0 ; i <16 ; i++) { +for (i =0 ; i < adev->vm_manager.id_mgr[0 ].num_ids; i++) {
Using AMDGPU_GFXHUB instead of hardcoding 0 here would probably be a good idea.
Apart from that Reviewed-by: Christian König <[email protected]>
Regards,
Christian.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_gpu_init(struct amdgpu_device *adev) · line 1532
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0soc15_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ if (i ==0 ) {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx