xserver-xorg-video-nouveau: Changes to 'debian-experimental'
ChangeLog | 261 +++++++++++++++++++++++++++++++++++++++++++
configure.ac | 2
debian/README.Debian | 21 ---
debian/changelog | 25 +++-
debian/control | 8 -
man/nouveau.man | 18 +++
src/drmmode_display.c | 265 +++++++++++++++++++++++++++++++++-----------
src/nouveau_class.h | 2
src/nouveau_dri2.c | 298 +++++++++++++++++++++++++++++++++++++++++++++++++-
src/nouveau_exa.c | 52 +-------
src/nouveau_local.h | 11 +
src/nouveau_wfb.c | 2
src/nouveau_xv.c | 17 --
src/nv04_exa.c | 35 +++++
src/nv04_xv_blit.c | 11 -
src/nv30_xv_tex.c | 19 ---
src/nv40_xv_tex.c | 19 ---
src/nv50_accel.c | 33 +++++
src/nv50_xv.c | 32 -----
src/nv_accel_common.c | 95 +++++++++++++++
src/nv_const.h | 8 +
src/nv_dma.c | 3
src/nv_driver.c | 107 +++++++++++------
src/nv_include.h | 2
src/nv_proto.h | 14 +-
src/nv_type.h | 8 +
26 files changed, 1099 insertions(+), 269 deletions(-)
New commits:
commit fbeaa711a33284c358acf5c80efa7bb842991c59
Author: Sven Joachim <svenjoac@gmx.de>
Date: Tue Dec 14 16:29:14 2010 +0100
Un-record closure of bug #596217
The bug is already archived, since it had been closed in version
1:0.0.15+git20100329+7858345-5.
diff --git a/debian/changelog b/debian/changelog
index 4b07bb4..d3b6fde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,14 +1,11 @@
xserver-xorg-video-nouveau (1:0.0.16+git20101210+8bb8231-1) UNRELEASED; urgency=low
- [ Cyril Brulebois ]
- * Fix Vcs-Browser URL, thanks to Petr Vorel (Closes: #596217).
-
[ Sven Joachim ]
* New upstream snapshot.
- X server 1.8 or higher is now required.
- Bump build-dependency on libdrm-dev to (>= 2.4.23) due to
libdrm-nouveau API changes.
-
+
-- Cyril Brulebois <kibi@debian.org> Sat, 02 Oct 2010 12:08:02 +0200
xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) experimental; urgency=low
commit 081bfbe1edaa2f24754dfedfb98a5c7160c5cc5f
Author: Sven Joachim <svenjoac@gmx.de>
Date: Tue Dec 14 15:41:06 2010 +0100
Require libdrm-dev 2.4.23 for building
Sonce commit 4f42708c26fa57bac7854701a6e757958c8d0654 we need the
newest libdrm API.
diff --git a/debian/changelog b/debian/changelog
index e762510..da734f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ xserver-xorg-video-nouveau (1:0.0.16+git20101210+8bb8231-1) UNRELEASED; urgency=
[ Sven Joachim ]
* New upstream snapshot.
- X server 1.8 or higher is now required.
+ - Bump build-dependency on libdrm-dev to (>= 2.4.23) due to
+ libdrm-nouveau API changes.
-- Cyril Brulebois <kibi@debian.org> Sat, 02 Oct 2010 12:08:02 +0200
diff --git a/debian/control b/debian/control
index 1476ded..58f233e 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends:
x11proto-randr-dev (>= 1.2),
x11proto-render-dev,
x11proto-xext-dev,
- libdrm-dev (>= 2.4.21-2~),
+ libdrm-dev (>= 2.4.23),
x11proto-xf86dri-dev,
x11proto-gl-dev,
mesa-common-dev,
commit b05a3ab7dccc898c17385759c32f9aacaddb5270
Author: Sven Joachim <svenjoac@gmx.de>
Date: Tue Dec 14 15:37:46 2010 +0100
Bump xserver-xorg-dev build dependency
As per commit a4d580bf05d7aac1d486e5d1ba9a2201c026e5f5, xserver 1.8 or
newer is now required.
diff --git a/debian/changelog b/debian/changelog
index 2f032cb..e762510 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ xserver-xorg-video-nouveau (1:0.0.16+git20101210+8bb8231-1) UNRELEASED; urgency=
[ Sven Joachim ]
* New upstream snapshot.
+ - X server 1.8 or higher is now required.
-- Cyril Brulebois <kibi@debian.org> Sat, 02 Oct 2010 12:08:02 +0200
diff --git a/debian/control b/debian/control
index 77427f3..1476ded 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders: Chris Lamb <lamby@debian.org>, Matthew Johnson <mjj29@debian.org>,
Build-Depends:
debhelper (>= 7),
pkg-config,
- xserver-xorg-dev (>= 2:1.7.6.901),
+ xserver-xorg-dev (>= 2:1.8),
x11proto-video-dev,
x11proto-core-dev,
x11proto-fonts-dev,
commit a37cddf28f5898db5f6b2ae6d9a6314340fd29ae
Author: Sven Joachim <svenjoac@gmx.de>
Date: Tue Dec 14 15:35:33 2010 +0100
New upstream snapshot
diff --git a/ChangeLog b/ChangeLog
index acb23dc..236cfda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,264 @@
+commit 8bb8231236a6b877895663aeaa9cef731d67fe68
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Tue Nov 30 15:27:36 2010 +1000
+
+ dri2: fix certain clients blocking forever when sync-to-vblank unavailable
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit f29afe65b67c9b89ceba421d9b3aee590f7ded20
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Nov 29 09:23:35 2010 +1000
+
+ dri2: don't return failure from get_msc if sync-to-vblank isn't available
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 4b1d26578116f4d1745dd92a7c99413972a2bedf
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Nov 25 21:33:46 2010 +0100
+
+ dri2: Don't return failure from schedule_wait if sync-to-vblank is unavailable.
+
+ Reported-by: Ben Skeggs <bskeggs@redhat.com>
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 1143e7a97dce1b741376e178b73b8b766e03849a
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date: Tue Oct 26 16:05:32 2010 -0700
+
+ Purge cvs tags.
+
+ Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 22020457f43eceaf26532ecb50e46d743f4a691f
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Tue Oct 26 00:24:06 2010 +0200
+
+ dri2: Fix throttling on occluded drawables.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 9737a812aacbc544b93eeaa031cf1c2e8adbd661
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Oct 25 10:37:08 2010 +1000
+
+ kms: initial pass at supporting zaphod-mode
+
+ This works ok from some simple testing, there's undoubtedly things that
+ will need polishing still however.
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit d40c16f5497739c0215f37566db1651a74cb20ba
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Sat Oct 23 02:20:30 2010 +0200
+
+ dri2: Fix build on X server 1.8.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit a4d580bf05d7aac1d486e5d1ba9a2201c026e5f5
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Fri Oct 22 23:09:30 2010 +0200
+
+ Bump the required X server version to 1.8.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit d0f2e16bc35660d01d3cd20a770cf8e613ab5323
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Fri Oct 22 23:06:28 2010 +0200
+
+ dri2: Report damage on page-flipped drawables.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit c61e8d03161adcfbba4162172153814accf9e86b
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Fri Oct 22 23:05:24 2010 +0200
+
+ Make the sync-to-vblank helpers take a box as argument.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit a685a5c3be12f3e95a6ec1140af115e7ef28fcaa
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Wed Oct 13 18:45:04 2010 +0200
+
+ dri2: Implement the ScheduleWaitMSC/GetMSC hooks.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit eb83c830c87bce345748edef3b50660246143db7
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 21 22:57:08 2010 +0200
+
+ dri2: Add pageflip/exchange support.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit c88f13e25b0040c1dd0f93e0ac40f62a6005ce59
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 14 22:25:50 2010 +0200
+
+ Allocate a tiled scanout on pre-nv50 too.
+
+ Pageflip between tiled and non-tiled surfaces isn't such a good idea.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 4642d71bdffc04ce0dd458225541940c65f5443d
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 14 22:17:58 2010 +0200
+
+ dri2: Give out buffers ready for scanout.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 75daada678d03d2e162f8003a6f2edcbe0525f92
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 14 22:32:54 2010 +0200
+
+ Restructure tiled pixmap allocation in a single place.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 70f0d2c886ceaa965ca4864788f4dd8e8f757a92
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 21 22:55:02 2010 +0200
+
+ dri2: Add sync-to-vblank support.
+
+ Note that you need a recent enough kernel for it to work. Use the
+ "GLXVBlank" option to enable it (it defaults to disabled for now).
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 72dd4899ff036b09e3680ed2e09b3dbae3a7ba71
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 21 22:31:45 2010 +0200
+
+ nv04-nv40/exa: Make the copy hook blit downwards for non-overlapping regions.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 21ed642d3f76f286f23cd64ca817038ec94a1bf6
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Wed Oct 13 18:22:22 2010 +0200
+
+ Make the sync-to-vblank helpers more consistent.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 258e483d47f0f63155be18981c1118261f7675a8
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Thu Oct 21 22:41:24 2010 +0200
+
+ kms: Register a wakeup handler to poll vblank/pageflip/udev events.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 4f42708c26fa57bac7854701a6e757958c8d0654
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Sun Oct 10 04:39:27 2010 +0200
+
+ Update to the last libdrm API.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 8c8f15c9d3a31c35bf2ef20faf8c4133295a678f
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Sun Oct 10 04:36:17 2010 +0200
+
+ nv10-nv40/exa: Fix tiled pixmap pitch alignment calculation.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit a47c274f329b3b8bfbdcf155d6d832599d823dc8
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Sun Oct 10 04:43:25 2010 +0200
+
+ Fix for the last xserver ABI.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit 9a5142fae6e1a0a470352f511427916e6fa01b9c
+Author: Maarten Maathuis <madman2003@gmail.com>
+Date: Fri Aug 27 21:11:59 2010 +0200
+
+ nv50/exa: Stop using wfb by default, but add an option to enable it.
+
+ - Some scenarios, such as those heavy in core font rendering might prefer wfb.
+ - Other (modern) situations are better of with wfb disabled.
+
+ Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
+
+commit d5a6f103113985c50bbe749ed341de34af1b47a5
+Author: Francisco Jerez <currojerez@riseup.net>
+Date: Tue Sep 28 21:49:48 2010 +0200
+
+ dri2: Throttle frontbuffer flushes.
+
+ There was no need for throttling until the hardware interchannel sync
+ kernel changes because the pushbuf IOCTL blocked to sync the GL and X
+ channels anyway.
+
+ Signed-off-by: Francisco Jerez <currojerez@riseup.net>
+
+commit f1ac413d1d3dec2ccf63d4a8c79b9bd9ea578dcf
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Mon Sep 20 08:05:00 2010 +1000
+
+ nv50: use 0x8697 on NVAF
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 14c93acfc3fde04415e1c6a2a056465d15c86315
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Fri Sep 17 13:17:37 2010 +1000
+
+ noaccel: fix rotation, as well as an assert during server shutdown
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 065576d5df0df4da61050d789f548801656b62d5
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Thu Aug 26 13:22:33 2010 +1000
+
+ dri2: remove explit flush from copy_region()
+
+ Unnecessary now that we kickoff from within the flush callback chain.
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
+commit 34025f0dc9284873d4bf7e4f547ed69fc562a3c9
+Author: Ben Skeggs <bskeggs@redhat.com>
+Date: Thu Aug 26 13:19:39 2010 +1000
+
+ kickoff from the flush callback chain
+
+ This is a port of intel commit: 69d65f9184006eac790efcff78a0e425160e95aa
+
+ Submit batch buffers from flush callback chain
+
+ There are a few cases where the server will flush client output buffers
+ but our block handler only catches the most common (before going into select
+ If the server flushes client buffers before we submit our batch buffer,
+ the client may receive a damage event for rendering that hasn't happened yet
+
+ Instead, we can hook into the flush callback chain, which the server will
+ invoke just before flushing output. This lets us submit batch buffers
+ before sending out events, preserving ordering.
+
+ Fixes 28438: [bisected] incorrect character in gnome-terminal under compiz
+ https://bugs.freedesktop.org/show_bug.cgi?id=28438
+
+ Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
+
+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+
commit 390f1c86d9583f4ceabd407ee47410073c2a1b55
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Fri Aug 20 09:48:32 2010 +1000
diff --git a/debian/changelog b/debian/changelog
index dfb062b..2f032cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
-xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-2) UNRELEASED; urgency=low
+xserver-xorg-video-nouveau (1:0.0.16+git20101210+8bb8231-1) UNRELEASED; urgency=low
+ [ Cyril Brulebois ]
* Fix Vcs-Browser URL, thanks to Petr Vorel (Closes: #596217).
+ [ Sven Joachim ]
+ * New upstream snapshot.
+
-- Cyril Brulebois <kibi@debian.org> Sat, 02 Oct 2010 12:08:02 +0200
xserver-xorg-video-nouveau (1:0.0.16+git20100825+390f1c8-1) experimental; urgency=low
commit 8bb8231236a6b877895663aeaa9cef731d67fe68
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Tue Nov 30 15:27:36 2010 +1000
dri2: fix certain clients blocking forever when sync-to-vblank unavailable
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 969c6f3..2dd6da4 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -322,8 +322,10 @@ nouveau_dri2_schedule_wait(ClientPtr client, DrawablePtr draw,
CARD64 current_msc;
int ret;
- if (!can_sync_to_vblank(draw))
+ if (!can_sync_to_vblank(draw)) {
+ DRI2WaitMSCComplete(client, draw, target_msc, 0, 0);
return TRUE;
+ }
/* Initialize a vblank structure */
s = malloc(sizeof(*s));
commit f29afe65b67c9b89ceba421d9b3aee590f7ded20
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Nov 29 09:23:35 2010 +1000
dri2: don't return failure from get_msc if sync-to-vblank isn't available
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 48e134e..969c6f3 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -363,8 +363,11 @@ nouveau_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
{
int ret;
- if (!can_sync_to_vblank(draw))
- return FALSE;
+ if (!can_sync_to_vblank(draw)) {
+ *ust = 0;
+ *msc = 0;
+ return TRUE;
+ }
/* Get current sequence */
ret = nouveau_wait_vblank(draw, DRM_VBLANK_RELATIVE, 0, msc, ust, NULL);
commit 4b1d26578116f4d1745dd92a7c99413972a2bedf
Author: Francisco Jerez <currojerez@riseup.net>
Date: Thu Nov 25 21:33:46 2010 +0100
dri2: Don't return failure from schedule_wait if sync-to-vblank is unavailable.
Reported-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 204ab32..48e134e 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -323,7 +323,7 @@ nouveau_dri2_schedule_wait(ClientPtr client, DrawablePtr draw,
int ret;
if (!can_sync_to_vblank(draw))
- return FALSE;
+ return TRUE;
/* Initialize a vblank structure */
s = malloc(sizeof(*s));
commit 1143e7a97dce1b741376e178b73b8b766e03849a
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date: Tue Oct 26 16:05:32 2010 -0700
Purge cvs tags.
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nv_const.h b/src/nv_const.h
index f80d125..01ffc2c 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.6 2001/12/07 00:09:55 mvojkovi Exp $ */
-
#ifndef __NV_CONST_H__
#define __NV_CONST_H__
diff --git a/src/nv_include.h b/src/nv_include.h
index ce89596..48f0b21 100644
--- a/src/nv_include.h
+++ b/src/nv_include.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.9 2000/10/06 12:31:03 eich Exp $ */
-
#ifndef __NV_INCLUDE_H__
#define __NV_INCLUDE_H__
commit 22020457f43eceaf26532ecb50e46d743f4a691f
Author: Francisco Jerez <currojerez@riseup.net>
Date: Tue Oct 26 00:24:06 2010 +0200
dri2: Fix throttling on occluded drawables.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 65e7340..204ab32 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -239,6 +239,13 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
DamageRegionProcessPending(draw);
} else {
type = DRI2_BLIT_COMPLETE;
+
+ /* Reference the front buffer to let throttling work
+ * on occluded drawables. */
+ WAIT_RING(chan, 1);
+ OUT_RELOC(chan, dst_bo, 0,
+ NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0);
+
REGION_TRANSLATE(0, ®, -draw->x, -draw->y);
nouveau_dri2_copy_region(draw, ®, s->dst, s->src);
}
commit 9737a812aacbc544b93eeaa031cf1c2e8adbd661
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Oct 25 10:37:08 2010 +1000
kms: initial pass at supporting zaphod-mode
This works ok from some simple testing, there's undoubtedly things that
will need polishing still however.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
diff --git a/man/nouveau.man b/man/nouveau.man
index a8961ad..39de690 100644
--- a/man/nouveau.man
+++ b/man/nouveau.man
@@ -80,6 +80,16 @@ Enable or disable wfb, only affects nv50+. Useful for some legacy configurations
Synchronize GLX clients to VBlank. Useful where tearing is a problem,
harmful if the GPU isn't fast enough to keep up with the monitor
refresh rate. Default: off.
+.TP
+.BI "Option \*qZaphodHeads\*q \*q" string \*q
+Specify the randr output(s) to use with zaphod mode for a particular driver
+instance. If you use this option you most use this option for all instances
+of the driver.
+.br
+For example:
+.B
+Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q
+will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.SH AUTHORS
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 94b19ea..c5b57eb 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -945,13 +945,48 @@ const char *output_names[] = { "None",
};
#define NUM_OUTPUT_NAMES (sizeof(output_names) / sizeof(output_names[0]))
+static Bool
+drmmode_zaphod_match(ScrnInfoPtr pScrn, const char *s, char *output_name)
+{
+ int i = 0;
+ char s1[20];
+
+ do {
+ switch(*s) {
+ case ',':
+ s1[i] = '\0';
+ i = 0;
+ if (strcmp(s1, output_name) == 0)
+ return TRUE;
+ break;
+ case ' ':
+ case '\t':
+ case '\n':
+ case '\r':
+ break;
+ default:
+ s1[i] = *s;
+ i++;
+ break;
+ }
+ } while(*s++);
+
+ s1[i] = '\0';
+ if (strcmp(s1, output_name) == 0)
+ return TRUE;
+
+ return FALSE;
+}
+
static void
drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
{
+ NVPtr pNv = NVPTR(pScrn);
xf86OutputPtr output;
drmModeConnectorPtr koutput;
drmModeEncoderPtr kencoder;
drmmode_output_private_ptr drmmode_output;
+ const char *s;
char name[32];
koutput = drmModeGetConnector(drmmode->fd,
@@ -973,6 +1008,28 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
output_names[koutput->connector_type],
koutput->connector_type_id);
+ if (xf86IsEntityShared(pScrn->entityList[0])) {
+ s = xf86GetOptValString(pNv->Options, OPTION_ZAPHOD_HEADS);
+ if (s) {
+ if (!drmmode_zaphod_match(pScrn, s, name)) {
+ drmModeFreeEncoder(kencoder);
+ drmModeFreeConnector(koutput);
+ return;
+ }
+ } else {
+ if (pNv->Primary && (num != 0)) {
+ drmModeFreeEncoder(kencoder);
+ drmModeFreeConnector(koutput);
+ return;
+ } else
+ if (pNv->Secondary && (num != 1)) {
+ drmModeFreeEncoder(kencoder);
+ drmModeFreeConnector(koutput);
+ return;
+ }
+ }
+ }
+
output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name);
if (!output) {
drmModeFreeEncoder(kencoder);
@@ -1003,8 +1060,6 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
output->interlaceAllowed = true;
output->doubleScanAllowed = true;
-
- return;
}
static Bool
@@ -1121,8 +1176,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width,
drmmode->mode_res->max_height);
- for (i = 0; i < drmmode->mode_res->count_crtcs; i++)
- drmmode_crtc_init(pScrn, drmmode, i);
+ for (i = 0; i < drmmode->mode_res->count_crtcs; i++) {
+ if (!xf86IsEntityShared(pScrn->entityList[0] ||
+ pScrn->confScreen->device->screen == i))
+ drmmode_crtc_init(pScrn, drmmode, i);
+ }
for (i = 0; i < drmmode->mode_res->count_connectors; i++)
drmmode_output_init(pScrn, drmmode, i);
diff --git a/src/nv_const.h b/src/nv_const.h
index c355cad..f80d125 100644
--- a/src/nv_const.h
+++ b/src/nv_const.h
@@ -15,6 +15,7 @@ typedef enum {
OPTION_VIDEO_KEY,
OPTION_WFB,
OPTION_GLX_VBLANK,
+ OPTION_ZAPHOD_HEADS,
} NVOpts;
@@ -26,6 +27,7 @@ static const OptionInfoRec NVOptions[] = {
{ OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE },
{ OPTION_WFB, "WrappedFB", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_GLX_VBLANK, "GLXVBlank", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
diff --git a/src/nv_driver.c b/src/nv_driver.c
index fad7d6a..f351fac 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -205,6 +205,7 @@ NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev,
{ -1, -1, NULL }
};
struct nouveau_device *dev = NULL;
+ EntityInfoPtr pEnt = NULL;
ScrnInfoPtr pScrn = NULL;
drmVersion *version;
int chipset, ret;
@@ -280,6 +281,12 @@ NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev,
pScrn->LeaveVT = NVLeaveVT;
pScrn->FreeScreen = NVFreeScreen;
+ xf86SetEntitySharable(entity_num);
+
+ pEnt = xf86GetEntityInfo(entity_num);
+ xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1);
+ free(pEnt);
+
return TRUE;
}
@@ -628,10 +635,18 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
pNv->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
if (pNv->pEnt->location.type != BUS_PCI)
return FALSE;
-
+
+ if (xf86IsEntityShared(pScrn->entityList[0])) {
+ if(!xf86IsPrimInitDone(pScrn->entityList[0])) {
+ pNv->Primary = TRUE;
+ xf86SetPrimInitDone(pScrn->entityList[0]);
+ } else {
+ pNv->Secondary = TRUE;
+ }
+ }
+
/* Find the PCI info for this screen */
pNv->PciInfo = xf86GetPciInfoForEntity(pNv->pEnt->index);
- pNv->Primary = xf86IsPrimaryPci(pNv->PciInfo);
/* Initialise the kernel module */
if (!NVPreInitDRM(pScrn))
diff --git a/src/nv_type.h b/src/nv_type.h
index 94c385a..4204556 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -33,6 +33,7 @@ typedef struct _NVRec {
EntityInfoPtr pEnt;
struct pci_device *PciInfo;
Bool Primary;
+ Bool Secondary;
/* Various pinned memory regions */
struct nouveau_bo * scanout;
commit d40c16f5497739c0215f37566db1651a74cb20ba
Author: Francisco Jerez <currojerez@riseup.net>
Date: Sat Oct 23 02:20:30 2010 +0200
dri2: Fix build on X server 1.8.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 35146f2..65e7340 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -201,8 +201,8 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
RegionRec reg;
int type, ret;
- RegionInit(®, &(BoxRec){ 0, 0, draw->width, draw->height }, 0);
- RegionTranslate(®, draw->x, draw->y);
+ REGION_INIT(0, ®, (&(BoxRec){ 0, 0, draw->width, draw->height }), 0);
+ REGION_TRANSLATE(0, ®, draw->x, draw->y);
/* Throttle on the previous frame before swapping */
nouveau_bo_map(dst_bo, NOUVEAU_BO_RD);
@@ -215,16 +215,16 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0);
if (pNv->Architecture >= NV_ARCH_50)
- NV50SyncToVBlank(dst_pix, RegionExtents(®));
+ NV50SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®));
else
- NV11SyncToVBlank(dst_pix, RegionExtents(®));
+ NV11SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®));
FIRE_RING(chan);
}
if (can_exchange(draw, dst_pix, src_pix)) {
type = DRI2_EXCHANGE_COMPLETE;
- DamageRegionAppend (draw, ®);
+ DamageRegionAppend(draw, ®);
if (DRI2CanFlip(draw)) {
type = DRI2_FLIP_COMPLETE;
@@ -239,7 +239,7 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
DamageRegionProcessPending(draw);
} else {
type = DRI2_BLIT_COMPLETE;
- RegionTranslate(®, -draw->x, -draw->y);
+ REGION_TRANSLATE(0, ®, -draw->x, -draw->y);
nouveau_dri2_copy_region(draw, ®, s->dst, s->src);
}
commit a4d580bf05d7aac1d486e5d1ba9a2201c026e5f5
Author: Francisco Jerez <currojerez@riseup.net>
Date: Fri Oct 22 23:09:30 2010 +0200
Bump the required X server version to 1.8.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/configure.ac b/configure.ac
index 1c39923..676c2a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ PKG_CHECK_MODULES(LIBDRM_NOUVEAU, libdrm_nouveau)
AC_SUBST(LIBDRM_NOUVEAU_CFLAGS)
AC_SUBST(LIBDRM_NOUVEAU_LIBS)
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto fontsproto libdrm xf86driproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto libdrm xf86driproto $REQUIRED_MODULES)
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
commit d0f2e16bc35660d01d3cd20a770cf8e613ab5323
Author: Francisco Jerez <currojerez@riseup.net>
Date: Fri Oct 22 23:06:28 2010 +0200
dri2: Report damage on page-flipped drawables.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index b006cfc..35146f2 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -224,6 +224,7 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
if (can_exchange(draw, dst_pix, src_pix)) {
type = DRI2_EXCHANGE_COMPLETE;
+ DamageRegionAppend (draw, ®);
if (DRI2CanFlip(draw)) {
type = DRI2_FLIP_COMPLETE;
@@ -235,6 +236,7 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
SWAP(s->dst->name, s->src->name);
SWAP(nouveau_pixmap(dst_pix)->bo, nouveau_pixmap(src_pix)->bo);
+ DamageRegionProcessPending(draw);
} else {
type = DRI2_BLIT_COMPLETE;
RegionTranslate(®, -draw->x, -draw->y);
commit c61e8d03161adcfbba4162172153814accf9e86b
Author: Francisco Jerez <currojerez@riseup.net>
Date: Fri Oct 22 23:05:24 2010 +0200
Make the sync-to-vblank helpers take a box as argument.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index c8d5c57..b006cfc 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -198,26 +198,26 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
struct nouveau_bo *dst_bo = nouveau_pixmap_bo(dst_pix);
struct nouveau_bo *src_bo = nouveau_pixmap_bo(src_pix);
struct nouveau_channel *chan = pNv->chan;
+ RegionRec reg;
int type, ret;
+ RegionInit(®, &(BoxRec){ 0, 0, draw->width, draw->height }, 0);
+ RegionTranslate(®, draw->x, draw->y);
+
/* Throttle on the previous frame before swapping */
nouveau_bo_map(dst_bo, NOUVEAU_BO_RD);
nouveau_bo_unmap(dst_bo);
if (can_sync_to_vblank(draw)) {
- int x1 = draw->x, y1 = draw->y,
- x2 = draw->x + draw->width,
- y2 = draw->y + draw->height;
-
/* Reference the back buffer to sync it to vblank */
WAIT_RING(chan, 1);
OUT_RELOC(chan, src_bo, 0,
NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0);
if (pNv->Architecture >= NV_ARCH_50)
- NV50SyncToVBlank(dst_pix, x1, y1, x2, y2);
+ NV50SyncToVBlank(dst_pix, RegionExtents(®));
else
- NV11SyncToVBlank(dst_pix, x1, y1, x2, y2);
+ NV11SyncToVBlank(dst_pix, RegionExtents(®));
FIRE_RING(chan);
}
@@ -236,13 +236,9 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
SWAP(nouveau_pixmap(dst_pix)->bo, nouveau_pixmap(src_pix)->bo);
} else {
- BoxRec box = { 0, 0, draw->width, draw->height };
- RegionRec region;
-
- RegionInit(®ion, &box, 0);
-
type = DRI2_BLIT_COMPLETE;
- nouveau_dri2_copy_region(draw, ®ion, s->dst, s->src);
+ RegionTranslate(®, -draw->x, -draw->y);
+ nouveau_dri2_copy_region(draw, ®, s->dst, s->src);
}
/*
diff --git a/src/nv04_xv_blit.c b/src/nv04_xv_blit.c
index 55d82c4..be39c0d 100644
--- a/src/nv04_xv_blit.c
+++ b/src/nv04_xv_blit.c
@@ -130,8 +130,7 @@ NVPutBlitImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset,
if(pPriv->SyncToVBlank) {
FIRE_RING(chan);
- NV11SyncToVBlank(ppix, dstBox->x1, dstBox->y1,
- dstBox->x2, dstBox->y2);
+ NV11SyncToVBlank(ppix, dstBox);
}
if (pNv->dev->chipset >= 0x05) {
diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c
index 61558e9..ffa68e4 100644
--- a/src/nv30_xv_tex.c
+++ b/src/nv30_xv_tex.c
@@ -350,8 +350,7 @@ NV30PutTextureImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset,
/* Just before rendering we wait for vblank in the non-composited case. */
if (pPriv->SyncToVBlank) {
FIRE_RING(chan);
- NV11SyncToVBlank(ppix, dstBox->x1, dstBox->y1,
- dstBox->x2, dstBox->y2);
+ NV11SyncToVBlank(ppix, dstBox);
}
/* These are fixed point values in the 16.16 format. */
diff --git a/src/nv40_xv_tex.c b/src/nv40_xv_tex.c
index 602bb7a..e0444e8 100644
--- a/src/nv40_xv_tex.c
+++ b/src/nv40_xv_tex.c
@@ -339,8 +339,7 @@ NV40PutTextureImage(ScrnInfoPtr pScrn,
/* Just before rendering we wait for vblank in the non-composited case. */
if (pPriv->SyncToVBlank) {
FIRE_RING(chan);
- NV11SyncToVBlank(ppix, dstBox->x1, dstBox->y1,
- dstBox->x2, dstBox->y2);
+ NV11SyncToVBlank(ppix, dstBox);
}
/* These are fixed point values in the 16.16 format. */
diff --git a/src/nv50_accel.c b/src/nv50_accel.c
index d0def57..95d1886 100644
--- a/src/nv50_accel.c
+++ b/src/nv50_accel.c
@@ -24,7 +24,7 @@
#include "nv50_accel.h"
void
-NV50SyncToVBlank(PixmapPtr ppix, int x1, int y1, int x2, int y2)
+NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box)
{
ScrnInfoPtr pScrn = xf86Screens[ppix->drawable.pScreen->myNum];
NVPtr pNv = NVPTR(pScrn);
@@ -35,7 +35,9 @@ NV50SyncToVBlank(PixmapPtr ppix, int x1, int y1, int x2, int y2)
if (!nouveau_exa_pixmap_is_onscreen(ppix))
return;
- crtcs = nv_window_belongs_to_crtc(pScrn, x1, y1, x2 - x1, y2 - y1);
+ crtcs = nv_window_belongs_to_crtc(pScrn, box->x1, box->y1,
+ box->x2 - box->x1,
+ box->y2 - box->y1);
if (!crtcs)
Reply to: