Compare commits
10 Commits
3e264a4bd5
...
4e6db72140
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e6db72140 | ||
|
|
deeeb2b742 | ||
|
|
b4a73274fa | ||
|
|
db0bd7f807 | ||
|
|
92cefe67e0 | ||
|
|
0e0d75e19b | ||
|
|
fce7026375 | ||
|
|
639372b772 | ||
|
|
cebd452214 | ||
|
|
11ff393806 |
75
libdrm-2.4.109-sw.patch
Executable file
75
libdrm-2.4.109-sw.patch
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
diff -Nuar libdrm-2.4.109.org/include/drm/drm_sarea.h libdrm-2.4.109.sw/include/drm/drm_sarea.h
|
||||||
|
--- libdrm-2.4.109.org/include/drm/drm_sarea.h 2022-02-26 01:16:04.810000000 +0000
|
||||||
|
+++ libdrm-2.4.109.sw/include/drm/drm_sarea.h 2022-02-26 04:13:03.090000000 +0000
|
||||||
|
@@ -39,7 +39,9 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* SAREA area needs to be at least a page */
|
||||||
|
-#if defined(__alpha__)
|
||||||
|
+#if defined(__sw_64__)
|
||||||
|
+#define SAREA_MAX 0x2000U
|
||||||
|
+#elif defined(__alpha__)
|
||||||
|
#define SAREA_MAX 0x2000U
|
||||||
|
#elif defined(__mips__)
|
||||||
|
#define SAREA_MAX 0x4000U
|
||||||
|
diff -Nuar libdrm-2.4.109.org/xf86drm.c libdrm-2.4.109.sw/xf86drm.c
|
||||||
|
--- libdrm-2.4.109.org/xf86drm.c 2022-02-26 01:16:04.840000000 +0000
|
||||||
|
+++ libdrm-2.4.109.sw/xf86drm.c 2022-02-26 02:33:50.700000000 +0000
|
||||||
|
@@ -1044,7 +1044,7 @@
|
||||||
|
sv.drm_dd_major = -1; /* Don't care */
|
||||||
|
sv.drm_dd_minor = -1; /* Don't care */
|
||||||
|
if (drmSetInterfaceVersion(fd, &sv)) {
|
||||||
|
-#ifndef __alpha__
|
||||||
|
+#ifndef __sw_64__
|
||||||
|
pci_domain_ok = 0;
|
||||||
|
#endif
|
||||||
|
sv.drm_di_major = 1;
|
||||||
|
diff -Nuar libdrm-2.4.109.org/xf86drm.h libdrm-2.4.109.sw/xf86drm.h
|
||||||
|
--- libdrm-2.4.109.org/xf86drm.h 2022-02-26 01:16:04.840000000 +0000
|
||||||
|
+++ libdrm-2.4.109.sw/xf86drm.h 2022-02-26 04:11:01.090000000 +0000
|
||||||
|
@@ -382,6 +382,34 @@
|
||||||
|
"r" (new)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
+#elif defined(__sw_64__)
|
||||||
|
+#define DRM_CAS(lock, old, new, ret) \
|
||||||
|
+ do{ \
|
||||||
|
+ int tmp, old32; \
|
||||||
|
+ int tmp1; \
|
||||||
|
+ __asm__ __volatile__( \
|
||||||
|
+ " addw $31, %6, %4\n" \
|
||||||
|
+ " 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" \
|
||||||
|
+ "2: cmpeq %2, 0, %2\n" \
|
||||||
|
+ ".subsection 2\n" \
|
||||||
|
+ "3: br 1b\n" \
|
||||||
|
+ ".previous" \
|
||||||
|
+ : "=&r"(tmp),"=&r"(tmp1), "=&r"(ret), \
|
||||||
|
+ "=m"(__drm_dummy_lock(lock)), \
|
||||||
|
+ "=&r"(old32) \
|
||||||
|
+ : "r"(new), "r"(old) \
|
||||||
|
+ : "memory"); \
|
||||||
|
+ } while (0)
|
||||||
|
+
|
||||||
|
#elif defined(__alpha__)
|
||||||
|
|
||||||
|
#define DRM_CAS(lock, old, new, ret) \
|
||||||
|
@@ -511,7 +539,9 @@
|
||||||
|
#define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(__alpha__)
|
||||||
|
+#if defined(__sw_64__)
|
||||||
|
+#define DRM_CAS_RESULT(_result) long _result
|
||||||
|
+#elif defined(__alpha__)
|
||||||
|
#define DRM_CAS_RESULT(_result) long _result
|
||||||
|
#elif defined(__powerpc__)
|
||||||
|
#define DRM_CAS_RESULT(_result) int _result
|
||||||
37
libdrm.spec
37
libdrm.spec
@ -47,7 +47,7 @@ end}
|
|||||||
|
|
||||||
Name: libdrm
|
Name: libdrm
|
||||||
Version: 2.4.109
|
Version: 2.4.109
|
||||||
Release: 1
|
Release: 7
|
||||||
License: MIT
|
License: MIT
|
||||||
Summary: library for direct rendering manager
|
Summary: library for direct rendering manager
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ Source0: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz
|
|||||||
Source1: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz.sig
|
Source1: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz.sig
|
||||||
Source2: 91-drm-modeset.rules
|
Source2: 91-drm-modeset.rules
|
||||||
|
|
||||||
BuildRequires: meson >= 0.43 gcc libatomic_ops-devel kernel-headers
|
BuildRequires: meson >= 0.43 gcc kernel-headers
|
||||||
%if %{with intel}
|
%if %{with intel}
|
||||||
BuildRequires: pkgconfig(pciaccess) >= 0.10
|
BuildRequires: pkgconfig(pciaccess) >= 0.10
|
||||||
%endif
|
%endif
|
||||||
@ -69,15 +69,20 @@ BuildRequires: %{_bindir}/xsltproc
|
|||||||
BuildRequires: %{_bindir}/sed
|
BuildRequires: %{_bindir}/sed
|
||||||
BuildRequires: python3-docutils chrpath
|
BuildRequires: python3-docutils chrpath
|
||||||
%endif
|
%endif
|
||||||
|
%if %{?openEuler:1}0
|
||||||
%if %{with valgrind}
|
%if %{with valgrind}
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: valgrind-devel
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{with udev}
|
%if %{with udev}
|
||||||
BuildRequires: pkgconfig(udev)
|
BuildRequires: pkgconfig(udev)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
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
|
||||||
|
%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,
|
||||||
@ -113,11 +118,17 @@ Utility programs for the kernel DRM interface.
|
|||||||
%{bcond_meson libkms} %{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 valgrind} \
|
%{bcond_meson cairo_tests} %{bcond_meson man_pages} \
|
||||||
|
%if %{?openEuler:1}0
|
||||||
|
%{bcond_meson valgrind} \
|
||||||
|
%endif
|
||||||
%{bcond_meson freedreno_kgsl} %{bcond_meson install_test_programs} %{bcond_meson udev} \
|
%{bcond_meson freedreno_kgsl} %{bcond_meson install_test_programs} %{bcond_meson udev} \
|
||||||
%{nil}
|
%{nil}
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
|
%check
|
||||||
|
%meson_test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%meson_install
|
%meson_install
|
||||||
%if %{with install_test_programs}
|
%if %{with install_test_programs}
|
||||||
@ -129,6 +140,8 @@ 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.*
|
||||||
@ -259,6 +272,24 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
||||||
|
- Optimize the patch for add sw architecture
|
||||||
|
|
||||||
|
* Fri Nov 18 2022 wuzx<wuzx1226@qq.com> - 2.4.109-5
|
||||||
|
- Add sw64 architecture
|
||||||
|
|
||||||
|
* Tue Oct 18 2022 Liu Zixian <liuzixian4@huawei.com> - 2.4.109-4
|
||||||
|
- remove unused BuildRequires
|
||||||
|
|
||||||
|
* Wed Mar 30 2022 liuyumeng <liuyumeng5@h-partners.com> - 2.4.109-3
|
||||||
|
- enable tests
|
||||||
|
|
||||||
|
* Tue Mar 1 2022 hanhui <hanhui15@h-partners.com> - 2.4.109-2
|
||||||
|
* customized valgrind
|
||||||
|
|
||||||
* Fri Dec 3 2021 xingxing <xingxing9@huawei.com> - 2.4.109-1
|
* Fri Dec 3 2021 xingxing <xingxing9@huawei.com> - 2.4.109-1
|
||||||
- update to 2.4.109
|
- update to 2.4.109
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user