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

Bug#708310: marked as done ([xserver-xorg-video-nouveau] zaphodheads configure option no longer works)



Your message dated Sat, 08 Jun 2013 11:48:23 +0000
with message-id <E1UlHd9-0007tV-V3@franck.debian.org>
and subject line Bug#708310: fixed in xserver-xorg-video-nouveau 1:1.0.7-2
has caused the Debian Bug report #708310,
regarding [xserver-xorg-video-nouveau] zaphodheads configure option no longer works
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.)


-- 
708310: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708310
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xserver-xorg-video-nouveau
Version: 1:1.0.7-1
Severity: normal
Tags: patch

--- Please enter the report below this line. ---

Dear Maintainer,

After upgrading to the 1.0.7 nouveau package, my configuration stopped
working. Downgrading back to 1.0.1 fixed the problem. I discussed the
issue with some of the nouveau devs on irc. They suggesting doing a git
bisect. After that, Dave Airlie made a patch, which I tested. He has
since added that fix in recent commits. I have tested that and submit
here a patch that would bring the 1.0.7 release up to nouveau.git and
fixes the problem for me.

Thank You,
John Vogel


--- System information. ---
Architecture: amd64
Kernel:       Linux 3.8.12

Debian Release: jessie/sid
  900 unstable        debian.cs.binghamton.edu
  800 testing         security.debian.org
  800 testing         debian.cs.binghamton.edu
  500 experimental    mozilla.debian.net
  500 experimental    debian.cs.binghamton.edu

--- Package information. ---
Depends                       (Version) | Installed
=======================================-+-==================
libc6                         (>= 2.15) | 2.17-2
libdrm-nouveau2             (>= 2.4.34) | 2.4.40-1
libudev0                       (>= 146) | 175-7.2
xorg-video-abi-12                       |
xserver-xorg-core     (>= 2:1.12.3.901) | 2:1.12.4-6


Recommends            (Version) | Installed
===============================-+-============
libgl1-mesa-dri     (>= 7.11.1) | 8.0.5-4+b1


Package's Suggests field is empty.



-8<---8<---8<---8<---8<---8<---8<---8<---8<--
Please attach the file:
  /tmp/reportbug-ng-xserver-xorg-video-nouveau-idV6Hs.txt
to the mail. I'd do it myself if the output wasn't too long to handle.

  Thank you!
