aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch84
1 files changed, 84 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch
new file mode 100644
index 00000000..605ae90b
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1253-drm-amdgpu-Add-first_non_cp-and-last_non_cp-in-amdgp.patch
@@ -0,0 +1,84 @@
+From 206aed60d9f5d7632f976b965f1f2dab002bd58e Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Wed, 13 Feb 2019 13:13:50 -0500
+Subject: [PATCH 1253/2940] drm/amdgpu: Add first_non_cp and last_non_cp in
+ amdgpu_doorbell_index
+
+They will be used to inform KFD the doorbell range not usable for CP.
+
+Change-Id: Icc9167771ad9539d8e31b40058e3b22be825a585
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h | 9 +++++++++
+ drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 ++++
+ drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c | 4 ++++
+ 3 files changed, 17 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
+index 43546500ec26..5587fac671bb 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h
+@@ -69,6 +69,8 @@ struct amdgpu_doorbell_index {
+ uint32_t vce_ring6_7;
+ } uvd_vce;
+ };
++ uint32_t first_non_cp;
++ uint32_t last_non_cp;
+ uint32_t max_assignment;
+ /* Per engine SDMA doorbell size in dword */
+ uint32_t sdma_doorbell_range;
+@@ -139,6 +141,10 @@ typedef enum _AMDGPU_VEGA20_DOORBELL_ASSIGNMENT
+ AMDGPU_VEGA20_DOORBELL64_VCE_RING2_3 = 0x18D,
+ AMDGPU_VEGA20_DOORBELL64_VCE_RING4_5 = 0x18E,
+ AMDGPU_VEGA20_DOORBELL64_VCE_RING6_7 = 0x18F,
++
++ AMDGPU_VEGA20_DOORBELL64_FIRST_NON_CP = AMDGPU_VEGA20_DOORBELL_sDMA_ENGINE0,
++ AMDGPU_VEGA20_DOORBELL64_LAST_NON_CP = AMDGPU_VEGA20_DOORBELL64_VCE_RING6_7,
++
+ AMDGPU_VEGA20_DOORBELL_MAX_ASSIGNMENT = 0x18F,
+ AMDGPU_VEGA20_DOORBELL_INVALID = 0xFFFF
+ } AMDGPU_VEGA20_DOORBELL_ASSIGNMENT;
+@@ -214,6 +220,9 @@ typedef enum _AMDGPU_DOORBELL64_ASSIGNMENT
+ AMDGPU_DOORBELL64_VCE_RING4_5 = 0xFE,
+ AMDGPU_DOORBELL64_VCE_RING6_7 = 0xFF,
+
++ AMDGPU_DOORBELL64_FIRST_NON_CP = AMDGPU_DOORBELL64_sDMA_ENGINE0,
++ AMDGPU_DOORBELL64_LAST_NON_CP = AMDGPU_DOORBELL64_VCE_RING6_7,
++
+ AMDGPU_DOORBELL64_MAX_ASSIGNMENT = 0xFF,
+ AMDGPU_DOORBELL64_INVALID = 0xFFFF
+ } AMDGPU_DOORBELL64_ASSIGNMENT;
+diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
+index 62f49c895314..5e9e53143a8e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
++++ b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
+@@ -79,6 +79,10 @@ void vega10_doorbell_index_init(struct amdgpu_device *adev)
+ adev->doorbell_index.uvd_vce.vce_ring2_3 = AMDGPU_DOORBELL64_VCE_RING2_3;
+ adev->doorbell_index.uvd_vce.vce_ring4_5 = AMDGPU_DOORBELL64_VCE_RING4_5;
+ adev->doorbell_index.uvd_vce.vce_ring6_7 = AMDGPU_DOORBELL64_VCE_RING6_7;
++
++ adev->doorbell_index.first_non_cp = AMDGPU_DOORBELL64_FIRST_NON_CP;
++ adev->doorbell_index.last_non_cp = AMDGPU_DOORBELL64_LAST_NON_CP;
++
+ /* In unit of dword doorbell */
+ adev->doorbell_index.max_assignment = AMDGPU_DOORBELL64_MAX_ASSIGNMENT << 1;
+ adev->doorbell_index.sdma_doorbell_range = 4;
+diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c b/drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c
+index 1271e1702ad4..fb6398e38be9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c
++++ b/drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c
+@@ -83,6 +83,10 @@ void vega20_doorbell_index_init(struct amdgpu_device *adev)
+ adev->doorbell_index.uvd_vce.vce_ring2_3 = AMDGPU_VEGA20_DOORBELL64_VCE_RING2_3;
+ adev->doorbell_index.uvd_vce.vce_ring4_5 = AMDGPU_VEGA20_DOORBELL64_VCE_RING4_5;
+ adev->doorbell_index.uvd_vce.vce_ring6_7 = AMDGPU_VEGA20_DOORBELL64_VCE_RING6_7;
++
++ adev->doorbell_index.first_non_cp = AMDGPU_VEGA20_DOORBELL64_FIRST_NON_CP;
++ adev->doorbell_index.last_non_cp = AMDGPU_VEGA20_DOORBELL64_LAST_NON_CP;
++
+ adev->doorbell_index.max_assignment = AMDGPU_VEGA20_DOORBELL_MAX_ASSIGNMENT << 1;
+ adev->doorbell_index.sdma_doorbell_range = 20;
+ }
+--
+2.17.1
+