[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#857489: marked as done (unblock: xserver-xorg-video-nouveau/1:1.0.13-2)



Your message dated Sun, 12 Mar 2017 09:35:00 +0000
with message-id <7bbc1de1-258f-bc42-73e3-1ef176d6efed@thykier.net>
and subject line Re: Bug#857489: unblock: xserver-xorg-video-nouveau/1:1.0.13-2
has caused the Debian Bug report #857489,
regarding unblock: xserver-xorg-video-nouveau/1:1.0.13-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
857489: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857489
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock the package xserver-xorg-video-nouveau, it fixes a bug
leading to a black screen when the monitor returns from powersave mode.

The problem only becomes visible with atomic modesetting in Linux 4.10
and later, but as quite a few people will install a newer kernel than
4.9 in stretch, I think it's important to fix it in the next release.

No bug report in the BTS, but it has been reported upstream at
https://bugs.freedesktop.org/show_bug.cgi?id=99922, and I could both
reproduce the bug and that the fix works.

unblock xserver-xorg-video-nouveau/1:1.0.13-2


diff -u xserver-xorg-video-nouveau-1.0.13/debian/changelog xserver-xorg-video-nouveau-1.0.13/debian/changelog
--- xserver-xorg-video-nouveau-1.0.13/debian/changelog
+++ xserver-xorg-video-nouveau-1.0.13/debian/changelog
@@ -1,3 +1,11 @@
+xserver-xorg-video-nouveau (1:1.0.13-2) unstable; urgency=medium
+
+  * Team upload.
+  * Cherry-pick commit 924083938c ("Consider CRTCs disabled when DPMS is
+    off") from upstream.
+
+ -- Sven Joachim <svenjoac@gmx.de>  Sat, 11 Mar 2017 09:00:49 +0100
+
 xserver-xorg-video-nouveau (1:1.0.13-1) unstable; urgency=medium
 
   * Team upload.
only in patch2:
unchanged:
--- xserver-xorg-video-nouveau-1.0.13.orig/src/drmmode_display.c
+++ xserver-xorg-video-nouveau-1.0.13/src/drmmode_display.c
@@ -65,6 +65,7 @@
     uint32_t rotate_fb_id;
     Bool cursor_visible;
     int scanout_pixmap_x;
+    int dpms_mode;
 } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr;
 
 typedef struct {
@@ -114,6 +115,14 @@
 	return drmmode_crtc->mode_crtc->crtc_id;
 }
 
+Bool
+drmmode_crtc_on(xf86CrtcPtr crtc)
+{
+    drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+    return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn;
+}
+
 int
 drmmode_head(xf86CrtcPtr crtc)
 {
@@ -313,9 +322,10 @@
 }
 
 static void
-drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode)
+drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
 {
-
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+	drmmode_crtc->dpms_mode = mode;
 }
 
 void
only in patch2:
unchanged:
--- xserver-xorg-video-nouveau-1.0.13.orig/src/nouveau_dri2.c
+++ xserver-xorg-video-nouveau-1.0.13/src/nouveau_dri2.c
@@ -279,23 +279,27 @@
 	ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen);
 	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
 	NVPtr pNv = NVPTR(scrn);
-	int i;
+	int i, active_crtc_count = 0;
 
 	if (!xf86_config->num_crtc)
 		return FALSE;
 
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 		xf86CrtcPtr crtc = xf86_config->crtc[i];
-		if (crtc->enabled && crtc->rotatedData)
-			return FALSE;
+		if (drmmode_crtc_on(crtc)) {
+			if (crtc->rotatedData)
+				return FALSE;
 
+			active_crtc_count++;
+		}
 	}
 
 	return ((DRI2CanFlip(draw) && pNv->has_pageflip)) &&
 		dst_pix->drawable.width == src_pix->drawable.width &&
 		dst_pix->drawable.height == src_pix->drawable.height &&
 		dst_pix->drawable.bitsPerPixel == src_pix->drawable.bitsPerPixel &&
-		dst_pix->devKind == src_pix->devKind;
+		dst_pix->devKind == src_pix->devKind &&
+		active_crtc_count;
 }
 
 static Bool
@@ -475,7 +479,7 @@
 		int head = drmmode_crtc(config->crtc[i]);
 		void *token;
 
-		if (!config->crtc[i]->enabled)
+		if (!drmmode_crtc_on(config->crtc[i]))
 			continue;
 
 		flipdata->flip_count++;
only in patch2:
unchanged:
--- xserver-xorg-video-nouveau-1.0.13.orig/src/nouveau_present.c
+++ xserver-xorg-video-nouveau-1.0.13/src/nouveau_present.c
@@ -152,7 +152,7 @@
 	ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen);
 	xf86CrtcPtr crtc = rrcrtc->devPrivate;
 
-	if (!scrn->vtSema || !crtc->enabled)
+	if (!scrn->vtSema || !drmmode_crtc_on(crtc))
 		return FALSE;
 
 	return TRUE;
@@ -199,7 +199,7 @@
 			flip->msc = target_msc;
 
 			for (i = 0; i < config->num_crtc; i++) {
-				if (config->crtc[i]->enabled)
+				if (drmmode_crtc_on(config->crtc[i]))
 					last = i;
 			}
 
@@ -208,7 +208,7 @@
 				int crtc = drmmode_crtc(config->crtc[i]);
 				void *user = NULL;
 
-				if (!config->crtc[i]->enabled)
+				if (!drmmode_crtc_on(config->crtc[i]))
 					continue;
 
 				if (token && ((crtc == sync) || (i == last))) {
only in patch2:
unchanged:
--- xserver-xorg-video-nouveau-1.0.13.orig/src/nouveau_xv.c
+++ xserver-xorg-video-nouveau-1.0.13/src/nouveau_xv.c
@@ -299,7 +299,7 @@
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 		xf86CrtcPtr crtc = xf86_config->crtc[i];
 
-		if (!crtc->enabled)
+		if (!drmmode_crtc_on(crtc))
 			continue;
 
 		if ((x < (crtc->x + crtc->mode.HDisplay)) &&
only in patch2:
unchanged:
--- xserver-xorg-video-nouveau-1.0.13.orig/src/nv_proto.h
+++ xserver-xorg-video-nouveau-1.0.13/src/nv_proto.h
@@ -13,6 +13,7 @@
 void drmmode_screen_fini(ScreenPtr pScreen);
 
 int  drmmode_crtc(xf86CrtcPtr crtc);
+Bool drmmode_crtc_on(xf86CrtcPtr crtc);
 int  drmmode_head(xf86CrtcPtr crtc);
 void drmmode_swap(ScrnInfoPtr, uint32_t, uint32_t *);
 

--- End Message ---
--- Begin Message ---
Sven Joachim:
> Package: release.debian.org
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> 
> Please unblock the package xserver-xorg-video-nouveau, it fixes a bug
> leading to a black screen when the monitor returns from powersave mode.
> 
> The problem only becomes visible with atomic modesetting in Linux 4.10
> and later, but as quite a few people will install a newer kernel than
> 4.9 in stretch, I think it's important to fix it in the next release.
> 
> No bug report in the BTS, but it has been reported upstream at
> https://bugs.freedesktop.org/show_bug.cgi?id=99922, and I could both
> reproduce the bug and that the fix works.
> 
> unblock xserver-xorg-video-nouveau/1:1.0.13-2
> 
> 

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: