drm/amdkfd: Fix MQD size calculation
authorOak Zeng <Oak.Zeng@amd.com>
Fri, 4 Oct 2019 14:28:21 +0000 (09:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:43:47 +0000 (16:43 +0100)
commitbe30e550a54c4b088a0b6f4e1ac4b27b72decd41
treefcb70681a5c2306c574541c8ce33d081782e07a0
parent466e2d02e45daf7390cbbf6b5f349980245c3faa
drm/amdkfd: Fix MQD size calculation

[ Upstream commit 40a9592a26608e16f7545a068ea4165e1869f629 ]

On device initialization, a chunk 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.

Reported-by: Jonathan Kim <Jonathan.Kim@amd.com>
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c