[arch-commits] Commit in xf86-video-nouveau/trunk (2 files)
Andreas Radke
andyrtr at archlinux.org
Thu Jul 28 20:29:26 UTC 2016
Date: Thursday, July 28, 2016 @ 20:29:26
Author: andyrtr
Revision: 272667
upgpkg: xf86-video-nouveau 1.0.12-2
fix secondary display disconnects FS#49961
Added:
xf86-video-nouveau/trunk/properly_cleanup_fb_for_reverse-prime-offload.diff
Modified:
xf86-video-nouveau/trunk/PKGBUILD
----------------------------------------------------+
PKGBUILD | 23 ++++++---
properly_cleanup_fb_for_reverse-prime-offload.diff | 45 +++++++++++++++++++
2 files changed, 60 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-07-28 20:26:53 UTC (rev 272666)
+++ PKGBUILD 2016-07-28 20:29:26 UTC (rev 272667)
@@ -5,7 +5,7 @@
pkgname=xf86-video-nouveau
#pkgver=1.0.11+31+g1ff13a9
pkgver=1.0.12
-pkgrel=1
+pkgrel=2
pkgdesc="Open Source 2D acceleration driver for nVidia cards"
arch=('i686' 'x86_64')
url="http://nouveau.freedesktop.org/"
@@ -15,10 +15,11 @@
conflicts=('xorg-server<1.16' 'X-ABI-VIDEODRV_VERSION<20' 'X-ABI-VIDEODRV_VERSION>=21')
groups=('xorg-drivers' 'xorg')
install=$pkgname.install
-source=(http://xorg.freedesktop.org/archive/individual/driver/$pkgname-$pkgver.tar.bz2)
+source=(http://xorg.freedesktop.org/archive/individual/driver/$pkgname-$pkgver.tar.bz2
+ properly_cleanup_fb_for_reverse-prime-offload.diff)
#source=('git://anongit.freedesktop.org/nouveau/xf86-video-nouveau#commit=1ff13a9')
-sha256sums=('SKIP')
-sha256sums=('0ea057ad7fc31caba2d4e46c7e418fe2b3c762b04fb8d382f53383397fd8391e')
+sha256sums=('0ea057ad7fc31caba2d4e46c7e418fe2b3c762b04fb8d382f53383397fd8391e'
+ '9cbd02fa0d1acc821ff76e353f04cf16c3072e017ad0e8aaca460f83285567b3')
#pkgver() {
# cd $pkgname
@@ -25,11 +26,17 @@
# git describe --long | sed 's/xf86-video-nouveau-//' | sed 's/-/+/g'
#}
-#prepare() {
-# cd $pkgname
-# NOCONFIGURE=1 ./autogen.sh
-#}
+prepare() {
+ #cd $pkgname
+ #NOCONFIGURE=1 ./autogen.sh
+ cd $pkgname-$pkgver
+ # https://bugs.archlinux.org/task/49961
+ # https://cgit.freedesktop.org/nouveau/xf86-video-nouveau/commit/?id=12f77348e7a9579b167b41228dec9e6f97b74de8
+ patch -Np1 -i ../properly_cleanup_fb_for_reverse-prime-offload.diff
+
+}
+
build() {
cd $pkgname-$pkgver
# cd $pkgname
Added: properly_cleanup_fb_for_reverse-prime-offload.diff
===================================================================
--- properly_cleanup_fb_for_reverse-prime-offload.diff (rev 0)
+++ properly_cleanup_fb_for_reverse-prime-offload.diff 2016-07-28 20:29:26 UTC (rev 272667)
@@ -0,0 +1,45 @@
+From 12f77348e7a9579b167b41228dec9e6f97b74de8 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Fri, 3 Jun 2016 14:46:10 +0200
+Subject: Properly cleanup fb for reverse-prime-offload
+
+drmmode_set_scanout_pixmap(pix) adds drmmod->fb_id through a call
+to drmmode_xf86crtc_resize(), but on a subsequent
+drmmode_set_scanout_pixmap(NULL) it would not remove the fb.
+
+This keeps the crtc marked as busy, which causes the dgpu to not
+being able to runtime suspend, after an output attached to the dgpu
+has been used once. Which causes burning through an additional 10W
+of power and the laptop to run quite hot.
+
+This commit adds the missing remove fb call, allowing the dgpu to runtime
+suspend after an external monitor has been plugged into the laptop.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
+
+diff --git a/src/drmmode_display.c b/src/drmmode_display.c
+index b950f42..f326e46 100644
+--- a/src/drmmode_display.c
++++ b/src/drmmode_display.c
+@@ -680,10 +680,16 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
+ PixmapPtr screenpix = screen->GetScreenPixmap(screen);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
++ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ int c, total_width = 0, max_height = 0, this_x = 0;
+ if (!ppix) {
+- if (crtc->randr_crtc->scanout_pixmap)
++ if (crtc->randr_crtc->scanout_pixmap) {
+ PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix);
++ if (drmmode && drmmode->fb_id) {
++ drmModeRmFB(drmmode->fd, drmmode->fb_id);
++ drmmode->fb_id = 0;
++ }
++ }
+ drmmode_crtc->scanout_pixmap_x = 0;
+ return TRUE;
+ }
+--
+cgit v0.10.2
+
More information about the arch-commits
mailing list