aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch
new file mode 100644
index 00000000..2dd8ce83
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4097-Revert-drm-amdgpu-Restore-scalable-VM-size-calculati.patch
@@ -0,0 +1,62 @@
+From 41e272df08ceaedad8a91c8eeb7d4dcc7361e0eb Mon Sep 17 00:00:00 2001
+From: Ravi Kumar <ravi1.kumar@amd.com>
+Date: Fri, 3 Aug 2018 14:38:42 +0530
+Subject: [PATCH 4097/4131] Revert "drm/amdgpu: Restore scalable VM size
+ calculation"
+
+The same functionality was later implemented in amdgpu_device_check_vm_size().
+Moreover, the code caused regressions on Raven that ATC memory was not working.
+
+This fis is needed to make ROCm work on eRaven.y
+
+Signed-off-by: Yong Zhao <yong.zhao@amd.com>
+Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 2bac39ee..968ec87 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -982,9 +982,6 @@ static void amdgpu_device_check_smu_prv_buffer_size(struct amdgpu_device *adev)
+ */
+ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)
+ {
+- struct sysinfo si;
+- int phys_ram_gb, amdgpu_vm_size_aligned;
+-
+ if (amdgpu_sched_jobs < 4) {
+ dev_warn(adev->dev, "sched jobs (%d) must be at least 4\n",
+ amdgpu_sched_jobs);
+@@ -1009,27 +1006,6 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)
+ amdgpu_gtt_size = -1;
+ }
+
+- /* Compute the GPU VM space only if the user
+- * hasn't changed it from the default.
+- */
+- if (amdgpu_vm_size == -1) {
+- /* Computation depends on the amount of physical RAM available.
+- * Cannot exceed 1TB.
+- */
+- si_meminfo(&si);
+- phys_ram_gb = ((uint64_t)si.totalram * si.mem_unit) >> 30;
+- amdgpu_vm_size = min(phys_ram_gb * 3 + 16, 1024);
+-
+- /* GPUVM sizes are almost never perfect powers of two.
+- * Round up to nearest power of two starting from
+- * the minimum allowed but aligned size of 32GB */
+- amdgpu_vm_size_aligned = 32;
+- while (amdgpu_vm_size > amdgpu_vm_size_aligned)
+- amdgpu_vm_size_aligned *= 2;
+-
+- amdgpu_vm_size = amdgpu_vm_size_aligned;
+- }
+-
+ /* valid range is between 4 and 9 inclusive */
+ if (amdgpu_vm_fragment_size != -1 &&
+ (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4)) {
+--
+2.7.4
+