drm/amdkfd: Fix MQD size calculation
Subsystems (3)
PATCH 1/2 drm/amdkfd: Fix MQD size calculation
On device initialization, a trunk of GTT memory is pre-allocated for HIQ and all SDMA queues mqd. The size of this allocation was wrong. The correct sdma engine number should be PCIe-optimized SDMA engine number plus xgmi SDMA engine number.
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -1
@@ -1849,7 +1849,8 @@ static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm)struct kfd_dev *dev = dqm->dev;struct kfd_mem_obj *mem_obj = &dqm->hiq_sdma_mqd;uint32_t size = dqm->mqd_mgrs[KFD_MQD_TYPE_SDMA ]->mqd_size * - dev->device_info->num_sdma_engines * + (dev->device_info->num_sdma_engines + + dev->device_info->num_xgmi_sdma_engines)* dev->device_info->num_sdma_queues_per_engine + dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ ]->mqd_size;
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1570200515-18992-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdkfd: Print more sdma engine hqds in debug fs
Previously only PCIe-optimized SDMA engine hqds were exposed in debug fs. Print all SDMA engine hqds.
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -1
@@ -2416,7 +2416,7 @@ int dqm_debugfs_hqds(struct seq_file *m, void *data) } } -for (pipe =0 ; pipe <get_num_sdma_engines (dqm); pipe++) { +for (pipe =0 ; pipe <get_num_sdma_engines (dqm) +get_num_xgmi_sdma_engines (dqm); pipe++) {for (queue =0 ; queue < dqm->dev->device_info->num_sdma_queues_per_engine; queue++) {
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1570200515-18992-2-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org
Kuehling, Felix
Reviewed-by Felix KuehlingRe: [PATCH 2/2] drm/amdkfd: Print more sdma engine hqds in debug fs
Quoted 7 lines · Oak
Previously only PCIe-optimized SDMA engine hqds were exposed in debug fs. Print all SDMA engine hqds.
Change-Id I03756fc0fa99169d88e265560f505ed186242b02Reported-by Jonathan Kim <[email protected]>Signed-off-by Jonathan Kim <[email protected]>Signed-off-by Oak Zeng <[email protected]>
Minor cosmetic nit-pick inline that checkpatch.pl would probably warn about. With that fixed, this patch is
Quoted 9 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c int dqm_debugfs_hqds(struct seq_file *m, void *data) · line 2419
Quoted 5 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1
-1@@ -2416,7 +2416,7 @@ int dqm_debugfs_hqds(struct seq_file *m, void *data) } } -for (pipe =0 ; pipe <get_num_sdma_engines (dqm); pipe++) { +for (pipe =0 ; pipe <get_num_sdma_engines (dqm) +get_num_xgmi_sdma_engines (dqm); pipe++) {
This line looks longer than 80 characters. Try to find a good place to break it.
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c int dqm_debugfs_hqds(struct seq_file *m, void *data) · line 2422
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0
-0for (queue =0 ; queue < dqm->dev->device_info->num_sdma_queues_per_engine; queue++) {
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Kuehling, Felix
Reviewed-by Felix KuehlingQuoted 9 lines · Oak
On device initialization, a trunk of GTT memory is pre-allocated for HIQ and all SDMA queues mqd. The size of this allocation was wrong. The correct sdma engine number should be PCIe-optimized SDMA engine number plus xgmi SDMA engine number.
Change-Id Iecd11ae4f5a314591566772aa2a23e1fe4b94275Reported-by Jonathan Kim <[email protected]>Signed-off-by Jonathan Kim <[email protected]>Signed-off-by Oak Zeng <[email protected]>
Minor cosmetic nit-pick inline that checkpatch.pl would probably warn about. With that fixed, this patch is
Quoted 9 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm) · line 1853
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2
-1@@ -1849,7 +1849,8 @@ static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm)struct kfd_dev *dev = dqm->dev;struct kfd_mem_obj *mem_obj = &dqm->hiq_sdma_mqd;uint32_t size = dqm->mqd_mgrs[KFD_MQD_TYPE_SDMA ]->mqd_size * - dev->device_info->num_sdma_engines * + (dev->device_info->num_sdma_engines + + dev->device_info->num_xgmi_sdma_engines)*
There should be a space between ) and *.
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm) · line 1856
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0
-0dev->device_info->num_sdma_queues_per_engine + dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ ]->mqd_size;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 2 lines · Oak
On device initialization, a trunk of GTT memory is pre-allocated for
typo: trunk -> chunk
Alex
Quoted 29 lines
HIQ and all SDMA queues mqd. The size of this allocation was wrong. The correct sdma engine number should be PCIe-optimized SDMA engine number plus xgmi SDMA engine number.
Change-Id Iecd11ae4f5a314591566772aa2a23e1fe4b94275Reported-by Jonathan Kim <[email protected]>Signed-off-by Jonathan Kim <[email protected]>Signed-off-by Oak Zeng <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2
-2@@ -1849,7 +1849,8 @@ static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm)struct kfd_dev *dev = dqm->dev;struct kfd_mem_obj *mem_obj = &dqm->hiq_sdma_mqd;uint32_t size = dqm->mqd_mgrs[KFD_MQD_TYPE_SDMA ]->mqd_size * - dev->device_info->num_sdma_engines * + (dev->device_info->num_sdma_engines + + dev->device_info->num_xgmi_sdma_engines)* dev->device_info->num_sdma_queues_per_engine + dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ ]->mqd_size; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx