[arch-commits] Commit in xf86-video-intel/repos (4 files)
Andreas Radke
andyrtr at archlinux.org
Tue Mar 12 21:52:35 UTC 2019
Date: Tuesday, March 12, 2019 @ 21:52:34
Author: andyrtr
Revision: 347817
archrelease: copy trunk to testing-x86_64
Added:
xf86-video-intel/repos/testing-x86_64/
xf86-video-intel/repos/testing-x86_64/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch
(from rev 347816, xf86-video-intel/trunk/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch)
xf86-video-intel/repos/testing-x86_64/PKGBUILD
(from rev 347816, xf86-video-intel/trunk/PKGBUILD)
xf86-video-intel/repos/testing-x86_64/xf86-video-intel.install
(from rev 347816, xf86-video-intel/trunk/xf86-video-intel.install)
------------------------------------------------------------+
0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch | 93 +++++++++++
PKGBUILD | 88 ++++++++++
xf86-video-intel.install | 21 ++
3 files changed, 202 insertions(+)
Copied: xf86-video-intel/repos/testing-x86_64/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch (from rev 347816, xf86-video-intel/trunk/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch)
===================================================================
--- testing-x86_64/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch (rev 0)
+++ testing-x86_64/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch 2019-03-12 21:52:34 UTC (rev 347817)
@@ -0,0 +1,93 @@
+From e85424325911626556fbe5a313c698a5da701163 Mon Sep 17 00:00:00 2001
+From: Peter Wu <peter at lekensteyn.nl>
+Date: Mon, 13 Aug 2018 22:59:50 +0200
+Subject: [PATCH xf86-video-intel] SNA: fix PRIME output support since xserver
+ 1.20
+
+Since xorg-server 1.20, an external monitor would remain blank when used
+in a PRIME output slave setup. Only a cursor was visible. The cause is
+"Make PixmapDirtyUpdateRec::src a DrawablePtr" in xserver, the "src"
+pointer might point to the root window (created by the server) instead
+of a pixmap (as created by xf86-video-intel). Use get_drawable_pixmap to
+handle both cases.
+
+When built with -fsanitize=address, the following test will trigger a
+heap-buffer-overflow error due to to_sna_from_pixmap receiving a window
+instead of a pixmap.
+
+Test on a hybrid graphics laptop (Intel + modesetting/nouveau):
+
+ xrandr --setprovideroutputsource modesetting Intel
+ xrandr --output DP-1-1 --mode 2560x1440 # should not crash
+ glxgears # should display gears on both screens
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100086
+Signed-off-by: Peter Wu <peter at lekensteyn.nl>
+---
+Tested with xserver 1.20.1 with ASAN enabled. Survives multiple
+resolution changes, works with a Plasma desktop session, it seems
+stable. Something like this patch is required to make multi-monitor
+setups usable in a hybrid graphics setting with Xorg 1.20.
+---
+ src/sna/sna_accel.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
+index 2f669bcf..80b116a3 100644
+--- a/src/sna/sna_accel.c
++++ b/src/sna/sna_accel.c
+@@ -17510,7 +17510,11 @@ static bool has_offload_slaves(struct sna *sna)
+ PixmapDirtyUpdatePtr dirty;
+
+ xorg_list_for_each_entry(dirty, &screen->pixmap_dirty_list, ent) {
++#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
++ assert(dirty->src == &sna->front->drawable);
++#else
+ assert(dirty->src == sna->front);
++#endif
+ if (RegionNotEmpty(DamageRegion(dirty->damage)))
+ return true;
+ }
+@@ -17671,7 +17675,11 @@ static void sna_accel_post_damage(struct sna *sna)
+ if (RegionNil(damage))
+ continue;
+
++#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
++ src = get_drawable_pixmap(dirty->src);
++#else
+ src = dirty->src;
++#endif
+ dst = dirty->slave_dst->master_pixmap;
+
+ region.extents.x1 = dirty->x;
+@@ -17922,9 +17930,15 @@ migrate_dirty_tracking(PixmapPtr old_front, PixmapPtr new_front)
+ PixmapDirtyUpdatePtr dirty, safe;
+
+ xorg_list_for_each_entry_safe(dirty, safe, &screen->pixmap_dirty_list, ent) {
++#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
++ assert(dirty->src == &old_front->drawable);
++ if (dirty->src != &old_front->drawable)
++ continue;
++#else
+ assert(dirty->src == old_front);
+ if (dirty->src != old_front)
+ continue;
++#endif
+
+ DamageUnregister(&dirty->src->drawable, dirty->damage);
+ DamageDestroy(dirty->damage);
+@@ -17939,7 +17953,11 @@ migrate_dirty_tracking(PixmapPtr old_front, PixmapPtr new_front)
+ }
+
+ DamageRegister(&new_front->drawable, dirty->damage);
++#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
++ dirty->src = &new_front->drawable;
++#else
+ dirty->src = new_front;
++#endif
+ }
+ #endif
+ }
+--
+2.18.0
+
Copied: xf86-video-intel/repos/testing-x86_64/PKGBUILD (from rev 347816, xf86-video-intel/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2019-03-12 21:52:34 UTC (rev 347817)
@@ -0,0 +1,88 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=xf86-video-intel
+_commit=6afed33b2d673d88674f0c76efe500ae414e8e1b # master
+pkgver=2.99.917+863+g6afed33b
+pkgrel=1
+epoch=1
+arch=(x86_64)
+url="https://01.org/linuxgraphics"
+license=('custom')
+install=$pkgname.install
+pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers"
+depends=('mesa' 'libxvmc' 'pixman' 'xcb-util>=0.3.9' 'systemd-libs')
+makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=24.0' 'libx11' 'libxrender'
+ # additional deps for intel-virtual-output
+ 'libxrandr' 'libxinerama' 'libxcursor' 'libxtst' 'libxss'
+ # additional for git snapshot
+ 'git') # 'meson' 'valgrind')
+optdepends=('libxrandr: for intel-virtual-output'
+ 'libxinerama: for intel-virtual-output'
+ 'libxcursor: for intel-virtual-output'
+ 'libxtst: for intel-virtual-output'
+ 'libxss: for intel-virtual-output')
+replaces=('xf86-video-intel-uxa' 'xf86-video-intel-sna')
+provides=('xf86-video-intel-uxa' 'xf86-video-intel-sna')
+conflicts=('xorg-server<1.20' 'X-ABI-VIDEODRV_VERSION<24' 'X-ABI-VIDEODRV_VERSION>=25'
+ 'xf86-video-intel-sna' 'xf86-video-intel-uxa' 'xf86-video-i810' 'xf86-video-intel-legacy')
+groups=('xorg-drivers')
+source=("git+https://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel#commit=$_commit"
+ 0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch)
+sha256sums=('SKIP'
+ '7cdc310953379ede9693a387ecac6c803cc4c4461df5ad9ab875b35e90a552f5')
+#options=('!makeflags')
+
+pkgver() {
+ cd $pkgname
+ git describe --tags | sed 's/-/+/g'
+}
+
+prepare() {
+ cd $pkgname
+
+ # fix external monitor - FS#58895
+ # https://bugs.freedesktop.org/show_bug.cgi?id=100086
+ patch -Np1 -i ../0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch
+
+ NOCONFIGURE=1 ./autogen.sh
+
+# mkdir build
+}
+
+build() {
+ cd $pkgname
+
+ # Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf
+ # With them, module fail to load with undefined symbol.
+ # See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845
+ export CFLAGS=${CFLAGS/-fno-plt}
+ export CXXFLAGS=${CXXFLAGS/-fno-plt}
+ export LDFLAGS=${LDFLAGS/,-z,now}
+
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --with-default-dri=3
+ make
+# cd build
+# arch-meson $pkgname build \
+# -Dwith-default-dri=3
+# ninja -C build
+}
+
+check() {
+ cd $pkgname
+ make check
+# meson test -C build
+}
+
+package() {
+ cd $pkgname
+
+ make DESTDIR="${pkgdir}" install
+
+# DESTDIR="$pkgdir" ninja -C build install
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
Copied: xf86-video-intel/repos/testing-x86_64/xf86-video-intel.install (from rev 347816, xf86-video-intel/trunk/xf86-video-intel.install)
===================================================================
--- testing-x86_64/xf86-video-intel.install (rev 0)
+++ testing-x86_64/xf86-video-intel.install 2019-03-12 21:52:34 UTC (rev 347817)
@@ -0,0 +1,21 @@
+post_install() {
+ cat <<MSG
+>>> This driver now uses DRI3 as the default Direct Rendering
+ Infrastructure. You can try falling back to DRI2 if you run
+ into trouble. To do so, save a file with the following
+ content as /etc/X11/xorg.conf.d/20-intel.conf :
+ Section "Device"
+ Identifier "Intel Graphics"
+ Driver "intel"
+ Option "DRI" "2" # DRI3 is now default
+ #Option "AccelMethod" "sna" # default
+ #Option "AccelMethod" "uxa" # fallback
+ EndSection
+MSG
+}
+
+post_upgrade() {
+ if (( $(vercmp $2 1:2.99.917+684+g6988b87-3) < 0 )); then
+ post_install
+ fi
+}
More information about the arch-commits
mailing list