->8--->8--->8--->8--->8--->8--->8--->8--->8--
diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index f7dc2bc..8eafcf0 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1095,7 +1095,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x,
 				NVCopyNV12ColorPlanes(buf + s2offset,
 						      buf + s3offset, dst,
 						      line_len, srcPitch2,
-						      nlines, line_len);
+						      nlines, npixels);
 			}
 		} else {
 			for (i = 0; i < nlines; i++) {
@@ -1161,7 +1161,7 @@ CPU_copy:
 				NVCopyNV12ColorPlanes(buf + s2offset,
 						      buf + s3offset,
 						      map, dstPitch, srcPitch2,
-						      nlines, line_len);
+						      nlines, npixels);
 			}
 		} else {
 			/* YUY2 and RGB */
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c
index b06fe0c..18e6a2f 100644
--- a/src/nv_accel_common.c
+++ b/src/nv_accel_common.c
@@ -649,8 +649,10 @@ NVAccelCommonInit(ScrnInfoPtr pScrn)
 	else
 	if (pNv->Architecture < NV_ARCH_E0)
 		INIT_CONTEXT_OBJECT(M2MF_NVC0);
-	else
+	else {
 		INIT_CONTEXT_OBJECT(P2MF_NVE0);
+		INIT_CONTEXT_OBJECT(COPY_NVE0);
+	}
 
 	/* 3D init */
 	switch (pNv->Architecture) {
@@ -702,6 +704,7 @@ void NVAccelFree(ScrnInfoPtr pScrn)
 	nouveau_object_del(&pNv->NvMemFormat);
 	nouveau_object_del(&pNv->NvSW);
 	nouveau_object_del(&pNv->Nv3D);
+	nouveau_object_del(&pNv->NvCOPY);
 
 	nouveau_bo_ref(NULL, &pNv->scratch);
 }
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 2b74fc6..8a112db 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -60,7 +60,7 @@ static Bool	NVUnmapMem(ScrnInfoPtr pScrn);
 
 #define NOUVEAU_PCI_DEVICE(_vendor_id, _device_id)                             \
 	{ (_vendor_id), (_device_id), PCI_MATCH_ANY, PCI_MATCH_ANY,            \
-	  0x00030000, 0x00ffffff, 0 }
+	  0x00030000, 0x00ff0000, 0 }
 
 static const struct pci_id_match nouveau_device_match[] = {
 	NOUVEAU_PCI_DEVICE(0x12d2, PCI_MATCH_ANY),
@@ -80,6 +80,13 @@ static Bool NVPlatformProbe(DriverPtr driver,
 				intptr_t dev_match_data);
 #endif
 
+_X_EXPORT int NVEntityIndex = -1;
+
+static int getNVEntityIndex(void)
+{
+	return NVEntityIndex;
+}
+
 /*
  * This contains the functions needed by the server after loading the
  * driver module.  It must be supplied, and gets added the driver list by
@@ -228,6 +235,8 @@ NVDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
 static void
 NVInitScrn(ScrnInfoPtr pScrn, int entity_num)
 {
+	DevUnion *pPriv;
+
 	pScrn->driverVersion    = NV_VERSION;
 	pScrn->driverName       = NV_DRIVER_NAME;
 	pScrn->name             = NV_NAME;
@@ -242,6 +251,15 @@ NVInitScrn(ScrnInfoPtr pScrn, int entity_num)
 	pScrn->FreeScreen       = NVFreeScreen;
 
 	xf86SetEntitySharable(entity_num);
+	if (NVEntityIndex == -1)
+	    NVEntityIndex = xf86AllocateEntityPrivateIndex();
+
+	pPriv = xf86GetEntityPrivate(entity_num,
+				     NVEntityIndex);
+	if (!pPriv->ptr) {
+		pPriv->ptr = xnfcalloc(sizeof(NVEntRec), 1);
+	}
+
 	xf86SetEntityInstanceForScreen(pScrn, entity_num,
 					xf86GetNumEntityInstances(entity_num) - 1);
 }
@@ -303,6 +321,7 @@ NVHasKMS(struct pci_device *pci_dev)
 	case 0xc0:
 	case 0xd0:
 	case 0xe0:
+	case 0xf0:
 		break;
 	default:
 		xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
@@ -682,15 +701,37 @@ nouveau_setup_capabilities(ScrnInfoPtr pScrn)
 #endif
 }
 
+NVEntPtr NVEntPriv(ScrnInfoPtr pScrn)
+{
+	DevUnion     *pPriv;
+	NVPtr  pNv   = NVPTR(pScrn);
+	pPriv = xf86GetEntityPrivate(pNv->pEnt->index,
+				     getNVEntityIndex());
+	return pPriv->ptr;
+}
+
 static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn)
 {
 	NVPtr pNv = NVPTR(pScrn);
+	NVEntPtr pNVEnt = NVEntPriv(pScrn);
 	struct pci_device *dev = pNv->PciInfo;
 	char *busid;
 	drmSetVersion sv;
 	int err;
 	int ret;
 
+	if (pNVEnt->fd) {
+		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			   " reusing fd for second head\n");
+		ret = nouveau_device_wrap(pNVEnt->fd, 0, &pNv->dev);
+		if (ret) {
+			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+				"[drm] error creating device\n");
+			return FALSE;
+		}
+		return TRUE;
+	}
+
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
 	XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
 		    dev->domain, dev->bus, dev->dev, dev->func);
@@ -720,6 +761,7 @@ static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn)
 		nouveau_device_del(&pNv->dev);
 		return FALSE;
 	}
+	pNVEnt->fd = pNv->dev->fd;
 	return TRUE;
 }
 
@@ -854,6 +896,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 		pNv->Architecture = NV_ARCH_C0;
 		break;
 	case 0xe0:
+	case 0xf0:
 		pNv->Architecture = NV_ARCH_E0;
 		break;
 	default:
diff --git a/src/nv_proto.h b/src/nv_proto.h
index bcf927d..a573269 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -153,6 +153,7 @@ void NVC0SyncToVBlank(PixmapPtr ppix, BoxPtr box);
 Bool NVAccelInitM2MF_NVC0(ScrnInfoPtr pScrn);
 Bool NVAccelInitCopy_NVC0(ScrnInfoPtr pScrn);
 Bool NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn);
+Bool NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn);
 Bool NVAccelInit2D_NVC0(ScrnInfoPtr pScrn);
 Bool NVAccelInit3D_NVC0(ScrnInfoPtr pScrn);
 
diff --git a/src/nv_type.h b/src/nv_type.h
index ed21c6d..9c403b5 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -31,6 +31,11 @@
 
 /* NV50 */
 typedef struct _NVRec *NVPtr;
+
+typedef struct {
+	int fd;
+} NVEntRec, *NVEntPtr;
+
 typedef struct _NVRec {
     uint32_t              Architecture;
     EntityInfoPtr       pEnt;
@@ -103,6 +108,7 @@ typedef struct _NVRec {
 	struct nouveau_object *Nv2D;
 	struct nouveau_object *Nv3D;
 	struct nouveau_object *NvSW;
+	struct nouveau_object *NvCOPY;
 	struct nouveau_bo *scratch;
 
 	Bool ce_enabled;
diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index 406bc59..4b3745f 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -121,8 +121,23 @@ NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn)
 
 	BEGIN_NVC0(push, NV01_SUBC(P2MF, OBJECT), 1);
 	PUSH_DATA (push, pNv->NvMemFormat->handle);
+	return TRUE;
+}
+
+Bool
+NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn)
+{
+	NVPtr pNv = NVPTR(pScrn);
+	struct nouveau_pushbuf *push = pNv->pushbuf;
+	int ret;
+
+	ret = nouveau_object_new(pNv->channel, 0x0000a0b5, 0xa0b5,
+				 NULL, 0, &pNv->NvCOPY);
+	if (ret)
+		return FALSE;
+
 	BEGIN_NVC0(push, NV01_SUBC(COPY, OBJECT), 1);
-	PUSH_DATA (push, 0x0000a0b5);
+	PUSH_DATA (push, pNv->NvCOPY->handle);
 	return TRUE;
 }
 

