Compare commits

..

No commits in common. "e7ac55b7a0f0f307c2a40e3f398d28fdb9dc222f" and "1081af928abc6430c29f2d31142a7cc03c7934c9" have entirely different histories.

8 changed files with 43 additions and 62 deletions

View File

@ -1,7 +1,7 @@
diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c diff -Naur a/xf86drm.c b/xf86drm.c
--- libdrm-2.4.114/xf86drm.c.dma 2022-11-03 18:33:36.000000000 +1000 --- a/xf86drm.c 2021-01-14 16:31:10.113000000 +0800
+++ libdrm-2.4.114/xf86drm.c 2022-11-10 05:39:58.652477119 +1000 +++ b/xf86drm.c 2021-01-14 16:33:33.316000000 +0800
@@ -930,11 +930,6 @@ drm_public int drmAvailable(void) @@ -507,11 +507,6 @@
int fd; int fd;
if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) { if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
@ -13,7 +13,7 @@ diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c
return 0; return 0;
} }
@@ -1127,38 +1122,6 @@ static int drmOpenByName(const char *nam @@ -704,38 +699,6 @@
} }
} }
@ -25,7 +25,7 @@ diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c
- int retcode; - int retcode;
- -
- sprintf(proc_name, "/proc/dri/%d/name", i); - sprintf(proc_name, "/proc/dri/%d/name", i);
- if ((fd = open(proc_name, O_RDONLY)) >= 0) { - if ((fd = open(proc_name, O_RDONLY, 0)) >= 0) {
- retcode = read(fd, buf, sizeof(buf)-1); - retcode = read(fd, buf, sizeof(buf)-1);
- close(fd); - close(fd);
- if (retcode) { - if (retcode) {
@ -51,3 +51,4 @@ diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c
- -
return -1; return -1;
} }

29
libdrm-2.4.109-sw.patch Normal file → Executable file
View File

@ -1,8 +1,7 @@
diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h diff -Nuar libdrm-2.4.109.org/include/drm/drm_sarea.h libdrm-2.4.109.sw/include/drm/drm_sarea.h
index 93025be..60b979a 100644 --- libdrm-2.4.109.org/include/drm/drm_sarea.h 2022-02-26 01:16:04.810000000 +0000
--- a/include/drm/drm_sarea.h +++ libdrm-2.4.109.sw/include/drm/drm_sarea.h 2022-02-26 04:13:03.090000000 +0000
+++ b/include/drm/drm_sarea.h @@ -39,7 +39,9 @@
@@ -39,7 +39,9 @@ extern "C" {
#endif #endif
/* SAREA area needs to be at least a page */ /* SAREA area needs to be at least a page */
@ -13,11 +12,10 @@ index 93025be..60b979a 100644
#define SAREA_MAX 0x2000U #define SAREA_MAX 0x2000U
#elif defined(__mips__) #elif defined(__mips__)
#define SAREA_MAX 0x4000U #define SAREA_MAX 0x4000U
diff --git a/xf86drm.c b/xf86drm.c diff -Nuar libdrm-2.4.109.org/xf86drm.c libdrm-2.4.109.sw/xf86drm.c
index 7a7a23f..6daaaf7 100644 --- libdrm-2.4.109.org/xf86drm.c 2022-02-26 01:16:04.840000000 +0000
--- a/xf86drm.c +++ libdrm-2.4.109.sw/xf86drm.c 2022-02-26 02:33:50.700000000 +0000
+++ b/xf86drm.c @@ -1044,7 +1044,7 @@
@@ -1119,7 +1119,7 @@ static int drmOpenByBusid(const char *busid, int type)
sv.drm_dd_major = -1; /* Don't care */ sv.drm_dd_major = -1; /* Don't care */
sv.drm_dd_minor = -1; /* Don't care */ sv.drm_dd_minor = -1; /* Don't care */
if (drmSetInterfaceVersion(fd, &sv)) { if (drmSetInterfaceVersion(fd, &sv)) {
@ -26,11 +24,10 @@ index 7a7a23f..6daaaf7 100644
pci_domain_ok = 0; pci_domain_ok = 0;
#endif #endif
sv.drm_di_major = 1; sv.drm_di_major = 1;
diff --git a/xf86drm.h b/xf86drm.h diff -Nuar libdrm-2.4.109.org/xf86drm.h libdrm-2.4.109.sw/xf86drm.h
index 4c79a65..a8d3ad4 100644 --- libdrm-2.4.109.org/xf86drm.h 2022-02-26 01:16:04.840000000 +0000
--- a/xf86drm.h +++ libdrm-2.4.109.sw/xf86drm.h 2022-02-26 04:11:01.090000000 +0000
+++ b/xf86drm.h @@ -382,6 +382,34 @@
@@ -382,6 +382,34 @@ typedef struct _drmSetVersion {
"r" (new)); \ "r" (new)); \
} while (0) } while (0)
@ -65,7 +62,7 @@ index 4c79a65..a8d3ad4 100644
#elif defined(__alpha__) #elif defined(__alpha__)
#define DRM_CAS(lock, old, new, ret) \ #define DRM_CAS(lock, old, new, ret) \
@@ -511,7 +539,9 @@ do { register unsigned int __old __asm("o0"); \ @@ -511,7 +539,9 @@
#define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */ #define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */
#endif #endif

BIN
libdrm-2.4.109.tar.xz Normal file

Binary file not shown.

BIN
libdrm-2.4.109.tar.xz.sig Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,6 @@
diff --git a/xf86drm.h b/xf86drm.h diff -up libdrm-2.4.64/xf86drm.h.forceperms libdrm-2.4.64/xf86drm.h
index 4badaae..08cc287 100644 --- libdrm-2.4.64/xf86drm.h.forceperms 2015-08-25 07:25:09.946427122 +1000
--- a/xf86drm.h +++ libdrm-2.4.64/xf86drm.h 2015-08-25 07:28:57.435553839 +1000
+++ b/xf86drm.h
@@ -74,7 +74,7 @@ extern "C" { @@ -74,7 +74,7 @@ extern "C" {
/* Default /dev/dri directory permissions 0755 */ /* Default /dev/dri directory permissions 0755 */
#define DRM_DEV_DIRMODE \ #define DRM_DEV_DIRMODE \

View File

@ -1,11 +1,4 @@
%define bcond_meson() %{lua: do %define bcond_meson() %{lua: do
local option = rpm.expand("%{1}")
local with = rpm.expand("%{?with_" .. option .. "}")
local value = (with ~= '') and "enabled" or "disabled"
option = option:gsub('_', '-')
print(string.format("-D%s=%s", option, value))
end}
%define bcond_meson_tf() %{lua: do
local option = rpm.expand("%{1}") local option = rpm.expand("%{1}")
local with = rpm.expand("%{?with_" .. option .. "}") local with = rpm.expand("%{?with_" .. option .. "}")
local value = (with ~= '') and "true" or "false" local value = (with ~= '') and "true" or "false"
@ -13,6 +6,7 @@ end}
print(string.format("-D%s=%s", option, value)) print(string.format("-D%s=%s", option, value))
end} end}
%bcond_without libkms
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
%bcond_without intel %bcond_without intel
%else %else
@ -32,7 +26,6 @@ end}
%bcond_without freedreno %bcond_without freedreno
%bcond_without tegra %bcond_without tegra
%bcond_without vc4 %bcond_without vc4
%bcond_without etnaviv %bcond_without etnaviv
%else %else
%bcond_with exynos %bcond_with exynos
@ -53,8 +46,8 @@ end}
%bcond_without udev %bcond_without udev
Name: libdrm Name: libdrm
Version: 2.4.119 Version: 2.4.109
Release: 2 Release: 6
License: MIT License: MIT
Summary: library for direct rendering manager Summary: library for direct rendering manager
@ -87,7 +80,9 @@ BuildRequires: pkgconfig(udev)
Patch1001: %{name}-make-dri-perms-okay.patch Patch1001: %{name}-make-dri-perms-okay.patch
Patch1002: %{name}-2.4.0-no-bc.patch Patch1002: %{name}-2.4.0-no-bc.patch
%ifarch sw_64
Patch1003: libdrm-2.4.109-sw.patch Patch1003: libdrm-2.4.109-sw.patch
%endif
%description %description
%{name} provides a user space library for accessing the DRM, direct rendering manager, %{name} provides a user space library for accessing the DRM, direct rendering manager,
@ -120,14 +115,14 @@ Utility programs for the kernel DRM interface.
%build %build
%meson \ %meson \
%{bcond_meson intel} %{bcond_meson radeon} %{bcond_meson amdgpu} \ %{bcond_meson libkms} %{bcond_meson intel} %{bcond_meson radeon} %{bcond_meson amdgpu} \
%{bcond_meson nouveau} %{bcond_meson vmwgfx} %{bcond_meson omap} %{bcond_meson exynos} \ %{bcond_meson nouveau} %{bcond_meson vmwgfx} %{bcond_meson omap} %{bcond_meson exynos} \
%{bcond_meson freedreno} %{bcond_meson tegra} %{bcond_meson vc4} %{bcond_meson etnaviv} \ %{bcond_meson freedreno} %{bcond_meson tegra} %{bcond_meson vc4} %{bcond_meson etnaviv} \
%{bcond_meson cairo_tests} %{bcond_meson man_pages} \ %{bcond_meson cairo_tests} %{bcond_meson man_pages} \
%if %{?openEuler:1}0 %if %{?openEuler:1}0
%{bcond_meson valgrind} \ %{bcond_meson valgrind} \
%endif %endif
%{bcond_meson_tf freedreno_kgsl} %{bcond_meson_tf install_test_programs} %{bcond_meson_tf udev} \ %{bcond_meson freedreno_kgsl} %{bcond_meson install_test_programs} %{bcond_meson udev} \
%{nil} %{nil}
%meson_build %meson_build
@ -145,12 +140,13 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%ldconfig_scriptlets %ldconfig_scriptlets
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/%{name}.so.* %{_libdir}/%{name}.so.*
%dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/
%if %{with libkms}
%{_libdir}/libkms.so.*
%endif
%if %{with intel} %if %{with intel}
%{_libdir}/%{name}_intel.so.* %{_libdir}/%{name}_intel.so.*
%endif %endif
@ -189,6 +185,11 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%{_includedir}/%{name}/*_drm.h %{_includedir}/%{name}/*_drm.h
%{_libdir}/%{name}.so %{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%if %{with libkms}
%{_includedir}/libkms/
%{_libdir}/libkms.so
%{_libdir}/pkgconfig/libkms.pc
%endif
%if %{with intel} %if %{with intel}
%{_includedir}/%{name}/intel_*.h %{_includedir}/%{name}/intel_*.h
%{_libdir}/%{name}_intel.so %{_libdir}/%{name}_intel.so
@ -248,14 +249,12 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/amdgpu_stress %{_bindir}/amdgpu_stress
%{_bindir}/drmdevice %{_bindir}/drmdevice
%if %{with etnaviv}
%exclude %{_bindir}/etnaviv_* %exclude %{_bindir}/etnaviv_*
%endif
%if %{with exynos}
%exclude %{_bindir}/exynos_* %exclude %{_bindir}/exynos_*
%endif %{_bindir}/kms-steal-crtc
%if %{with tegra} %{_bindir}/kms-universal-planes
%exclude %{_bindir}/tegra-* %if %{with libkms}
%{_bindir}/kmstest
%endif %endif
%{_bindir}/modeprint %{_bindir}/modeprint
%{_bindir}/modetest %{_bindir}/modetest
@ -271,21 +270,6 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%endif %endif
%changelog %changelog
* Fri Feb 28 2025 mahailiang <mahailiang@uniontech.com> - 2.4.119-2
- delete patch judgment
* Thu Dec 28 2023 Paul Thomas <paulthomas100199@gmail.com> - 2.4.119-1
- update to version 2.4.119
* Wed Nov 15 2023 lvgenggeng <lvgenggeng@uniontech.com> - 2.4.117-1
- update to 2.4.117
* Tue Jul 11 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 2.4.115-1
- update to 2.4.115
* Thu Dec 08 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 2.4.109-7
- remove rpath
* Fri Nov 18 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 2.4.109-6 * Fri Nov 18 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 2.4.109-6
- Optimize the patch for add sw architecture - Optimize the patch for add sw architecture