Skip to contentSkip to conversation

drm/amdgpu/gfx9: only init the apertures used by KGD

PATCH In review Alex Deucher 3 participants 3 messages Jan 1, 2018 – Jan 2, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 55670dbacace..4abaf802a260 100644
@@ -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

Reviewed-by
#2 lore raw
Quoted 13 lines · Alex Deucher

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 +0 -0
index 55670dbacace..4abaf802a260 100644

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

#3 lore raw
In reply to a message not in the archive

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.

---
  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
index 55670dbacace..4abaf802a260 100644

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 -0
  		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