diff --git a/0001-Fix-build-on-F28-and-later.patch b/0001-Fix-build-on-F28-and-later.patch deleted file mode 100644 index ca525eccc9eb24f650f1a3acc8f3ce293b12028f..0000000000000000000000000000000000000000 --- a/0001-Fix-build-on-F28-and-later.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 9c1151b4d65c356f0d25d952fe1a10c89fdb834a Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Mon, 5 Mar 2018 11:03:18 -0500 -Subject: [PATCH] Fix build on F28 and later - -Newer gcc complains that it doesn't know how to always-inline memcpy(): - - /usr/include/bits/string_fortified.h:31:1: error: inlining failed in - call to always_inline 'memcpy': target specific option mismatch - -This is because we need to wrap our declaration of memcpy() in the -options we're trying to push at the top of blt.c. So: include compiler.h -to define sse2, then push options, then include everything else. - -However if you do that, the word 'nonnull' collides with the usage in -. I'm too lazy to fix that properly, just expand it to -the __attribute__ form in the few places we say it. - -Signed-off-by: Adam Jackson ---- - src/sna/blt.c | 6 ++++-- - src/sna/compiler.h | 2 -- - src/sna/gen6_common.h | 6 +++--- - 3 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/sna/blt.c b/src/sna/blt.c -index cb90437a..fb357d35 100644 ---- a/src/sna/blt.c -+++ b/src/sna/blt.c -@@ -29,13 +29,15 @@ - #include "config.h" - #endif - --#include "sna.h" --#include -+#include "compiler.h" - - #if defined(sse2) - #pragma GCC push_options - #pragma GCC target("sse2,inline-all-stringops,fpmath=sse") - #pragma GCC optimize("Ofast") -+ -+#include -+#include "sna.h" - #include - - #if __x86_64__ -diff --git a/src/sna/compiler.h b/src/sna/compiler.h -index 0f3775ec..3c176a16 100644 ---- a/src/sna/compiler.h -+++ b/src/sna/compiler.h -@@ -39,7 +39,6 @@ - #define pure __attribute__((pure)) - #define tightly_packed __attribute__((__packed__)) - #define flatten __attribute__((flatten)) --#define nonnull __attribute__((nonnull)) - #define page_aligned __attribute__((aligned(4096))) - #else - #define likely(expr) (expr) -@@ -52,7 +51,6 @@ - #define pure - #define tighly_packed - #define flatten --#define nonnull - #define page_aligned - #endif - -diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h -index b53ec0c9..119a2d5d 100644 ---- a/src/sna/gen6_common.h -+++ b/src/sna/gen6_common.h -@@ -133,7 +133,7 @@ inline static bool force_blt_ring(struct sna *sna, struct kgem_bo *bo) - return false; - } - --nonnull inline static bool -+__attribute__((nonnull)) inline static bool - prefer_blt_ring(struct sna *sna, struct kgem_bo *bo, unsigned flags) - { - if (PREFER_RENDER) -@@ -148,7 +148,7 @@ prefer_blt_ring(struct sna *sna, struct kgem_bo *bo, unsigned flags) - return can_switch_to_blt(sna, bo, flags); - } - --nonnull inline static bool -+__attribute__((nonnull)) inline static bool - prefer_render_ring(struct sna *sna, struct kgem_bo *bo) - { - if (sna->kgem.ring == KGEM_RENDER) -@@ -191,7 +191,7 @@ prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp) - return prefer_blt_bo(sna, tmp->src.bo, tmp->dst.bo); - } - --nonnull static inline bool -+__attribute__((nonnull)) static inline bool - prefer_blt_fill(struct sna *sna, struct kgem_bo *bo, unsigned flags) - { - if (PREFER_RENDER) --- -2.16.2 - diff --git a/0001-Fix-build-on-i686.patch b/0001-Fix-build-on-i686.patch deleted file mode 100644 index 0851fbe4b1f71943bd0084256c1a112478562cf8..0000000000000000000000000000000000000000 --- a/0001-Fix-build-on-i686.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a414d4e24461da1cb4cef8ee910bc57bab360ceb Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Tue, 6 Mar 2018 12:07:46 -0500 -Subject: [PATCH] Fix build on i686 - -Presumably this only matters for i686 because amd64 implies sse2, but: - -BUILDSTDERR: In file included from gen4_vertex.c:34: -BUILDSTDERR: gen4_vertex.c: In function 'emit_vertex': -BUILDSTDERR: sna_render_inline.h:40:26: error: inlining failed in call to always_inline 'vertex_emit_2s': target specific option mismatch -BUILDSTDERR: static force_inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y) -BUILDSTDERR: ^~~~~~~~~~~~~~ -BUILDSTDERR: gen4_vertex.c:308:25: note: called from here -BUILDSTDERR: #define OUT_VERTEX(x,y) vertex_emit_2s(sna, x,y) /* XXX assert(!too_large(x, y)); */ -BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -BUILDSTDERR: gen4_vertex.c:360:2: note: in expansion of macro 'OUT_VERTEX' -BUILDSTDERR: OUT_VERTEX(dstX, dstY); -BUILDSTDERR: ^~~~~~~~~~ - -The bug here appears to be that emit_vertex() is declared 'sse2' but -vertex_emit_2s is merely always_inline. gcc8 decides that since you said -always_inline you need to have explicitly cloned it for every -permutation of targets. Merely saying inline seems to do the job of -cloning vertex_emit_2s as much as necessary. - -So to reiterate: if you say always-inline, it won't, but if you just say -maybe inline, it will. Thanks gcc, that's helpful. - -- ajax ---- - src/sna/compiler.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sna/compiler.h b/src/sna/compiler.h -index 3c176a16..bc447c7a 100644 ---- a/src/sna/compiler.h -+++ b/src/sna/compiler.h -@@ -32,7 +32,7 @@ - #define likely(expr) (__builtin_expect (!!(expr), 1)) - #define unlikely(expr) (__builtin_expect (!!(expr), 0)) - #define noinline __attribute__((noinline)) --#define force_inline inline __attribute__((always_inline)) -+#define force_inline inline - #define fastcall __attribute__((regparm(3))) - #define must_check __attribute__((warn_unused_result)) - #define constant __attribute__((const)) --- -2.16.2 - diff --git a/0002-fix-linkage.patch b/0002-fix-linkage.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc3f8fa6efa1a4bc79f9cdc9bf0e6a1298556445 --- /dev/null +++ b/0002-fix-linkage.patch @@ -0,0 +1,10 @@ +--- a/src/meson.build.orig 2024-10-02 23:15:10.211782400 +0800 ++++ b/src/meson.build 2024-10-02 23:20:41.952330800 +0800 +@@ -92,6 +92,7 @@ + + intel_drv_deps = [ + dependency('pciaccess', version : '>= 0.10', required : true), ++ dependency('xfont2'), + libdrm, + xorg, + ] diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh deleted file mode 100644 index 4d1ec9f9aa13d615d3f5859605b9dd78da06f1e3..0000000000000000000000000000000000000000 --- a/make-git-snapshot.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Usage: ./make-git-snapshot.sh [COMMIT] -# -# to make a snapshot of the given tag/branch. Defaults to HEAD. -# Point env var REF to a local mesa repo to reduce clone time. - -DIRNAME=xf86-video-intel-$( date +%Y%m%d ) - -echo REF ${REF:+--reference $REF} -echo DIRNAME $DIRNAME -echo HEAD ${1:-HEAD} - -rm -rf $DIRNAME - -git clone ${REF:+--reference $REF} \ - git://git.freedesktop.org/git/xorg/driver/xf86-video-intel $DIRNAME - -GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \ - | bzip2 > $DIRNAME.tar.bz2 - -# rm -rf $DIRNAME diff --git a/xf86-video-intel-20180618.tar.bz2 b/xf86-video-intel-20180618.tar.bz2 deleted file mode 100644 index 3e25979d25c42ac586b27aa32c11f8f3107d97e6..0000000000000000000000000000000000000000 Binary files a/xf86-video-intel-20180618.tar.bz2 and /dev/null differ diff --git a/xf86-video-intel-ce811e78882d9f31636351dfe65351f4ded52c74.tar.bz2 b/xf86-video-intel-ce811e78882d9f31636351dfe65351f4ded52c74.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..5f2896808ad6ddb85cfcd4ff229d7b73a7b5d63b Binary files /dev/null and b/xf86-video-intel-ce811e78882d9f31636351dfe65351f4ded52c74.tar.bz2 differ diff --git a/xorg-x11-drv-intel.spec b/xorg-x11-drv-intel.spec index e9921eac05a984e2fac9e4d821a7e3e6c1d5ab30..65c8433f2d1d233315eddffec5e216b816bfe769 100644 --- a/xorg-x11-drv-intel.spec +++ b/xorg-x11-drv-intel.spec @@ -1,32 +1,65 @@ +%global commit ce811e78882d9f31636351dfe65351f4ded52c74 + %define moduledir %(pkg-config xorg-server --variable=moduledir ) -%define driverdir %{moduledir}/drivers +%define driverdir %{moduledir}/drivers # Xorg cannot load hardened build %undefine _hardened_build -Name: xorg-x11-drv-intel -Version: 2.99.917 -Release: 47 -Summary: Xorg X11 Intel video driver -License: MIT -URL: http://www.x.org -Source0: https://src.fedoraproject.org/repo/pkgs/xorg-x11-drv-intel/xf86-video-intel-20180618.tar.bz2/sha512/50d7f8ec10db8200700c2de804c21987c903b347615c004e9f5334c1f2b189fafdc049469e1491d651bbcd8df2968c1247d0f4d2a3dc6c7d885a40ad577a5101/xf86-video-intel-20180618.tar.bz2 -Source1: make-git-snapshot.sh - -ExclusiveArch: %{ix86} x86_64 ia64 -BuildRequires: autoconf automake make libtool xorg-x11-server-devel libX11-devel libXinerama-devel -BuildRequires: libXcursor-devel libXdamage-devel libXext-devel libXfixes-devel libXrandr-devel -BuildRequires: libXrender-devel libXtst-devel libXvMC-devel libXfont2-devel mesa-libGL-devel -BuildRequires: libdrm-devel kernel-headers libudev-devel libxcb-devel xcb-util-devel python3 -BuildRequires: cairo-devel libXScrnSaver-devel libXScrnSaver libXext-devel pixman-devel libXv-devel - -Requires: Xorg %(xserver-sdk-abi-requires ansic) polkit -Requires: Xorg %(xserver-sdk-abi-requires videodrv) - -Patch0000: intel-gcc-pr65873.patch -Patch0001: 0001-sna-Avoid-clobbering-output-physical-size-with-xf86O.patch -Patch0002: 0001-Fix-build-on-F28-and-later.patch -Patch0003: 0001-Fix-build-on-i686.patch +Name: xorg-x11-drv-intel +Version: 2.99.917 +Release: 48 +Summary: Xorg X11 Intel video driver +License: MIT +URL: https://www.x.org +Source0: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/archive/%{commit}/xf86-video-intel-%{commit}.tar.bz2 + +ExclusiveArch: %{ix86} x86_64 ia64 +BuildRequires: meson >= 0.40.0 +BuildRequires: pkgconfig(damageproto) +BuildRequires: pkgconfig(dri) +BuildRequires: pkgconfig(dri2proto) >= 2.6 +BuildRequires: pkgconfig(dri3proto) +BuildRequires: pkgconfig(fontsproto) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libdrm_intel) >= 2.4.52 +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(pciaccess) >= 0.10 +BuildRequires: pkgconfig(pixman-1) >= 0.24.0 +BuildRequires: pkgconfig(presentproto) +BuildRequires: pkgconfig(randrproto) +BuildRequires: pkgconfig(renderproto) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(x11-xcb) +BuildRequires: pkgconfig(xcb-aux) +BuildRequires: pkgconfig(xcb-dri2) +BuildRequires: pkgconfig(xcb-dri3) +BuildRequires: pkgconfig(xcursor) +buildRequires: pkgconfig(xdamage) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(xf86driproto) +BuildRequires: pkgconfig(xfixes) +BuildRequires: pkgconfig(xfont2) +BuildRequires: pkgconfig(xinerama) +BuildRequires: pkgconfig(xorg-server) >= 1.6 +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(xrandr) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(xtst) +BuildRequires: pkgconfig(xv) +BuildRequires: pkgconfig(xvmc) +BuildRequires: pkgconfig(xxf86vm) + +Requires: Xorg %(xserver-sdk-abi-requires ansic) polkit +Requires: Xorg %(xserver-sdk-abi-requires videodrv) + +Patch0000: intel-gcc-pr65873.patch +Patch0001: 0001-sna-Avoid-clobbering-output-physical-size-with-xf86O.patch +Patch0002: xvmc-workaround.patch +Patch0003: 0002-fix-linkage.patch %description X.Org X11 Intel video driver. @@ -34,36 +67,61 @@ X.Org X11 Intel video driver. %package_help %prep -%autosetup -n xf86-video-intel-20180618 -p1 +%autosetup -n xf86-video-intel-%{commit} -p1 %build -autoreconf -f -i -v -%configure --enable-kms-only --with-default-dri=3 --enable-tools -%make_build V=1 +# This package causes LTO to thrash sucking up enormous amounts of VM. This +# is almost certainly a GCC bug that will need to be analyzed/fixed. Until +# then, disable LTO. +%define _lto_cflags %{nil} +%meson \ + -D async-swap=false \ + -D backlight-helper=true \ + -D backlight=true \ + -D default-accel=sna \ + -D default-dri=3 \ + -D dri1=false \ + -D dri2=true \ + -D dri3=true \ + -D internal-debug=no \ + -D kms=true \ + -D present=true \ + -D sna=true \ + -D tearfree=false \ + -D tools=true \ + -D ums=false \ + -D use-create2=false \ + -D uxa=true \ + -D valgrind=false \ + -D xaa=true \ + -D xvmc=true +%meson_build %install -%make_install -%delete_la -rm -f %{buildroot}%{_libdir}/libI*XvMC.so +%meson_install -%ldconfig_scriptlets +rm -f %{buildroot}%{_libdir}/libI*XvMC.so %files -%defattr(-,root,root) %doc AUTHORS %license COPYING %{driverdir}/intel_drv.so -%{_bindir}/intel-virtual-output %{_libdir}/libIntelXvMC.so.1* %{_libexecdir}/xf86-video-intel-backlight-helper %{_datadir}/polkit-1/actions/org.x.xf86-video-intel.backlight-helper.policy +%{_bindir}/intel-virtual-output -%files help -%defattr(-,root,root) +%files help %doc README NEWS %{_mandir}/man4/i* %changelog +* Wed Oct 02 2024 Funda Wang - 2.99.917-48 +- update to latest snapshot at 20230318 +- build with meson +- disable lto build +- cleanup spec + * Mon Jun 26 2023 liuxinhao - 2.99.917-47 - undefine _hardened_build , partially enable lazybinding to avoid driver loading failure on xorg diff --git a/xorg-x11-drv-intel.yaml b/xorg-x11-drv-intel.yaml index 1b1e684e3b6db389fcce67922516a4bcdda9066a..20f657f0e2ba2b60c59f460f054c09edb6d6ff7b 100644 --- a/xorg-x11-drv-intel.yaml +++ b/xorg-x11-drv-intel.yaml @@ -1,4 +1,4 @@ version_control: git src_repo: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel.git tag_prefix: ^ -seperator: . +separator: . diff --git a/xvmc-workaround.patch b/xvmc-workaround.patch new file mode 100644 index 0000000000000000000000000000000000000000..ce4c4166cda3a6139e2f41341aa6476ba0d84d4e --- /dev/null +++ b/xvmc-workaround.patch @@ -0,0 +1,28 @@ +From 2421edb8e799dc067e2091452001ac1450ea8345 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Fri, 17 Jan 2020 14:45:39 +0000 +Subject: [PATCH] xvmc: add missing dependency on Xv + +libXvMC does not directly pull in libXv since dd9ae03 (1.0.12 onwards). +Add the missing Xv depenedency as the driver does need libXv. + +Closes #180 +--- + xvmc/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xvmc/meson.build b/xvmc/meson.build +index 0ecc51e57..eeba2b669 100644 +--- a/xvmc/meson.build ++++ b/xvmc/meson.build +@@ -14,6 +14,7 @@ shared_library('IntelXvMC', + dependencies : [ + dependency('threads', required : true), + dependency('x11', required : true), ++ dependency('xv', required : true), + dependency('xvmc', required : true), + dependency('xorg-server', required : true), + dependency('x11-xcb', required : true), +-- +GitLab +