In the recent implementation of dpms+kms, the --with-kms=no codepath got
broken - pNv->allow_dpms was being used unconditionally, while this is
only defined when XF86DRM_MODE is set.

The attached patch guards these with ifdef.
From 45a5c55a318cb28ea44d7bfb19d9160da4eee855 Mon Sep 17 00:00:00 2001
From: Christopher James Halse Rogers <[email protected]>
Date: Tue, 24 Mar 2009 17:28:39 +1100
Subject: [PATCH] Fix --with-kms=no build.

Commit 98c9e4edb58374f18249e5c9c53b392fb8b4a1d1 introduced some unguarded pNv->allow_dpms usage, but this is only defined when XF86MODE is defined
---
 src/nv_driver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index ec4577f..f7915a8 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -684,10 +684,14 @@ NVEnterVT(int scrnIndex, int flags)
 			return FALSE;
 		NVAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
 	} else {
+#ifdef XF86DRM_MODE
 		pNv->allow_dpms = FALSE;
+#endif
 		if (!xf86SetDesiredModes(pScrn))
 			return FALSE;
+#ifdef XF86DRM_MODE
 		pNv->allow_dpms = TRUE;
+#endif
 	}
 
 	if (pNv->overlayAdaptor && pNv->Architecture != NV_ARCH_04)
-- 
1.6.0.4

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to