summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
diff options
context:
space:
mode:
authorYong Zhao2019-02-13 19:15:05 +0100
committerAlex Deucher2019-02-19 00:00:41 +0100
commit1f86805adc3432e92e7d87e1ff5da9826ef56eab (patch)
tree6206244b61c6ccde82dd1768cf440c8e9da58868 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h
parentdrm/amdgpu: Add first_non_cp and last_non_cp in amdgpu_doorbell_index (diff)
downloadkernel-qcow2-linux-1f86805adc3432e92e7d87e1ff5da9826ef56eab.tar.gz
kernel-qcow2-linux-1f86805adc3432e92e7d87e1ff5da9826ef56eab.tar.xz
kernel-qcow2-linux-1f86805adc3432e92e7d87e1ff5da9826ef56eab.zip
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/amdkfd/kfd_priv.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_priv.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index e5ebcca7f031..0eeee3c6d6dc 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -104,6 +104,17 @@
#define KFD_KERNEL_QUEUE_SIZE 2048
/*
+ * 512 = 0x200
+ * The doorbell index distance between SDMA RLC (2*i) and (2*i+1) in the
+ * same SDMA engine on SOC15, which has 8-byte doorbells for SDMA.
+ * 512 8-byte doorbell distance (i.e. one page away) ensures that SDMA RLC
+ * (2*i+1) doorbells (in terms of the lower 12 bit address) lie exactly in
+ * the OFFSET and SIZE set in registers like BIF_SDMA0_DOORBELL_RANGE.
+ */
+#define KFD_QUEUE_DOORBELL_MIRROR_OFFSET 512
+
+
+/*
* Kernel module parameter to specify maximum number of supported queues per
* device
*/