[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Fix Debian bug #990279 on ppc64le systems



Provided to fix stable Bullseye kernels

Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
---
 .../debian/fix-ppc64-amdgpu-page-size.patch   | 22 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 debian/patches/debian/fix-ppc64-amdgpu-page-size.patch

diff --git a/debian/patches/debian/fix-ppc64-amdgpu-page-size.patch b/debian/patches/debian/fix-ppc64-amdgpu-page-size.patch
new file mode 100644
index 000000000..1eaeca0d0
--- /dev/null
+++ b/debian/patches/debian/fix-ppc64-amdgpu-page-size.patch
@@ -0,0 +1,22 @@
+Description: Fix amdgpu ppc64le page size
+ Apply fix from Debian bug #990279#47
+ Tested to work on multiple RCS Talos II systems
+
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990279#47
+Bug-Debian: https://bugs.debian.org/990279
+Reviewed-By: Timothy Pearson <tpearson@raptorengineering.com>
+
+--- linux-5.10.92.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
++++ linux-5.10.92/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+@@ -766,9 +766,9 @@ static int amdgpu_info_ioctl(struct drm_
+ 			dev_info.high_va_offset = AMDGPU_GMC_HOLE_END;
+ 			dev_info.high_va_max = AMDGPU_GMC_HOLE_END | vm_size;
+ 		}
+-		dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
++		dev_info.virtual_address_alignment = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
+ 		dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
+-		dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE;
++		dev_info.gart_page_size = max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
+ 		dev_info.cu_active_number = adev->gfx.cu_info.number;
+ 		dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
+ 		dev_info.ce_ram_size = adev->gfx.ce_ram_size;
diff --git a/debian/patches/series b/debian/patches/series
index 00d73a24d..32a463bfc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -93,6 +93,7 @@ bugfix/all/disable-some-marvell-phys.patch
 bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
 debian/makefile-do-not-check-for-libelf-when-building-oot-module.patch
 bugfix/all/partially-revert-net-socket-implement-64-bit-timestamps.patch
+debian/fix-ppc64-amdgpu-page-size.patch
 
 # Miscellaneous features
 
-- 
2.30.2


Reply to: