aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch
new file mode 100644
index 00000000..c82e23f1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2893-drm-amdgpu-add-one-more-mmhub-instance-for-Arcturus-.patch
@@ -0,0 +1,66 @@
+From 000471963b739f0a24eb9987fcbcf7098adee432 Mon Sep 17 00:00:00 2001
+From: Le Ma <le.ma@amd.com>
+Date: Fri, 31 Aug 2018 14:46:47 +0800
+Subject: [PATCH 2893/2940] drm/amdgpu: add one more mmhub instance for
+ Arcturus (v2)
+
+v2: set mmhub num under CHIP_ARCTURUS switch case and add one more mmhub id_mgr
+
+Signed-off-by: Le Ma <le.ma@amd.com>
+Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++-
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 +++++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+index 78f2bbc243fc..d857b508ebe9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+@@ -100,9 +100,10 @@ struct amdgpu_bo_list_entry;
+ #define AMDGPU_VM_FAULT_STOP_ALWAYS 2
+
+ /* max number of VMHUB */
+-#define AMDGPU_MAX_VMHUBS 2
++#define AMDGPU_MAX_VMHUBS 3
+ #define AMDGPU_GFXHUB_0 0
+ #define AMDGPU_MMHUB_0 1
++#define AMDGPU_MMHUB_1 2
+
+ /* hardcode that limit for now */
+ #define AMDGPU_VA_RESERVED_SIZE (1ULL << 20)
+diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+index 6edd5e579a83..11f273ddde90 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+@@ -634,7 +634,8 @@ static int gmc_v9_0_allocate_vm_inv_eng(struct amdgpu_device *adev)
+ {
+ struct amdgpu_ring *ring;
+ unsigned vm_inv_engs[AMDGPU_MAX_VMHUBS] =
+- {GFXHUB_FREE_VM_INV_ENGS_BITMAP, MMHUB_FREE_VM_INV_ENGS_BITMAP};
++ {GFXHUB_FREE_VM_INV_ENGS_BITMAP, MMHUB_FREE_VM_INV_ENGS_BITMAP,
++ GFXHUB_FREE_VM_INV_ENGS_BITMAP};
+ unsigned i;
+ unsigned vmhub, inv_eng;
+
+@@ -1001,6 +1002,8 @@ static int gmc_v9_0_sw_init(void *handle)
+ amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
+ break;
+ case CHIP_ARCTURUS:
++ adev->num_vmhubs = 3;
++
+ /* Keep the vm size same with Vega20 */
+ amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
+ break;
+@@ -1081,6 +1084,7 @@ static int gmc_v9_0_sw_init(void *handle)
+ */
+ adev->vm_manager.id_mgr[AMDGPU_GFXHUB_0].num_ids = AMDGPU_NUM_OF_VMIDS;
+ adev->vm_manager.id_mgr[AMDGPU_MMHUB_0].num_ids = AMDGPU_NUM_OF_VMIDS;
++ adev->vm_manager.id_mgr[AMDGPU_MMHUB_1].num_ids = AMDGPU_NUM_OF_VMIDS;
+
+ amdgpu_vm_manager_init(adev);
+
+--
+2.17.1
+