--- End Message ---
--- Begin Message ---
Source: xserver-xorg-video-nouveau
Source-Version: 1:1.0.7-2

We believe that the bug you reported is fixed in the latest version of
xserver-xorg-video-nouveau, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 708310@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sven Joachim <svenjoac@gmx.de> (supplier of updated xserver-xorg-video-nouveau package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 08 Jun 2013 13:35:49 +0200
Source: xserver-xorg-video-nouveau
Binary: xserver-xorg-video-nouveau xserver-xorg-video-nouveau-dbg
Architecture: source i386
Version: 1:1.0.7-2
Distribution: unstable
Urgency: low
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Sven Joachim <svenjoac@gmx.de>
Description: 
 xserver-xorg-video-nouveau - X.Org X server -- Nouveau display driver
 xserver-xorg-video-nouveau-dbg - X.Org X server -- Nouveau display driver (debug symbols)
Closes: 708310
Changes: 
 xserver-xorg-video-nouveau (1:1.0.7-2) unstable; urgency=low
 .
   * Merge upstream master branch up to commit bf72ae1f65.
     - Fix zaphod setups (Closes: #708310).
   * Switch Vcs-* fields to anonscm.debian.org.
   * Bump Standards-Version to 3.9.4, no changes needed.
   * Upload to unstable.
Checksums-Sha1: 
 9a9fb70b1bce51c0b9009f37bfb1321d74266f79 2517 xserver-xorg-video-nouveau_1.0.7-2.dsc
 21b5d0de63b59a2df7dab1e825e5657a9230bcd1 42960 xserver-xorg-video-nouveau_1.0.7-2.diff.gz
 00519484a914d07152ac31a33d17a302d1a4ec4f 307702 xserver-xorg-video-nouveau_1.0.7-2_i386.deb
 4166c2e3420c7ba806e3bfe32eb0963cd893d223 867902 xserver-xorg-video-nouveau-dbg_1.0.7-2_i386.deb
Checksums-Sha256: 
 c46b851123ab5f72914117e71601b6b171387f2b7c8083d82254f6491ceb44f3 2517 xserver-xorg-video-nouveau_1.0.7-2.dsc
 6f40535ccfca6bba8217d491909c943b96d45dfc39b67032bca3beba67c503f1 42960 xserver-xorg-video-nouveau_1.0.7-2.diff.gz
 7613d92fc810cfdf8b9a1606ec3583aad920660e88ac7f059eda43b5974277a6 307702 xserver-xorg-video-nouveau_1.0.7-2_i386.deb
 4d5dc444a6873be2037b6e1b96cf6f5950a61ffb772485272ea85cc9d732e485 867902 xserver-xorg-video-nouveau-dbg_1.0.7-2_i386.deb
Files: 
 967b2dadd0f195c5e7db8b921d61ceef 2517 x11 optional xserver-xorg-video-nouveau_1.0.7-2.dsc
 ee8f6a1edc1156bdf49832c3547f7385 42960 x11 optional xserver-xorg-video-nouveau_1.0.7-2.diff.gz
 185560c1554a14dc5c8ab62a8d068f19 307702 x11 optional xserver-xorg-video-nouveau_1.0.7-2_i386.deb
 e88ee8f12bbcfb95c95c03ed59bd1a12 867902 debug extra xserver-xorg-video-nouveau-dbg_1.0.7-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJRsxfFAAoJEDsQbnGNazGs3uoP/05lRTOujinCyV5wVJ47kPWl
BAv5lbWaBl+vH/5+vJPKE46kE4G4q832herJnoMXxnpweYoGwptySpo+6EOjnqR6
Y77Eoy742e6Osvc0CNbl42lsuWzH+fAVFt6rDBkLaeZY+Tv0HaOfNE88sAyBkzZi
b7NjdyeWxY1ZlbZDdusMr3lKY4DhJU41HWeiz0vqdkCpW4QBCmyQALi8n3l40sN2
2LMZ5Esq0CAhFufT6SIFqk2oaxVntAIDurZrnLPdfczNXocz1HPjjqh8oMY9oBDi
AEr0VJRaLL52tV2JFvWtU/lDdB9xHtWHdrXdeeRb09lwZoR9uGoPhepnL1T9GuZf
EWU7jPcQfTua/+pkd+hvwsGkoj0LbaMbsYmr7P5ye3Hojyc0ceQxUOobQPxQZA/j
Sh4JAMIkQ7pSjmReOEKv2dknQYwi3mOjfWB5mFEsvrnPrIe1LpgwyEjdKm7gfxL1
hpRZFzax2is6daPxk0vch4uhRdgYDWKPs0osFDZ37FnPO/04Yz16xNLHN++pSWRZ
OLesDdE58G+G0KzllBwi2Vb8tlqAvayU2x5l1bBb5qv7VcDLkrCsvf0xhbBoC6MQ
uO8xNo1HhgIoltlLKl00t8E9Otgi0H6DbrUOflFTtI2LXexhFusnPUC2YC4qQ4J9
uNNf1XnKpgZq1Ubl3tU+
=EvKb
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: