diff --git a/libdrm-2.4.114-sw.patch b/libdrm-2.4.117-sw.patch similarity index 84% rename from libdrm-2.4.114-sw.patch rename to libdrm-2.4.117-sw.patch index 3f23e4c34c2d9feacb4a4e70c4ad0aa638323ebb..900b102688a7f4527ca3b80043d14b5166da177e 100644 --- a/libdrm-2.4.114-sw.patch +++ b/libdrm-2.4.117-sw.patch @@ -1,33 +1,35 @@ -From e275281fadc09630adde823c72047f6695dd8746 Mon Sep 17 00:00:00 2001 +From 34ccc56ce6a51f8ff3f84132be1e0d48940863cb Mon Sep 17 00:00:00 2001 From: Weisson Date: Thu, 1 Feb 2024 20:58:35 +0800 Subject: [PATCH] add sw support. Signed-off-by: Weisson --- - include/drm/drm_sarea.h | 2 ++ + include/drm/drm_sarea.h | 4 +++- xf86drm.c | 2 +- xf86drm.h | 32 +++++++++++++++++++++++++++++++- - 3 files changed, 34 insertions(+), 2 deletions(-) + 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h -index 93025be..431287a 100644 +index 93025be..60b979a 100644 --- a/include/drm/drm_sarea.h +++ b/include/drm/drm_sarea.h -@@ -39,6 +39,8 @@ extern "C" { +@@ -39,7 +39,9 @@ extern "C" { #endif /* SAREA area needs to be at least a page */ +-#if defined(__alpha__) +#if defined(__sw_64__) +#define SAREA_MAX 0x2000U - #if defined(__alpha__) ++#elif defined(__alpha__) #define SAREA_MAX 0x2000U #elif defined(__mips__) + #define SAREA_MAX 0x4000U diff --git a/xf86drm.c b/xf86drm.c -index 76d830f..db6dabb 100644 +index 5295abe..7bcfa28 100644 --- a/xf86drm.c +++ b/xf86drm.c -@@ -1045,7 +1045,7 @@ static int drmOpenByBusid(const char *busid, int type) +@@ -1112,7 +1112,7 @@ static int drmOpenByBusid(const char *busid, int type) sv.drm_dd_major = -1; /* Don't care */ sv.drm_dd_minor = -1; /* Don't care */ if (drmSetInterfaceVersion(fd, &sv)) { @@ -37,7 +39,7 @@ index 76d830f..db6dabb 100644 #endif sv.drm_di_major = 1; diff --git a/xf86drm.h b/xf86drm.h -index 4c79a65..3a5e069 100644 +index 7a5b4ae..8e4d7cb 100644 --- a/xf86drm.h +++ b/xf86drm.h @@ -382,6 +382,34 @@ typedef struct _drmSetVersion { @@ -88,3 +90,4 @@ index 4c79a65..3a5e069 100644 #define DRM_CAS_RESULT(_result) int _result -- 2.31.1 + diff --git a/libdrm-2.4.117-sw8a.patch b/libdrm-2.4.117-sw8a.patch new file mode 100644 index 0000000000000000000000000000000000000000..46500026aeab7c62f1c79e36d3ca4af07461c441 --- /dev/null +++ b/libdrm-2.4.117-sw8a.patch @@ -0,0 +1,14 @@ +diff -uNar libdrm-2.4.115.org/xf86drm.h libdrm-2.4.115.new/xf86drm.h +--- libdrm-2.4.115.org/xf86drm.h 2024-04-17 14:28:53.679049167 +0800 ++++ libdrm-2.4.115.new/xf86drm.h 2024-04-17 14:31:45.650434817 +0800 +@@ -392,10 +392,8 @@ + " ldi %1, %3\n" \ + "1: lldw %0, 0(%1)\n" \ + " cmpeq %0, %4, %2\n" \ +- " wr_f %2\n" \ + " mov %5, %0\n" \ + " lstw %0, 0(%1)\n" \ +- " rd_f %0\n" \ + " beq %2, 2f\n" \ + " beq %0, 3f\n" \ + " memb\n" \ diff --git a/libdrm.spec b/libdrm.spec index 3da4e50cc6013a90666f335a3eb0c3608fceb97c..9511a88a8c0573536bd8f2eefd5149044c0e2894 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -51,7 +51,7 @@ end} %bcond_without install_test_programs %bcond_without udev -%define anolis_release .0.1 +%define anolis_release .0.2 Name: libdrm Summary: Direct Rendering Manager runtime library @@ -90,7 +90,8 @@ BuildRequires: chrpath Patch1001: libdrm-make-dri-perms-okay.patch # remove backwards compat not needed on Fedora Patch1002: libdrm-2.4.0-no-bc.patch -Patch1003: libdrm-2.4.114-sw.patch +Patch1003: libdrm-2.4.117-sw.patch +Patch1004: libdrm-2.4.117-sw8a.patch %description Direct Rendering Manager runtime library @@ -282,6 +283,9 @@ cp %{SOURCE1} %{buildroot}%{_docdir}/libdrm %endif %changelog +* Tue Nov 5 2024 wxiat - 2.4.117-1.0.2 +- cherry-pick `add sw8a support #f9d26569486686a856a8599a0daf83944c3212e1`. + * Tue May 21 2024 wxiat - 2.4.117-1.0.1 - cherry-pick `add sw arch #69144edad3fa9f6d32041144524ba7509d3bc9a3`. - cherry-pick `Fix sw macro #ffacd58d562e62de7abf3ed2128aaaee26a703e2`.