Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
0ab4c2c008
!38 update to version 2.4.119
From: @paulthomas100199 
Reviewed-by: @open-bot 
Signed-off-by: @open-bot
2023-12-29 07:15:55 +00:00
lwg
33c600f3fa update to version 2.4.119 2023-12-28 11:43:32 +08:00
openeuler-ci-bot
325d86fd8c
!37 升级到2.4.117
From: @lvgenggeng 
Reviewed-by: @open-bot, @open123bot 
Signed-off-by: @open123bot, @open-bot
2023-11-15 10:24:47 +00:00
lvgenggeng
ecd4718d44 update to 2.4.117
Signed-off-by: lvgenggeng <lvgenggeng@uniontech.com>
2023-11-15 18:14:51 +08:00
openeuler-ci-bot
b2fc187fcb
!36 update to 2.4.115
From: @Jingwiw 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
2023-07-21 15:35:13 +00:00
Jingwiw
f940d36929 update to 2.4.115 2023-07-21 23:25:39 +08:00
openeuler-ci-bot
e99a6dcd17
!28 remove rpath
From: @zhouwenpei 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-12-08 09:51:58 +00:00
zhouwenpei
478dd757fd remove rpath 2022-12-08 17:33:34 +08:00
openeuler-ci-bot
1081af928a
!24 Add sw64 architecture
From: @zhouwenpei 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-11-18 06:40:10 +00:00
zhouwenpei
77529e716a Add sw64 architecture 2022-11-18 03:45:08 +00:00
8 changed files with 130 additions and 28 deletions

View File

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

78
libdrm-2.4.109-sw.patch Normal file
View File

@ -0,0 +1,78 @@
diff --git a/include/drm/drm_sarea.h b/include/drm/drm_sarea.h
index 93025be..60b979a 100644
--- a/include/drm/drm_sarea.h
+++ b/include/drm/drm_sarea.h
@@ -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
+#elif defined(__alpha__)
#define SAREA_MAX 0x2000U
#elif defined(__mips__)
#define SAREA_MAX 0x4000U
diff --git a/xf86drm.c b/xf86drm.c
index 7a7a23f..6daaaf7 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -1119,7 +1119,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)) {
-#ifndef __alpha__
+#ifndef __sw_64__
pci_domain_ok = 0;
#endif
sv.drm_di_major = 1;
diff --git a/xf86drm.h b/xf86drm.h
index 4c79a65..a8d3ad4 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -382,6 +382,34 @@ typedef struct _drmSetVersion {
"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 @@ do { register unsigned int __old __asm("o0"); \
#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

Binary file not shown.

Binary file not shown.

BIN
libdrm-2.4.119.tar.xz Normal file

Binary file not shown.

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

Binary file not shown.

View File

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

View File

@ -1,4 +1,11 @@
%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 with = rpm.expand("%{?with_" .. option .. "}")
local value = (with ~= '') and "true" or "false"
@ -6,7 +13,6 @@
print(string.format("-D%s=%s", option, value))
end}
%bcond_without libkms
%ifarch %{ix86} x86_64
%bcond_without intel
%else
@ -26,6 +32,7 @@ end}
%bcond_without freedreno
%bcond_without tegra
%bcond_without vc4
%bcond_without etnaviv
%else
%bcond_with exynos
@ -46,14 +53,14 @@ end}
%bcond_without udev
Name: libdrm
Version: 2.4.109
Release: 4
Version: 2.4.119
Release: 1
License: MIT
Summary: library for direct rendering manager
URL: https://dri.freedesktop.org
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
BuildRequires: meson >= 0.43 gcc kernel-headers
@ -80,6 +87,9 @@ BuildRequires: pkgconfig(udev)
Patch1001: %{name}-make-dri-perms-okay.patch
Patch1002: %{name}-2.4.0-no-bc.patch
%ifarch sw_64
Patch1003: libdrm-2.4.109-sw.patch
%endif
%description
%{name} provides a user space library for accessing the DRM, direct rendering manager,
@ -112,14 +122,14 @@ Utility programs for the kernel DRM interface.
%build
%meson \
%{bcond_meson libkms} %{bcond_meson intel} %{bcond_meson radeon} %{bcond_meson amdgpu} \
%{bcond_meson intel} %{bcond_meson radeon} %{bcond_meson amdgpu} \
%{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 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_tf freedreno_kgsl} %{bcond_meson_tf install_test_programs} %{bcond_meson_tf udev} \
%{nil}
%meson_build
@ -137,13 +147,12 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%ldconfig_scriptlets
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%files
%defattr(-,root,root)
%{_libdir}/%{name}.so.*
%dir %{_datadir}/%{name}/
%if %{with libkms}
%{_libdir}/libkms.so.*
%endif
%if %{with intel}
%{_libdir}/%{name}_intel.so.*
%endif
@ -182,11 +191,6 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%{_includedir}/%{name}/*_drm.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%if %{with libkms}
%{_includedir}/libkms/
%{_libdir}/libkms.so
%{_libdir}/pkgconfig/libkms.pc
%endif
%if %{with intel}
%{_includedir}/%{name}/intel_*.h
%{_libdir}/%{name}_intel.so
@ -246,12 +250,14 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%defattr(-,root,root)
%{_bindir}/amdgpu_stress
%{_bindir}/drmdevice
%if %{with etnaviv}
%exclude %{_bindir}/etnaviv_*
%endif
%if %{with exynos}
%exclude %{_bindir}/exynos_*
%{_bindir}/kms-steal-crtc
%{_bindir}/kms-universal-planes
%if %{with libkms}
%{_bindir}/kmstest
%endif
%if %{with tegra}
%exclude %{_bindir}/tegra-*
%endif
%{_bindir}/modeprint
%{_bindir}/modetest
@ -267,6 +273,24 @@ install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%endif
%changelog
* 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
- 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