aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorYong Zhao <Yong.Zhao@amd.com>2019-02-13 13:15:05 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-02-18 18:00:41 -0500
commit1f86805adc3432e92e7d87e1ff5da9826ef56eab (patch)
tree6206244b61c6ccde82dd1768cf440c8e9da58868 /drivers/gpu/drm/amd/amdgpu
parent828845b7c86c5338f6ca02aaaaf4b525718f31b2 (diff)
drm/amdkfd: Fix bugs regarding CP queue doorbell mask on SOC15
Reserved doorbells for SDMA IH and VCN were not properly masked out when allocating doorbells for CP user queues. This patch fixed that. Signed-off-by: Yong Zhao <Yong.Zhao@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index e957e42c539a..30e2b371578e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -196,11 +196,19 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
196 gpu_resources.sdma_doorbell[1][i+1] = 196 gpu_resources.sdma_doorbell[1][i+1] =
197 adev->doorbell_index.sdma_engine[1] + 0x200 + (i >> 1); 197 adev->doorbell_index.sdma_engine[1] + 0x200 + (i >> 1);
198 } 198 }
199 /* Doorbells 0x0e0-0ff and 0x2e0-2ff are reserved for 199
200 * SDMA, IH and VCN. So don't use them for the CP. 200 /* Since SOC15, BIF starts to statically use the
201 * lower 12 bits of doorbell addresses for routing
202 * based on settings in registers like
203 * SDMA0_DOORBELL_RANGE etc..
204 * In order to route a doorbell to CP engine, the lower
205 * 12 bits of its address has to be outside the range
206 * set for SDMA, VCN, and IH blocks.
201 */ 207 */
202 gpu_resources.reserved_doorbell_mask = 0x1e0; 208 gpu_resources.non_cp_doorbells_start =
203 gpu_resources.reserved_doorbell_val = 0x0e0; 209 adev->doorbell_index.first_non_cp;
210 gpu_resources.non_cp_doorbells_end =
211 adev->doorbell_index.last_non_cp;
204 212
205 kgd2kfd_device_init(adev->kfd.dev, &gpu_resources); 213 kgd2kfd_device_init(adev->kfd.dev, &gpu_resources);
206 } 214 }