xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2014-09-03 Thread Sven Joachim
 .gitignore |1 
 autogen.sh |4 
 configure.ac   |   26 ++
 man/nouveau.man|   33 ++-
 src/Makefile.am|   12 +
 src/drmmode_display.c  |  389 +--
 src/nouveau_copy.c |  129 +
 src/nouveau_copy.h |   18 +
 src/nouveau_copy85b5.c |  104 ++
 src/nouveau_copy90b5.c |  100 ++
 src/nouveau_copya0b5.c |   97 +
 src/nouveau_dri2.c |  482 ++---
 src/nouveau_exa.c  |   54 +++--
 src/nouveau_glamor.c   |  246 +
 src/nouveau_glamor.h   |   33 +++
 src/nouveau_present.c  |  328 +
 src/nouveau_present.h  |   19 +
 src/nouveau_sync.c |  117 +++
 src/nouveau_sync.h |   34 +++
 src/nouveau_wfb.c  |   12 +
 src/nouveau_xv.c   |  115 ++-
 src/nv04_exa.c |2 
 src/nv10_exa.c |   14 -
 src/nv50_accel.c   |   38 ---
 src/nv50_exa.c |   59 -
 src/nv50_xv.c  |2 
 src/nv_accel_common.c  |  155 ++-
 src/nv_const.h |2 
 src/nv_dma.c   |  139 --
 src/nv_driver.c|  265 ++
 src/nv_proto.h |   32 +--
 src/nv_type.h  |   36 +++
 src/nvc0_accel.c   |   42 +---
 src/nvc0_accel.h   |2 
 src/nvc0_exa.c |  112 ---
 35 files changed, 2352 insertions(+), 901 deletions(-)

New commits:
commit 3cd4c8494c296c7583dfa7f0823a272c9e932e03
Author: Mario Kleiner 
Date:   Thu Aug 28 03:57:48 2014 +0200

Bump version to 1.0.11 for release.

Highlights:

- Support for server managed fd's.
- Glamor support.
- Maxwell support.
- DRI3 and initial Present support.
- vsync'ed kms pageflip performance fixes when running on Linux 3.13+
- Multi-display vsync, vblank, swap scheduling, timestamping fixes.
- Multi x-screen support fixes.
- ZaphodHead support on for multiple outputs per x-screen.
- EXA nv-10 fixes.
- Enable sync of swaps to vblank by default (Option GLXVblank "on").
- Disable pseudo-triplebuffering by default (Option SwapLimit "1").

Signed-off-by: Mario Kleiner 
Signed-off-by: Ben Skeggs 

diff --git a/configure.ac b/configure.ac
index dbaf623..ccf320a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.10],
+[1.0.11],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 6d49f3f7aaaec872b6f9841f744a0bf09cc98492
Author: Mario Kleiner 
Date:   Thu Aug 28 03:49:55 2014 +0200

dri2: Set default SwapLimit to 1 for double-buffering.

This used to be 2 for pseudo-triplebuffering on XOrg 1.12+.

However, it caused problems like unthrottled swapping
at up to twice the video refresh rate for redirected
windows under desktop composition, which can't be easily
fixed under dri2.

Default to double-buffering. Users can override this, but
dri3 provides better solutions for this.

Signed-off-by: Mario Kleiner 
Signed-off-by: Ben Skeggs 

diff --git a/man/nouveau.man b/man/nouveau.man
index 0bf6e1e..129bb7f 100644
--- a/man/nouveau.man
+++ b/man/nouveau.man
@@ -124,7 +124,7 @@ OpenML OML_sync_control specification and will cause 
failure of software
 that relies on correct presentation timing behaviour as defined in that
 specification.
 .br
-Default: 2 for XOrg 1.12+, 1 for older servers.
+Default: 1.
 .SH "SEE ALSO"
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), 
Xserver(__appmansuffix__), X(__miscmansuffix__)
 .SH AUTHORS
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 6045095..4bad985 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1138,10 +1138,10 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
reason = ": Caution: Use of this swap limit > 1 
violates OML_sync_control spec on this X-Server!\n";
}
} else {
-   /* Driver default: Double buffering on old servers, 
triple-buffering
-* on Xorg 1.12+.
+   /* Always default to double-buffering, because it avoids 
artifacts like
+* unthrottled rendering of non-fullscreen clients under 
desktop composition.
 */
-   pNv->swap_limit = (DRI2INFOREC_VERSION < 6) ? 1 : 2;
+   pNv->swap_limit = 1;
reason = "";
from = X_DEFAULT;
}

commit 10729a442be3cf018c5806c95ec4218977917ef3
Author: Mario Kleiner 
Date:   Mon Aug 18 09:53:27 2014 +0200

xv/dri2/dri3: Switch to optimized crtc selection for drawables.

Make crtc selection consistent with ati and intel ddx.

Pick the crtc to use for vblank events, swap scheduling and
kms-pageflip completion events as the one with maximum pixel area
intersec

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2013-06-07 Thread Sven Joachim
 configure.ac  |2 
 src/drmmode_display.c |   70 +++
 src/nouveau_dri2.c|  216 +++-
 src/nouveau_exa.c |   65 ++-
 src/nouveau_local.h   |1 
 src/nv04_accel.h  |   10 +
 src/nv30_exa.c|  272 +++
 src/nv40_exa.c|  438 +-
 src/nv50_exa.c|9 -
 src/nv_accel_common.c |   13 +
 src/nv_driver.c   |  274 +--
 src/nv_include.h  |9 -
 src/nv_proto.h|1 
 src/nv_shadow.c   |7 
 src/nv_type.h |   10 -
 src/nvc0_accel.c  |   59 ++
 src/nvc0_accel.h  |1 
 src/nvc0_exa.c|   43 ++--
 src/nvc0_shader.h |4 
 src/nvc0_xv.c |4 
 src/nve0_shader.h |4 
 21 files changed, 997 insertions(+), 515 deletions(-)

New commits:
commit 6771424d79e541d2fa7253a582db3dc9108fd97d
Author: Maarten Lankhorst 
Date:   Wed Mar 27 09:50:03 2013 +0100

bump to 1.0.7

Signed-off-by: Maarten Lankhorst 

diff --git a/configure.ac b/configure.ac
index 7535bfe..137de9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.6],
+[1.0.7],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 84998320162a74a0861b7be1fcc230e50f08424a
Author: Maarten Lankhorst 
Date:   Mon Mar 25 13:55:37 2013 +0100

Clean up some errors on closing.

If forced close happens, all ioctl's will fail. Some of the handlers
also need to be unregistered before the module is unloaded entirely.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 9eca60f..6033a6d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -627,6 +627,9 @@ drmmode_output_detect(xf86OutputPtr output)
drmmode_output->mode_output =
drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
 
+   if (!drmmode_output->mode_output)
+   return XF86OutputStatusDisconnected;
+
switch (drmmode_output->mode_output->connection) {
case DRM_MODE_CONNECTED:
status = XF86OutputStatusConnected;
@@ -663,6 +666,9 @@ drmmode_output_get_modes(xf86OutputPtr output)
drmModePropertyPtr props;
xf86MonPtr ddc_mon = NULL;
 
+   if (!koutput)
+   return NULL;
+
/* look for an EDID property */
for (i = 0; i < koutput->count_props; i++) {
props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
@@ -927,6 +933,9 @@ drmmode_output_get_property(xf86OutputPtr output, Atom 
property)
drmModeGetConnector(drmmode->fd, 
drmmode_output->output_id);
}
 
+   if (!drmmode_output->mode_output)
+   return FALSE;
+
for (i = 0; i < drmmode_output->num_props; i++) {
drmmode_prop_ptr p = &drmmode_output->props[i];
if (p->atoms[0] != property)
@@ -1437,6 +1446,7 @@ drmmode_uevent_fini(ScrnInfoPtr scrn)
if (drmmode->uevent_monitor) {
struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor);
 
+   
RemoveGeneralSocket(udev_monitor_get_fd(drmmode->uevent_monitor));
udev_monitor_unref(drmmode->uevent_monitor);
udev_unref(u);
}
@@ -1524,6 +1534,12 @@ void
 drmmode_screen_fini(ScreenPtr pScreen)
 {
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
+   drmmode_ptr drmmode = drmmode_from_scrn(scrn);
 
drmmode_uevent_fini(scrn);
+
+   /* Register a wakeup handler to get informed on DRM events */
+   RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
+drmmode_wakeup_handler, scrn);
+   RemoveGeneralSocket(drmmode->fd);
 }
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 9f62fe2..2b74fc6 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -432,8 +432,8 @@ NVLeaveVT(VT_FUNC_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVLeaveVT is called.\n");
 
ret = drmDropMaster(pNv->dev->fd);
-   if (ret)
-   ErrorF("Error dropping master: %d\n", ret);
+   if (ret && errno != EIO && errno != ENODEV)
+   ErrorF("Error dropping master: %i(%m)\n", -errno);
 }
 
 static void
@@ -624,8 +624,9 @@ NVCloseDRM(ScrnInfoPtr pScrn)
 {
NVPtr pNv = NVPTR(pScrn);
 
-   nouveau_device_del(&pNv->dev);
drmFree(pNv->drm_device_name);
+   nouveau_client_del(&pNv->client);
+   nouveau_device_del(&pNv->dev);
 }
 
 static Bool

commit a80785f79268ed3701fc69cbd9194ad12822c82c
Author: Dave Airlie 
Date:   Mon Feb 11 09:56:25 2013 +1000

nouveau: fix build against old servers (part 2)

Should fix next bit of
https://bugs.freedesktop.org/show_bug.cgi?id=60369

Signed-off-by: Dave Airlie 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 71c9ff9.

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2013-06-14 Thread Sven Joachim
 .gitignore   |1 
 Makefile.am  |   15 -
 configure.ac |   35 +++
 src/Makefile.am  |   35 +++
 src/drmmode_display.c|   40 ++--
 src/nouveau_dri2.c   |   19 --
 src/nouveau_xv.c |4 
 src/nv_accel_common.c|5 
 src/nv_driver.c  |  146 ++-
 src/nv_proto.h   |1 
 src/nv_type.h|   14 -
 src/nvc0_accel.c |   45 
 src/nvc0_shader.h|  444 ---
 src/nve0_shader.h|  440 --
 src/shader/.gitignore|1 
 src/shader/Makefile  |   30 +++
 src/shader/exac8nvc0.fp  |   41 
 src/shader/exac8nvc0.fpc |   22 ++
 src/shader/exac8nve0.fp  |   42 
 src/shader/exac8nve0.fpc |   28 ++
 src/shader/exacanvc0.fp  |   41 
 src/shader/exacanvc0.fpc |   25 ++
 src/shader/exacanve0.fp  |   43 
 src/shader/exacanve0.fpc |   30 +++
 src/shader/exacmnvc0.fp  |   41 
 src/shader/exacmnvc0.fpc |   25 ++
 src/shader/exacmnve0.fp  |   43 
 src/shader/exacmnve0.fpc |   30 +++
 src/shader/exas8nvc0.fp  |   37 +++
 src/shader/exas8nvc0.fpc |   14 +
 src/shader/exas8nve0.fp  |   38 
 src/shader/exas8nve0.fpc |   20 ++
 src/shader/exasanvc0.fp  |   41 
 src/shader/exasanvc0.fpc |   25 ++
 src/shader/exasanve0.fp  |   43 
 src/shader/exasanve0.fpc |   30 +++
 src/shader/exascnvc0.fp  |   34 +++
 src/shader/exascnvc0.fpc |   11 +
 src/shader/exascnve0.fp  |   35 +++
 src/shader/exascnve0.fpc |   14 +
 src/shader/videonvc0.fp  |   47 
 src/shader/videonvc0.fpc |   37 +++
 src/shader/videonve0.fp  |   50 +
 src/shader/videonve0.fpc |   44 
 src/shader/xfrm2nvc0.vp  |   63 ++
 src/shader/xfrm2nvc0.vpc |   69 +++
 src/shader/xfrm2nve0.vp  |   63 ++
 src/shader/xfrm2nve0.vpc |   70 +++
 48 files changed, 1486 insertions(+), 985 deletions(-)

New commits:
commit 7f20a6af25ae28452ec9c971bfa2227857e6ee93
Author: Maarten Lankhorst 
Date:   Wed Jun 12 10:46:39 2013 +0200

bump to 1.0.8

diff --git a/configure.ac b/configure.ac
index 575f69d..bf19d3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.7],
+[1.0.8],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 1fda669c0e5a25eac7f9f1e9a743120cae50ff51
Author: Emil Velikov 
Date:   Sat Feb 16 20:48:47 2013 +

configure: printout the configuration info

Let the bikeshedding begin

Signed-off-by: Emil Velikov 

diff --git a/configure.ac b/configure.ac
index 4f9f0b1..575f69d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,3 +132,21 @@ AC_CONFIG_FILES([
man/Makefile
 ])
 AC_OUTPUT
+
+dnl
+dnl Output some configuration info for the user
+dnl
+echo ""
+echo "prefix:  $prefix"
+echo "exec_prefix: $exec_prefix"
+echo "libdir:  $libdir"
+echo "includedir:  $includedir"
+
+echo ""
+echo "CFLAGS:  $CFLAGS"
+echo "CXXFLAGS:$CXXFLAGS"
+echo "Macros:  $DEFINES"
+
+echo ""
+echo "Run '${MAKE-make}' to build xf86-video-nouveau"
+echo ""

commit 45dbcaac301efce04d0bb492337f4febf8129ed9
Author: Emil Velikov 
Date:   Sat Feb 16 20:48:45 2013 +

nouveau: mandate dri2 build

Building nouveau without dri2 is just silly

Signed-off-by: Emil Velikov 

diff --git a/configure.ac b/configure.ac
index fa4a2dc..4f9f0b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,6 +84,7 @@ AC_SUBST(LIBDRM_NOUVEAU_CFLAGS)
 AC_SUBST(LIBDRM_NOUVEAU_LIBS)
 
 PKG_CHECK_MODULES(XORG, [xorg-server >= 1.8] xproto fontsproto libdrm 
$REQUIRED_MODULES)
+PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6])
 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")
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 5511b36..3785956 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -7,9 +7,10 @@
 #include "nv_include.h"
 #ifdef DRI2
 #include "dri2.h"
+#else
+#error "This driver requires a DRI2-enabled X server"
 #endif
 
-#if defined(DRI2) && DRI2INFOREC_VERSION >= 3
 struct nouveau_dri2_buffer {
DRI2BufferRec base;
PixmapPtr ppix;
@@ -817,16 +818,3 @@ nouveau_dri2_fini(ScreenPtr pScreen)
 {
DRI2CloseScreen(pScreen);
 }
-#else
-Bool
-nouveau_dri2_init(ScreenPtr pScreen)
-{
-   return TRUE;
-}
-
-void
-nouveau_dri2_fini(ScreenPtr pScreen)
-{
-}
-#endif
-

commit ea8d225fe100ecabb72e3cc0a92372f16afb10b3
Author: Emil Velikov 
Date:   Sat Feb 16 20:48:44 2013 +

dri1: purge the final references

Signed-off-by: Emil Velikov 

diff --git a/configure.ac b/configure.ac
index 15a6e13..fa4a2dc 100644
--- a/configure.ac
+++ b/configure.a

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2013-07-30 Thread Sven Joachim
 configure.ac |5 +-
 src/Makefile.am  |   20 +-
 src/drmmode_display.c|   52 ++-
 src/nouveau_xv.c |   36 +++---
 src/nv_driver.c  |2 -
 src/nvc0_accel.c |   33 +++--
 src/shader/Makefile  |   15 +++
 src/shader/exac8nvf0.fp  |   42 +
 src/shader/exac8nvf0.fpc |   28 ++
 src/shader/exacanvf0.fp  |   43 ++
 src/shader/exacanvf0.fpc |   30 +++
 src/shader/exacmnvf0.fp  |   43 ++
 src/shader/exacmnvf0.fpc |   30 +++
 src/shader/exas8nvf0.fp  |   38 +++
 src/shader/exas8nvf0.fpc |   20 ++
 src/shader/exasanvf0.fp  |   43 ++
 src/shader/exasanvf0.fpc |   30 +++
 src/shader/exascnvf0.fp  |   35 ++
 src/shader/exascnvf0.fpc |   14 +++
 src/shader/videonvf0.fp  |   47 
 src/shader/videonvf0.fpc |   38 +++
 src/shader/xfrm2nvf0.vp  |   82 ++
 src/shader/xfrm2nvf0.vpc |   90 +++
 23 files changed, 790 insertions(+), 26 deletions(-)

New commits:
commit 300c5a32d79cf507b5fede96710335bcd316eccb
Author: Dave Airlie 
Date:   Tue Jul 30 15:28:06 2013 +1000

bump to 1.0.9 for release

Signed-off-by: Dave Airlie 

diff --git a/configure.ac b/configure.ac
index b54b8cd..eff9087 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.8],
+[1.0.9],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit be44e7804862b4c276ed4d4717b1212920f428e6
Author: Dave Airlie 
Date:   Tue Jul 30 15:26:46 2013 +1000

nouveau: fix crash when xinerama is enabled.

Signed-off-by: Dave Airlie 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ed9e186..570a9e4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -348,7 +348,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
 
fb_id = drmmode->fb_id;
 #ifdef NOUVEAU_PIXMAP_SHARING
-   if (crtc->randr_crtc->scanout_pixmap) {
+   if (crtc->randr_crtc && crtc->randr_crtc->scanout_pixmap) {
x = drmmode_crtc->scanout_pixmap_x;
y = 0;
} else

commit 588252556d1c84bf6793bc22edd48e6650a0f1b9
Author: Dave Airlie 
Date:   Tue Jul 30 15:14:22 2013 +1000

fix make distcheck.

add all the nvf0 stuff.

Signed-off-by: Dave Airlie 

diff --git a/src/Makefile.am b/src/Makefile.am
index 5836ead..82d7c14 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -70,34 +70,50 @@ EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \
 shader/exac8nvc0.fpc \
 shader/exac8nve0.fp \
 shader/exac8nve0.fpc \
+shader/exac8nvf0.fp \
+shader/exac8nvf0.fpc \
 shader/exacanvc0.fp \
 shader/exacanvc0.fpc \
 shader/exacanve0.fp \
 shader/exacanve0.fpc \
+shader/exacanvf0.fp \
+shader/exacanvf0.fpc \
 shader/exacmnvc0.fp \
 shader/exacmnvc0.fpc \
 shader/exacmnve0.fp \
 shader/exacmnve0.fpc \
+shader/exacmnvf0.fp \
+shader/exacmnvf0.fpc \
 shader/exas8nvc0.fp \
 shader/exas8nvc0.fpc \
 shader/exas8nve0.fp \
 shader/exas8nve0.fpc \
+shader/exas8nvf0.fp \
+shader/exas8nvf0.fpc \
 shader/exasanvc0.fp \
 shader/exasanvc0.fpc \
 shader/exasanve0.fp \
 shader/exasanve0.fpc \
+shader/exasanvf0.fp \
+shader/exasanvf0.fpc \
 shader/exascnvc0.fp \
 shader/exascnvc0.fpc \
 shader/exascnve0.fp \
 shader/exascnve0.fpc \
+shader/exascnvf0.fp \
+shader/exascnvf0.fpc \
 shader/videonvc0.fp \
 shader/videonvc0.fpc \
 shader/videonve0.fp \
 shader/videonve0.fpc \
+shader/videonvf0.fp \
+shader/videonvf0.fpc \
 shader/xfrm2nvc0.vp \
 shader/xfrm2nvc0.vpc \
 shader/xfrm2nve0.vp \
 shader/xfrm2nve0.vpc \
+shader/xfrm2nvf0.vp \
+shader/xfrm2nvf0.vpc \
 shader/Makefile \
 nouveau_local.h \
 nv_const.h \

commit 29aecda1b5bdb95700894083874492a6d5dfc08a
Author: Dave Airlie 
Date:   Tue Jul 30 14:10:51 2013 +1000

drmmode: add support for multi-screen reverse optimus

Initial reverse optimus didn't consider multiple screens, so
this overhauls the code to use the new X server interface,
and allows for multiple outputs on the nvidia to be used with
the intel doing the rendering.
   

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2013-11-07 Thread Maarten Lankhorst
 configure.ac  |2 +-
 src/drmmode_display.c |6 ++
 src/nouveau_xv.c  |2 ++
 src/nv_driver.c   |6 --
 4 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 480f0998ffed6d9a5c6656dba75182f00fd88a1b
Author: Ben Skeggs 
Date:   Thu Nov 7 14:56:48 2013 +1000

bump to 1.0.10 for release

Signed-off-by: Ben Skeggs 

diff --git a/configure.ac b/configure.ac
index eff9087..c524660 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.9],
+[1.0.10],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 59395c738ebdc21087109075ada67ea8d7783141
Author: Ben Skeggs 
Date:   Thu Nov 7 14:56:06 2013 +1000

recognise GK208 as a Kepler board

Signed-off-by: Ben Skeggs 

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 44e7496..5131dcd 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -309,7 +309,7 @@ NVHasKMS(struct pci_device *pci_dev)
nouveau_device_del(&dev);
 
 
-   switch (chipset & 0xf0) {
+   switch (chipset & ~0xf) {
case 0x00:
case 0x10:
case 0x20:
@@ -324,6 +324,7 @@ NVHasKMS(struct pci_device *pci_dev)
case 0xd0:
case 0xe0:
case 0xf0:
+   case 0x100:
break;
default:
xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
@@ -839,7 +840,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
sprintf(pScrn->chipset, "NVIDIA NV%02X", dev->chipset);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\"\n", 
pScrn->chipset);
 
-   switch (dev->chipset & 0xf0) {
+   switch (dev->chipset & ~0xf) {
case 0x00:
pNv->Architecture = NV_ARCH_04;
break;
@@ -868,6 +869,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
break;
case 0xe0:
case 0xf0:
+   case 0x100:
pNv->Architecture = NV_ARCH_E0;
break;
default:

commit 03642323a954d0adb11662a98e92dfa20bee9728
Author: Dave Airlie 
Date:   Wed Jul 31 11:19:50 2013 +1000

nouveau: fix build against older servers.

Older servers had no GPU support.

Signed-off-by: Dave Airlie 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3563b2a..cc141a0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1098,10 +1098,12 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, int num)
if (koutput->connector_type >= NUM_OUTPUT_NAMES)
snprintf(name, 32, "Unknown%d-%d", koutput->connector_type,
 koutput->connector_type_id);
+#ifdef NOUVEAU_PIXMAP_SHARING
else if (pScrn->is_gpu)
snprintf(name, 32, "%s-%d-%d",
 output_names[koutput->connector_type], 
pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1,
 koutput->connector_type_id);
+#endif
else
snprintf(name, 32, "%s-%d",
 output_names[koutput->connector_type],

commit 27323ce68d58fcb82a648ab14abbc99acdc36f44
Author: Dave Airlie 
Date:   Wed Jul 31 11:01:15 2013 +1000

nouveau: add gpu identifier to connector names for secondary gpus

this avoids clashes with identifiers from other GPUs.

Signed-off-by: Dave Airlie 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 570a9e4..3563b2a 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1098,6 +1098,10 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, int num)
if (koutput->connector_type >= NUM_OUTPUT_NAMES)
snprintf(name, 32, "Unknown%d-%d", koutput->connector_type,
 koutput->connector_type_id);
+   else if (pScrn->is_gpu)
+   snprintf(name, 32, "%s-%d-%d",
+output_names[koutput->connector_type], 
pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1,
+koutput->connector_type_id);
else
snprintf(name, 32, "%s-%d",
 output_names[koutput->connector_type],

commit 1df177f35a05db505577cdc929e63fde906a704b
Author: Dave Airlie 
Date:   Wed Jul 31 10:51:03 2013 +1000

nouveau: fix build on ppc by wrapping immintrin include.

Signed-off-by: Dave Airlie 

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index 5569b7c..e19378d 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -25,7 +25,9 @@
 #include "config.h"
 #endif
 
+#ifdef __SSE2__
 #include 
+#endif
 
 #include "xf86xv.h"
 #include 


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1veloe-0004xk...@vasks.debian.org



xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2015-12-11 Thread Sven Joachim
 configure.ac |   15 --
 man/nouveau.man  |9 +
 src/Makefile.am  |2 
 src/drmmode_display.c|   60 ++-
 src/nouveau_copy.c   |6 -
 src/nouveau_dri2.c   |  144 ++-
 src/nouveau_glamor.c |  246 ---
 src/nouveau_glamor.h |   33 --
 src/nouveau_present.c|   34 --
 src/nouveau_present.h|2 
 src/nouveau_wfb.c|8 -
 src/nouveau_xv.c |   15 +-
 src/nv04_exa.c   |3 
 src/nv10_exa.c   |8 -
 src/nv30_exa.c   |   20 +--
 src/nv40_exa.c   |8 -
 src/nv50_accel.c |  227 +--
 src/nv50_accel.h |1 
 src/nv50_exa.c   |8 -
 src/nv50_xv.c|3 
 src/nv_accel_common.c|   27 +
 src/nv_const.h   |2 
 src/nv_driver.c  |  106 
 src/nv_proto.h   |1 
 src/nv_type.h|5 
 src/nvc0_accel.c |   12 +-
 src/nvc0_exa.c   |2 
 src/shader/Makefile  |   13 +-
 src/shader/exac8nvf0.fp  |4 
 src/shader/exac8nvf0.fpc |4 
 src/shader/exacanve0.fp  |1 
 src/shader/exacanve0.fpc |2 
 src/shader/exacanvf0.fp  |5 
 src/shader/exacanvf0.fpc |6 -
 src/shader/exacmnve0.fp  |1 
 src/shader/exacmnve0.fpc |2 
 src/shader/exacmnvf0.fp  |5 
 src/shader/exacmnvf0.fpc |6 -
 src/shader/exas8nvf0.fp  |2 
 src/shader/exas8nvf0.fpc |2 
 src/shader/exasanve0.fp  |1 
 src/shader/exasanve0.fpc |2 
 src/shader/exasanvf0.fp  |5 
 src/shader/exasanvf0.fpc |6 -
 src/shader/exascnvf0.fp  |2 
 src/shader/exascnvf0.fpc |2 
 src/shader/videonvf0.fp  |4 
 src/shader/videonvf0.fpc |4 
 48 files changed, 461 insertions(+), 625 deletions(-)

New commits:
commit b18bc036bf9997ea65f5cbd824fd057931e604fe
Author: Ben Skeggs 
Date:   Tue Dec 8 15:52:25 2015 +1000

Bump version to 1.0.12

Various random fixes have been pending for a long while now...

Signed-off-by: Ben Skeggs 

diff --git a/configure.ac b/configure.ac
index 9c77f94..8da54f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.11],
+[1.0.12],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 6e6d8ac1c7b4ee047a7b40b95dea1e65a7c3211a
Author: Mario Kleiner 
Date:   Sun Jun 28 02:33:49 2015 +0200

Take shift in crtc positions for ZaphodHeads configs into account.

In multi-x-screen ZaphodHeads configurations, there isn't a
one-to-one mapping of kernel provided drmmode crtc index
to the index of the corresponding xf86Crtc inside the
xf86CrtcConfig crtc array anymore, ie. for kernel provided
drmmode->mode_res->crtcs[i], the i'th crtc won't correspond
to the xf86Crtc in the i'th slot of the x-screens xf86CrtcConfig
anymore, once ZaphodHeads has only selected a subset of all crtcs
of a graphics card for a given x-screen, instead of all crtcs.

This breaks the mapping of bit positions in the bit masks returned
in kencoder->possible_crtcs and kencoder->possible_clones. A 1 bit
in position i of those masks allows use of the kernels i'th crtc for
the given kencoder. The X-Servers dix code checks those bit masks
for valid xf86Output -> xf86Crtc assignments, assuming that the i'th
slot xf86CrtcConfigPtr config->crtc[i] corresponds to bit i in the
xf86Output->possibe_crtcs bitmask, and bails if the bitmask doesn't
allow the specified assignment of crtc to output. If ZaphodHeads
breaks the assumption of bit i <-> crtc slot i this ends in failure.

Take this shift of crtc index positions wrt. encoder bitmask bit
positions into account by bit-shifting positions accordingly when
assigning encoder->possible_crtcs to output->possible_crtcs, so
the proper indices match up again for validation by the dix.

This problem wasn't apparent last year when testing the ZaphodHeads
support on some Kepler cards, as apparently the encoder->possible_crtcs
bitmasks returned for those cards by the kernel just had all 4
lsb bits set for all tested encoders/output, so each of the cards 4
crtcs could go with each output and things worked by chance.

The current code breaks, e.g., on 2010 MacBookPro with nv50, where
one crtc is hardwired to the internal lvds panel, and one crtc
is hardwired to the external DP connector, resulting in a failure
where dual-display on single-x-screen works fine, but assigning
each output to a separate x-screen via ZaphodHeads fails due to
the mismatched encoder->possible_crtcs bitmasks.

This patch fixes the problem.

Signed-off-by: Mario Kleiner 
Signed-off-by: Ben Skeggs 

diff --git a/src/drmmode_display.c b/src/drmmode_displ

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2016-09-23 Thread Sven Joachim
 configure.ac  |2 +-
 src/compat-api.h  |9 +
 src/drmmode_display.c |   46 --
 src/nouveau_copy.c|   38 +-
 src/nv50_exa.c|   48 +---
 src/nvc0_exa.c|   48 +---
 6 files changed, 125 insertions(+), 66 deletions(-)

New commits:
commit e6479845ec0db20dc733c621b7967b751840a552
Author: Ilia Mirkin 
Date:   Tue Sep 20 00:31:06 2016 -0400

Bump version to 1.0.13

 - Fixes for reverse prime offload
 - ABI 23 support for Xorg 1.19

Signed-off-by: Ilia Mirkin https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 6473b68762b0dca2dfccfdfc74100398b7459296
Author: Keith Packard 
Date:   Tue Jul 19 08:29:40 2016 -0700

Use NotifyFd for drm and udev fds

NotifyFd is available after API 22, and must be used after API 23.

Signed-off-by: Keith Packard 

diff --git a/src/compat-api.h b/src/compat-api.h
index 5d63e10..fde2f4b 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -74,6 +74,10 @@
 
 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
 
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(22,0)
+#define HAVE_NOTIFY_FD 1
+#endif
+
 #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
 #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout
 #define BLOCKHANDLER_ARGS arg, pTimeout
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f326e46..b6c9bb9 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1537,6 +1537,15 @@ drmmode_handle_uevents(ScrnInfoPtr scrn)
 }
 #endif
 
+#if HAVE_NOTIFY_FD
+static void
+drmmode_udev_notify(int fd, int notify, void *data)
+{
+   ScrnInfoPtr scrn = data;
+   drmmode_handle_uevents(scrn);
+}
+#endif
+
 static void
 drmmode_uevent_init(ScrnInfoPtr scrn)
 {
@@ -1563,7 +1572,11 @@ drmmode_uevent_init(ScrnInfoPtr scrn)
return;
}
 
+#if HAVE_NOTIFY_FD
+   SetNotifyFd(udev_monitor_get_fd(mon), drmmode_udev_notify, 
X_NOTIFY_READ, scrn);
+#else
AddGeneralSocket(udev_monitor_get_fd(mon));
+#endif
drmmode->uevent_monitor = mon;
 #endif
 }
@@ -1577,13 +1590,27 @@ drmmode_uevent_fini(ScrnInfoPtr scrn)
if (drmmode->uevent_monitor) {
struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor);
 
+#if HAVE_NOTIFY_FD
+   RemoveNotifyFd(udev_monitor_get_fd(drmmode->uevent_monitor));
+#else

RemoveGeneralSocket(udev_monitor_get_fd(drmmode->uevent_monitor));
+#endif
udev_monitor_unref(drmmode->uevent_monitor);
udev_unref(u);
}
 #endif
 }
 
+#if HAVE_NOTIFY_FD
+static void
+drmmode_notify_fd(int fd, int notify, void *data)
+{
+   ScrnInfoPtr scrn = data;
+   drmmode_ptr drmmode = drmmode_from_scrn(scrn);
+   drmHandleEvent(drmmode->fd, &drmmode->event_context);
+}
+#else
+
 static void
 drmmode_wakeup_handler(pointer data, int err, pointer p)
 {
@@ -1602,6 +1629,7 @@ drmmode_wakeup_handler(pointer data, int err, pointer p)
drmmode_handle_uevents(scrn);
 #endif
 }
+#endif
 
 void
 drmmode_screen_init(ScreenPtr pScreen)
@@ -1619,9 +1647,13 @@ drmmode_screen_init(ScreenPtr pScreen)
/* Register wakeup handler only once per servergen, so ZaphodHeads work 
*/
if (pNVEnt->fd_wakeup_registered != serverGeneration) {
/* Register a wakeup handler to get informed on DRM events */
+#if HAVE_NOTIFY_FD
+   SetNotifyFd(drmmode->fd, drmmode_notify_fd, X_NOTIFY_READ, 
scrn);
+#else
AddGeneralSocket(drmmode->fd);
RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
   drmmode_wakeup_handler, scrn);
+#endif
pNVEnt->fd_wakeup_registered = serverGeneration;
pNVEnt->fd_wakeup_ref = 1;
}
@@ -1640,10 +1672,14 @@ drmmode_screen_fini(ScreenPtr pScreen)
if (pNVEnt->fd_wakeup_registered == serverGeneration &&
!--pNVEnt->fd_wakeup_ref) {
 
+#if HAVE_NOTIFY_FD
+   RemoveNotifyFd(drmmode->fd);
+#else
/* Unregister wakeup handler */
RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
 drmmode_wakeup_handler, scrn);
RemoveGeneralSocket(drmmode->fd);
+#endif
}
 
/* Tear down udev event handler */

commit a964931e8dc4e06c27749edb4993a656dc261d75
Author: Adam Jackson 
Date:   Tue Jul 19 10:03:56 2016 -0400

Adapt Block/WakeupHandler signature for ABI 23

Signed-off-by: Adam Jackson 

diff --git a/src/compat-api.h b/src/compat-api.h
index b1591b1..5d63e10 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -74,8 +74,13 @@
 
 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2010-05-22 Thread Sven Joachim
New branch 'upstream-unstable' available with the following commits:


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1ofqt4-0005ls...@alioth.debian.org



xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2011-04-11 Thread Sven Joachim
 Makefile.am   |2 
 configure.ac  |   25 
 man/nouveau.man   |   21 
 src/Makefile.am   |   11 
 src/drmmode_display.c |  374 +-
 src/nouveau_class.h   | 9084 ++
 src/nouveau_dri2.c|  330 +
 src/nouveau_exa.c |  151 
 src/nouveau_local.h   |   14 
 src/nouveau_wfb.c |   14 
 src/nouveau_xv.c  |   97 
 src/nv04_exa.c|   47 
 src/nv04_xv_blit.c|   13 
 src/nv10_exa.c|3 
 src/nv30_exa.c|3 
 src/nv30_shaders.c|1 
 src/nv30_xv_tex.c |   29 
 src/nv40_exa.c|3 
 src/nv40_xv_tex.c |   26 
 src/nv50_accel.c  |   82 
 src/nv50_accel.h  |   12 
 src/nv50_defs.xml.h   |  144 
 src/nv50_exa.c|   29 
 src/nv50_xv.c |  193 -
 src/nv_3ddefs.xml.h   |   93 
 src/nv_accel_common.c |  170 
 src/nv_const.h|   10 
 src/nv_dma.c  |   24 
 src/nv_driver.c   |  178 
 src/nv_include.h  |4 
 src/nv_object.xml.h   |  246 +
 src/nv_proto.h|   49 
 src/nv_type.h |9 
 src/nvc0_3d.xml.h | 1093 ++
 src/nvc0_accel.c  |  731 
 src/nvc0_accel.h  |   83 
 src/nvc0_exa.c| 1204 ++
 src/nvc0_m2mf.xml.h   |  138 
 src/nvc0_xv.c |  427 ++
 39 files changed, 14693 insertions(+), 474 deletions(-)

New commits:
commit 8378443bd3b26b57ef2ae424a700e01ead813d33
Author: Ben Skeggs 
Date:   Thu Mar 24 02:13:12 2011 +1000

nv50-nvc0/exa: fix bug causing surface state to not be reemitted after flush

Signed-off-by: Ben Skeggs 

diff --git a/src/nv50_exa.c b/src/nv50_exa.c
index 85baa68..b6094ae 100644
--- a/src/nv50_exa.c
+++ b/src/nv50_exa.c
@@ -363,7 +363,7 @@ NV50EXAStateSIFCResubmit(struct nouveau_channel *chan)
if (MARK_RING(pNv->chan, 32, 2))
return;
 
-   if (NV50EXAAcquireSurface2D(pNv->pdpix, 0))
+   if (!NV50EXAAcquireSurface2D(pNv->pdpix, 0))
MARK_UNDO(pNv->chan);
 }
 
diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c
index 85cb5d2..9833275 100644
--- a/src/nvc0_exa.c
+++ b/src/nvc0_exa.c
@@ -541,7 +541,7 @@ NVC0EXAStateSIFCResubmit(struct nouveau_channel *chan)
if (MARK_RING(pNv->chan, 32, 2))
return;
 
-   if (NVC0EXAAcquireSurface2D(pNv->pdpix, 0))
+   if (!NVC0EXAAcquireSurface2D(pNv->pdpix, 0))
MARK_UNDO(pNv->chan);
 }
 

commit 92db2bc192a074d4b7fc3e9c16e9aa62a8deaeb6
Author: Christoph Bumiller 
Date:   Thu Mar 3 22:17:23 2011 +0100

nvc0/accel: allow nvc1,nvc3,nvc4 in 3D engine init and use 9097

diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index aef8305..c37b30c 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -92,6 +92,9 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn)
 
switch (pNv->dev->chipset) {
case 0xc0:
+   case 0xc1:
+   case 0xc3:
+   case 0xc4:
tclClass = 0x9097;
break;
default:

commit ace98a492353e6de712f4f717e6d3f562e3591f0
Author: Ben Skeggs 
Date:   Tue Mar 1 13:54:38 2011 +1000

dri2: return an error rather than crashing if we can't allocate a buffer

Signed-off-by: Ben Skeggs 

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index d5afa8a..1a68ed3 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -29,6 +29,7 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int 
attachment,
ScreenPtr pScreen = pDraw->pScreen;
NVPtr pNv = NVPTR(xf86Screens[pScreen->myNum]);
struct nouveau_dri2_buffer *nvbuf;
+   struct nouveau_pixmap *nvpix;
PixmapPtr ppix;
 
nvbuf = calloc(1, sizeof(*nvbuf));
@@ -70,7 +71,14 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int 
attachment,
nvbuf->base.flags = 0;
nvbuf->ppix = ppix;
 
-   nouveau_bo_handle_get(nouveau_pixmap(ppix)->bo, &nvbuf->base.name);
+   nvpix = nouveau_pixmap(ppix);
+   if (!nvpix || !nvpix->bo ||
+   nouveau_bo_handle_get(nvpix->bo, &nvbuf->base.name)) {
+   pScreen->DestroyPixmap(nvbuf->ppix);
+   free(nvbuf);
+   return NULL;
+   }
+
return &nvbuf->base;
 }
 

commit bc5dec2ca7ca7edc340a99bd73946e228117dfd8
Author: Ben Skeggs 
Date:   Thu Feb 24 15:15:00 2011 +1000

dri2: disable page flipping if any crtc is rotated

Signed-off-by: Ben Skeggs 

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 45add0f..d5afa8a 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -134,7 +134,16 @@ static Bool
 can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix)
 {
ScrnInfoPtr scrn = xf86Screens[draw->pScreen->myNum];
+   xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
NVPtr pNv = NVPTR(scrn);
+   int i;
+
+   for (i = 0; i < xf86_config->num_crtc; i++) {
+   xf86CrtcPtr crtc = xf86_config->crtc[i];
+   if (crtc->enabled && crtc->rotatedData)
+   return FALSE;
+
+ 

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2011-09-10 Thread Sven Joachim
 src/drmmode_display.c |   18 ++
 src/nouveau_dri2.c|3 +--
 src/nv_driver.c   |2 ++
 src/nvc0_accel.c  |   14 +-
 src/vl_hwmc.c |   37 +
 5 files changed, 47 insertions(+), 27 deletions(-)

New commits:
commit 169512fbe91f0671a90dfee5e280357f0a4ef701
Author: Maxim Levitsky 
Date:   Tue Aug 23 13:10:59 2011 +0200

dri2: Disable the "exchange" swapbuffers path for the moment (bug 35930).

Allow page flipping only for scanout buffer for now as simple swapping
between off-screen pixmaps confuses compiz because there is no
syncronization method to tell it about that swap

Signed-off-by: Francisco Jerez 

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 1a68ed3..2081ce2 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -153,8 +153,7 @@ can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr 
src_pix)
 
}
 
-   return (!nouveau_exa_pixmap_is_onscreen(dst_pix) ||
-   (DRI2CanFlip(draw) && pNv->has_pageflip)) &&
+   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.depth == src_pix->drawable.depth &&

commit b806e3f97a73701f057c45b1f45233e69e19f113
Author: Bryan Cain 
Date:   Wed Jul 20 13:48:36 2011 -0500

g3dvl: update for compatibility with latest pipe-video branch in Mesa

Signed-off-by: Bryan Cain 
Signed-off-by: Ben Skeggs 

diff --git a/src/vl_hwmc.c b/src/vl_hwmc.c
index d8d8860..6e9e0c7 100644
--- a/src/vl_hwmc.c
+++ b/src/vl_hwmc.c
@@ -35,12 +35,14 @@
 
 static int subpicture_index_list[] =
 {
-   FOURCC_RGB
+   FOURCC_RGB,
+   FOURCC_IA44,
+   FOURCC_AI44
 };
 
 static XF86MCImageIDList subpicture_list =
 {
-   1,
+   3,
subpicture_index_list
 };
 
@@ -53,29 +55,48 @@ static XF86MCSurfaceInfoRec yv12_mpeg2_surface =
2048,
2048,
2048,
-   /*XVMC_IDCT*/ XVMC_MOCOMP | XVMC_MPEG_2,
-   XVMC_INTRA_UNSIGNED | XVMC_SUBPICTURE_INDEPENDENT_SCALING | 
XVMC_BACKEND_SUBPICTURE,
+   XVMC_IDCT | XVMC_MOCOMP | XVMC_MPEG_2,
+   XVMC_SUBPICTURE_INDEPENDENT_SCALING | XVMC_BACKEND_SUBPICTURE,
+   &subpicture_list
+};
+
+static XF86MCSurfaceInfoRec uyvy_mpeg2_surface =
+{
+   FOURCC_UYVY,
+   XVMC_CHROMA_FORMAT_422,
+   0,
+   2048,
+   2048,
+   2048,
+   2048,
+   XVMC_IDCT | XVMC_MOCOMP | XVMC_MPEG_2,
+   XVMC_SUBPICTURE_INDEPENDENT_SCALING | XVMC_BACKEND_SUBPICTURE,
&subpicture_list
 };
 
 static XF86MCSurfaceInfoPtr surfaces[] =
 {
-   (XF86MCSurfaceInfoPtr)&yv12_mpeg2_surface
+   (XF86MCSurfaceInfoPtr)&yv12_mpeg2_surface,
+   (XF86MCSurfaceInfoPtr)&uyvy_mpeg2_surface
 };
 
 static XF86ImageRec rgb_subpicture = XVIMAGE_RGB;
+static XF86ImageRec ia44_subpicture = XVIMAGE_IA44;
+static XF86ImageRec ai44_subpicture = XVIMAGE_AI44;
 
 static XF86ImagePtr subpictures[] =
 {
-   (XF86ImagePtr)&rgb_subpicture
+   (XF86ImagePtr)&rgb_subpicture,
+   (XF86ImagePtr)&ia44_subpicture,
+   (XF86ImagePtr)&ai44_subpicture
 };
 
 static XF86MCAdaptorRec adaptor_template =
 {
"",
-   1,
+   2,
surfaces,
-   1,
+   3,
subpictures,
(xf86XvMCCreateContextProcPtr)NULL,
(xf86XvMCDestroyContextProcPtr)NULL,

commit de9d1ba7efeba64f319efa00df183d3cb78f24af
Author: Emil Velikov 
Date:   Tue Jul 19 00:35:38 2011 +0100

drmmode_display: Resolve missing brackets

Correct some missing/misplaced brackets in drmmode_pre_init()
The issue was exposed when trying a 4 monitor desktop using two
cards/gpus

Resolves https://bugs.freedesktop.org/show_bug.cgi?id=39099

Reported-By: Damian Nowak 
Tested-By: Damian Nowak 
Signed-off-by: Emil Velikov 
Signed-off-by: Ben Skeggs 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index e5e4673..3afef66 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1185,8 +1185,8 @@ 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++) {
-   if (!xf86IsEntityShared(pScrn->entityList[0] ||
-pScrn->confScreen->device->screen == i))
+   if (!xf86IsEntityShared(pScrn->entityList[0]) ||
+(pScrn->confScreen->device->screen == i))
drmmode_crtc_init(pScrn, drmmode, i);
}
 

commit ef4957492956df54fafa6c75d576a07ce678ea0a
Author: Ben Skeggs 
Date:   Mon Jul 11 12:48:34 2011 +1000

kms: fix multiple rotations in noaccel mode

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 204d9e8..e5e4673 1

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-04-11 Thread Sven Joachim
 man/nouveau.man|   15 +
 src/drmmode_display.c  |  107 -
 src/hwdefs/nv_object.xml.h |  248 +++---
 src/nouveau_dri2.c |  274 +++--
 src/nouveau_exa.c  |  334 +++--
 src/nouveau_local.h|   96 +++
 src/nouveau_xv.c   |  121 +--
 src/nv04_exa.c |  116 +-
 src/nv04_xv_blit.c |   22 +-
 src/nv10_exa.c |  183 ++
 src/nv30_exa.c |  126 +++
 src/nv30_shaders.c |   25 +--
 src/nv30_xv_tex.c  |   35 +---
 src/nv40_exa.c |  110 ++---
 src/nv40_xv_tex.c  |   25 +--
 src/nv50_accel.c   |  124 +++
 src/nv50_accel.h   |   12 -
 src/nv50_exa.c |  182 --
 src/nv50_xv.c  |   51 ++
 src/nv_accel_common.c  |  176 ++---
 src/nv_const.h |2 
 src/nv_driver.c|   43 +
 src/nv_include.h   |3 
 src/nv_proto.h |   20 ++
 src/nv_type.h  |4 
 src/nvc0_accel.c   |  196 
 src/nvc0_accel.h   |   17 --
 src/nvc0_exa.c |  363 +
 src/nvc0_xv.c  |  104 ++--
 29 files changed, 1706 insertions(+), 1428 deletions(-)

New commits:
commit ab7291d368ddc66ad21c5ad5caa0faeee42ccaf1
Author: Ben Skeggs 
Date:   Wed Mar 21 14:56:55 2012 +1000

xv: don't try to init textured video without 3d engine object

Signed-off-by: Ben Skeggs 

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index ad203a0..54ae3be 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -2022,6 +2022,28 @@ NV50SetupTexturedVideo (ScreenPtr pScreen)
return adapt;
 }
 
+void
+NVSetupTexturedVideo (ScreenPtr pScreen, XF86VideoAdaptorPtr *textureAdaptor)
+{
+   ScrnInfoPtr  pScrn = xf86Screens[pScreen->myNum];
+   NVPtrpNv = NVPTR(pScrn);
+
+   if (!pNv->Nv3D)
+   return;
+
+   if (pNv->Architecture == NV_ARCH_30) {
+   textureAdaptor[0] = NV30SetupTexturedVideo(pScreen, FALSE);
+   textureAdaptor[1] = NV30SetupTexturedVideo(pScreen, TRUE);
+   } else
+   if (pNv->Architecture == NV_ARCH_40) {
+   textureAdaptor[0] = NV40SetupTexturedVideo(pScreen, FALSE);
+   textureAdaptor[1] = NV40SetupTexturedVideo(pScreen, TRUE);
+   } else
+   if (pNv->Architecture >= NV_ARCH_50) {
+   textureAdaptor[0] = NV50SetupTexturedVideo(pScreen);
+   }
+}
+
 /**
  * NVInitVideo
  * tries to initialize the various supported adapters
@@ -2056,17 +2078,7 @@ NVInitVideo(ScreenPtr pScreen)
blitAdaptor= NVSetupBlitVideo(pScreen);
}
 
-   if (pNv->Architecture == NV_ARCH_30) {
-   textureAdaptor[0] = NV30SetupTexturedVideo(pScreen, 
FALSE);
-   textureAdaptor[1] = NV30SetupTexturedVideo(pScreen, 
TRUE);
-   } else
-   if (pNv->Architecture == NV_ARCH_40) {
-   textureAdaptor[0] = NV40SetupTexturedVideo(pScreen, 
FALSE);
-   textureAdaptor[1] = NV40SetupTexturedVideo(pScreen, 
TRUE);
-   } else
-   if (pNv->Architecture >= NV_ARCH_50) {
-   textureAdaptor[0] = NV50SetupTexturedVideo(pScreen);
-   }
+   NVSetupTexturedVideo(pScreen, textureAdaptor);
}
 
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);

commit fe7e0425a4a43b2a7d4743a0a90a86724c3b6775
Author: Ben Skeggs 
Date:   Mon Mar 12 11:59:29 2012 +1000

recognise kepler

Signed-off-by: Ben Skeggs 

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 667a0a7..56865e2 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -265,6 +265,7 @@ NVPciProbe(DriverPtr drv, int entity_num, struct pci_device 
*pci_dev,
case 0xa0:
case 0xc0:
case 0xd0:
+   case 0xe0:
break;
default:
xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
@@ -694,6 +695,9 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
case 0xd0:
pNv->Architecture = NV_ARCH_C0;
break;
+   case 0xe0:
+   pNv->Architecture = NV_ARCH_E0;
+   break;
default:
return FALSE;
}
diff --git a/src/nv_type.h b/src/nv_type.h
index 73328fc..c8f27ac 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -25,6 +25,7 @@
 #define NV_ARCH_40  0x40
 #define NV_ARCH_50  0x50
 #define NV_ARCH_C0  0xc0
+#define NV_ARCH_E0  0xe0
 
 /* NV50 */
 typedef struct _NVRec *NVPtr;

commit f5d1cd2cb6808838ae1a188cef888eaa9582c76d
Author: Ben Skeggs 
Date:   Tue Mar 6 08:16:51 2012 +1000


xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-05-23 Thread Maarten Lankhorst
 configure.ac  |2 
 src/Makefile.am   |4 
 src/drmmode_display.c |   30 -
 src/nouveau_dri2.c|   32 -
 src/nouveau_exa.c |   29 -
 src/nouveau_local.h   |  186 ++---
 src/nouveau_wfb.c |4 
 src/nouveau_xv.c  |   69 ++-
 src/nv04_accel.h  |   83 
 src/nv04_exa.c|  524 --
 src/nv04_xv_blit.c|  262 ++---
 src/nv10_exa.c|  857 +++
 src/nv30_exa.c|  975 +
 src/nv30_shaders.c|  347 -
 src/nv30_shaders.h|   72 ---
 src/nv30_xv_tex.c |  302 +--
 src/nv40_exa.c|  994 +++---
 src/nv40_xv_tex.c |  293 ++
 src/nv50_accel.c  |  670 +
 src/nv50_accel.h  |   66 ++-
 src/nv50_exa.c|  895 -
 src/nv50_xv.c |  381 +++
 src/nv_accel_common.c |  582 ++---
 src/nv_dma.c  |   77 ++-
 src/nv_dma.h  |4 
 src/nv_driver.c   |   43 +-
 src/nv_include.h  |   11 
 src/nv_proto.h|7 
 src/nv_shadow.c   |3 
 src/nv_type.h |   53 +-
 src/nvc0_accel.c  |  841 +-
 src/nvc0_accel.h  |  120 +++---
 src/nvc0_exa.c|  974 +++-
 src/nvc0_shader.h |  444 ++
 src/nvc0_xv.c |  374 +++---
 src/nve0_shader.h |  460 +++
 36 files changed, 5568 insertions(+), 5502 deletions(-)

New commits:
commit 581564466c47ab0435ecca3cf4d82c03e1b30259
Author: Francisco Jerez 
Date:   Tue May 8 14:02:44 2012 +0200

dri2: Don't try to page-flip pixmaps (fdo bug 49351).

Reported-by: Marcin Slusarz 
Signed-off-by: Francisco Jerez 

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 73f2fc1..7e47575 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -328,7 +328,7 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int 
frame,
type = DRI2_EXCHANGE_COMPLETE;
DamageRegionAppend(draw, ®);
 
-   if (DRI2CanFlip(draw)) {
+   if (nouveau_exa_pixmap_is_onscreen(dst_pix)) {
type = DRI2_FLIP_COMPLETE;
ret = drmmode_page_flip(draw, src_pix,
violate_oml(draw) ? NULL : s,

commit b1efc807392d372e6a232aad9d16ae6e1b1c1916
Author: Marcin Slusarz 
Date:   Sun Apr 15 13:46:42 2012 +0200

nv50: add missing pushbuf space check in NV50SyncToVBlank

Regression from "WIP: port to new libdrm".

diff --git a/src/nv50_accel.c b/src/nv50_accel.c
index e140db9..42b27f0 100644
--- a/src/nv50_accel.c
+++ b/src/nv50_accel.c
@@ -44,6 +44,9 @@ NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box)
if (!crtcs)
return;
 
+   if (!PUSH_SPACE(push, 10))
+   return;
+
BEGIN_NV04(push, SUBC_NVSW(0x0060), 2);
PUSH_DATA (push, pNv->vblank_sem->handle);
PUSH_DATA (push, 0);

commit 174f17072005971fee6e4eb76a273c3cc1aa10d3
Author: Ben Skeggs 
Date:   Tue Apr 24 21:55:03 2012 +1000

nv40/exa: return false from gradient picture setup

Not implemented yet.  Shouldn't hit this anyway, fallback in 
check_composite,
but, best be safe :)

Reported-by: Maarten Maathuis 
Signed-off-by: Ben Skeggs 

diff --git a/src/nv40_exa.c b/src/nv40_exa.c
index 10f15f1..2361552 100644
--- a/src/nv40_exa.c
+++ b/src/nv40_exa.c
@@ -233,7 +233,7 @@ NV40EXAPictSolid(NVPtr pNv, PicturePtr pPict, int unit)
 static Bool
 NV40EXAPictGradient(NVPtr pNv, PicturePtr pPict, int unit)
 {
-   return TRUE;
+   return FALSE;
 }
 
 static Bool

commit 60edf2a87b928f413385443335493cb27da30a48
Author: Ben Skeggs 
Date:   Tue Apr 24 10:54:51 2012 +1000

nv40/exa: support for solid pictures

Signed-off-by: Ben Skeggs 

diff --git a/src/nv04_accel.h b/src/nv04_accel.h
index 7100e85..e7b76c5 100644
--- a/src/nv04_accel.h
+++ b/src/nv04_accel.h
@@ -17,6 +17,7 @@
 #define PFP_NV12_BILINEAR 0x0700
 #define PFP_NV12_BICUBIC  0x0800
 #define XV_TABLE  0x1000
+#define SOLID(i) (0x2000 + (i) * 0x100)
 
 /* subchannel assignments */
 #define SUBC_M2MF(mthd)  0, (mthd)
diff --git a/src/nv40_exa.c b/src/nv40_exa.c
index fb9ec80..10f15f1 100644
--- a/src/nv40_exa.c
+++ b/src/nv40_exa.c
@@ -181,9 +181,64 @@ NV40_SetupBlend(ScrnInfoPtr pScrn, nv_pict_op_t *blend,
 }
 
 static Bool
-NV40EXATexture(ScrnInfoPtr pScrn, PixmapPtr pPix, PicturePtr pPict, int unit)
+NV40EXAPictSolid(NVPtr pNv, PicturePtr pPict, int unit)
+{
+   struct nouveau_pushbuf *push = pNv->pushbuf;
+
+   PUSH_DATAu(push, pNv->scratch, SOLID(unit), 2);
+   PUSH_DATA (push, pPict->pSourcePict->solidFill.colo

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-05-29 Thread Maarten Lankhorst
 src/Makefile.am   |1 +
 src/compat-api.h  |   41 +
 src/drmmode_display.c |   16 
 src/nouveau_dri2.c|   20 ++--
 src/nouveau_exa.c |   14 +++---
 src/nouveau_xv.c  |   16 
 src/nv04_exa.c|   14 +++---
 src/nv10_exa.c|8 
 src/nv30_exa.c|6 +++---
 src/nv40_exa.c|6 +++---
 src/nv50_accel.c  |2 +-
 src/nv50_exa.c|2 +-
 src/nv_accel_common.c |2 +-
 src/nv_dma.c  |6 ++
 src/nv_driver.c   |4 ++--
 src/nv_include.h  |2 ++
 src/nvc0_exa.c|2 +-
 src/vl_hwmc.c |6 --
 18 files changed, 110 insertions(+), 58 deletions(-)

New commits:
commit ace77b6b1304826f4004bde23809b55d476b0615
Author: Ben Skeggs 
Date:   Tue May 29 21:21:57 2012 +1000

disable fermi accel on 0.0.16 interface

Kepler accel support broke some assumption made by the older kernel
interface, and Fermi shares the same code.  It can't work (without
some annoying hacks anyway) with the 0.0.16 kernel anymore.

diff --git a/src/nv_dma.c b/src/nv_dma.c
index 3b75ca9..1757f4d 100644
--- a/src/nv_dma.c
+++ b/src/nv_dma.c
@@ -36,6 +36,12 @@ NVInitDma(ScrnInfoPtr pScrn)
int size, ret;
void *data;
 
+   if (pNv->dev->drm_version < 0x0100 && pNv->dev->chipset >= 0xc0) {
+   xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+  "Fermi acceleration not supported on old kernel\n");
+   return FALSE;
+   }
+
if (pNv->Architecture < NV_ARCH_C0) {
data = &nv04_data;
size = sizeof(nv04_data);

commit 7041e30ab8beb627bbf569367961a658e79c2bdc
Author: Dave Airlie 
Date:   Wed May 23 14:18:24 2012 +0100

vl_hwmc: add missing compat include.

Reported-by: tallica on irc.
Signed-off-by: Dave Airlie 

diff --git a/src/vl_hwmc.c b/src/vl_hwmc.c
index 32eb258..ecad0b4 100644
--- a/src/vl_hwmc.c
+++ b/src/vl_hwmc.c
@@ -9,6 +9,8 @@
 #include 
 #include 
 
+#include "compat-api.h"
+
 #define FOURCC_RGB 0x003
 #define XVIMAGE_RGB
\
 {  
\

commit 2abf8467cfb7a7648ce73ba5bcbbc62219d65d6d
Author: Dave Airlie 
Date:   Wed May 23 11:29:05 2012 +0100

nouveau: add compat-api.h to makefile.

Signed-off-by: Dave Airlie 

diff --git a/src/Makefile.am b/src/Makefile.am
index 0bdd780..6aeb486 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,6 +60,7 @@ nouveau_drv_la_SOURCES = \
 nvc0_exa.c \
 nvc0_xv.c \
 drmmode_display.c \
+compat-api.h \
 vl_hwmc.c \
 vl_hwmc.h
 

commit 1d861ad716861c57b2b81531d21840d7c8de024b
Author: Dave Airlie 
Date:   Wed May 23 11:15:06 2012 +0100

nouveau: convert two more xf86Screens access to macros

for some reason the script missed these two, just fix them manually.

Signed-off-by: Dave Airlie 

diff --git a/src/nv50_exa.c b/src/nv50_exa.c
index cd99e10..1212eb6 100644
--- a/src/nv50_exa.c
+++ b/src/nv50_exa.c
@@ -27,7 +27,7 @@
 #include "nv50_accel.h"
 
 #define NV50EXA_LOCALS(p)  
\
-   ScrnInfoPtr pScrn = xf86Screens[(p)->drawable.pScreen->myNum]; \
+   ScrnInfoPtr pScrn = xf86ScreenToScrn((p)->drawable.pScreen); \
NVPtr pNv = NVPTR(pScrn);  \
struct nouveau_pushbuf *push = pNv->pushbuf; (void)push;
 
diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c
index c68b3fb..9d23a91 100644
--- a/src/nvc0_exa.c
+++ b/src/nvc0_exa.c
@@ -28,7 +28,7 @@
 #define NOUVEAU_BO(a, b, c) (NOUVEAU_BO_##a | NOUVEAU_BO_##b | NOUVEAU_BO_##c)
 
 #define NVC0EXA_LOCALS(p)  
\
-   ScrnInfoPtr pScrn = xf86Screens[(p)->drawable.pScreen->myNum]; \
+   ScrnInfoPtr pScrn = xf86ScreenToScrn((p)->drawable.pScreen); \
NVPtr pNv = NVPTR(pScrn);  \
struct nouveau_pushbuf *push = pNv->pushbuf; (void)push;
 

commit 5625fb84efc699e65da0062ae101915a49f2969b
Author: Dave Airlie 
Date:   Wed May 23 11:13:30 2012 +0100

nouveau: convert scrn/screen to using new interfaces

This commit was generated with the util/modular/x-driver-screen-scrn-conv.sh

Signed-off-by: Dave Airlie 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 23e8232..7211427 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -117,7 +117,7 @@ static PixmapPtr
 drmmode_pixmap_wrap(ScreenPtr pScreen, int width, int height, int depth,
int bpp, int pitch, struct nouveau_bo *bo, void *data)

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-06-08 Thread Maarten Lankhorst
 src/compat-api.h  |   55 ++
 src/drmmode_display.c |2 -
 src/nouveau_exa.c |9 ++
 src/nv04_exa.c|   15 +-
 src/nv50_accel.c  |   23 
 src/nv50_accel.h  |5 ++-
 src/nv50_exa.c|   59 +
 src/nv_accel_common.c |4 ++
 src/nv_const.h|2 +
 src/nv_dma.c  |   38 ++
 src/nv_driver.c   |   71 +++---
 src/nv_proto.h|   10 ++-
 src/nv_type.h |6 
 src/nvc0_accel.c  |   21 ++
 src/nvc0_exa.c|   59 +
 15 files changed, 331 insertions(+), 48 deletions(-)

New commits:
commit 4dbc132f22721e3da30eb2e7fc97dea5b8458df6
Author: Viktor Novotný 
Date:   Sat May 26 22:15:20 2012 +0200

nv04/exa: Reset destination surface offset in the same call of NV04EXACopy

Fixes FDO bug #48954.

Signed-off-by: Viktor Novotný 
Reviewed-by: Marcin Slusarz 
Signed-off-by: Ben Skeggs 

diff --git a/src/nv04_exa.c b/src/nv04_exa.c
index 7ede9d9..ca92868 100644
--- a/src/nv04_exa.c
+++ b/src/nv04_exa.c
@@ -220,7 +220,7 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, 
int dstY,
int split_dstY = NOUVEAU_ALIGN(dstY + 1, 64);
int split_height = split_dstY - dstY;
 
-   if (nouveau_pushbuf_space(push, 16, 1, 0))
+   if (nouveau_pushbuf_space(push, 16, 2, 0))
return;
 
if ((width * height) >= 20 && pNv->pspix != pNv->pdpix &&
@@ -249,7 +249,13 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, 
int dstY,
height -= split_height;
dstY = 0;
pNv->pmpix = pdpix;
-   } else
+   }
+
+   BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
+   PUSH_DATA (push, (srcY << 16) | srcX);
+   PUSH_DATA (push, (dstY << 16) | dstX);
+   PUSH_DATA (push, (height  << 16) | width);
+
if (pNv->pmpix) {
struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix);
 
@@ -258,11 +264,6 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, 
int dstY,
pNv->pmpix = NULL;
}
 
-   BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
-   PUSH_DATA (push, (srcY << 16) | srcX);
-   PUSH_DATA (push, (dstY << 16) | dstX);
-   PUSH_DATA (push, (height  << 16) | width);
-
if ((width * height) >= 512)
PUSH_KICK(push);
 }

commit aab58ee9a8025422416458d637c203af5ba008fd
Author: Dave Airlie 
Date:   Tue Jun 5 12:34:06 2012 +0100

nouveau: i is used inside the function

fixes build, reported by tallica on irc.

Signed-off-by: Dave Airlie 

diff --git a/src/compat-api.h b/src/compat-api.h
index d0f8c1d..b1591b1 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -46,7 +46,7 @@
 #define SCREEN_ARG_TYPE int
 #define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
 
-#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char 
**argv
 
 #define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, 
pointer pReadmask
 #define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask

commit 619e99731f772ff8d9d93cd1d6d83de5d450574b
Author: Dave Airlie 
Date:   Tue Jun 5 11:02:54 2012 +0100

nouveau: port to compat server API.

This ports to the new server API.

Signed-off-by: Dave Airlie 

diff --git a/src/compat-api.h b/src/compat-api.h
index 1bb7724..d0f8c1d 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -38,4 +38,59 @@
 #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
 #endif
 
+#ifndef XF86_SCRN_INTERFACE
+
+#define SCRN_ARG_TYPE int
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
+
+#define SCREEN_ARG_TYPE int
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
+
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, 
pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
+
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
+
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
+
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
+#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
+
+#define VT_FUNC_ARGS_DECL int arg, int flags
+#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
+
+#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
+
+#define SCREEN_ARG_TYPE ScreenPtr
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
+
+#define SCREE

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-06-14 Thread Maarten Lankhorst
 src/nouveau_dri2.c |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 36d3f8c28c55c05ccf4efa985831d2d249bad2fe
Author: Ben Skeggs 
Date:   Wed Jun 13 22:41:58 2012 +1000

dri2: kill debug spam

Signed-off-by: Ben Skeggs 

diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 27627e6..0b3cc38 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -607,7 +607,6 @@ nouveau_dri2_flip_event_handler(unsigned int frame, 
unsigned int tv_sec,
ScreenPtr screen;
ScrnInfoPtr scrn;
int status;
-   PixmapPtr pixmap;
 
status = dixLookupDrawable(&draw, flip->draw, serverClient,
   M_ANY, DixWriteAccess);
@@ -619,12 +618,6 @@ nouveau_dri2_flip_event_handler(unsigned int frame, 
unsigned int tv_sec,
screen = draw->pScreen;
scrn = xf86ScreenToScrn(screen);
 
-   pixmap = screen->GetScreenPixmap(screen);
-   xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, 4,
-  "%s: flipevent : width %d x height %d : msc %d : ust = 
%d.%06d\n",
-  __func__, pixmap->drawable.width, 
pixmap->drawable.height,
-  frame, tv_sec, tv_usec);
-
/* We assume our flips arrive in order, so we don't check the frame */
switch (flip->action) {
case SWAP:


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1sf4qf-00060a...@vasks.debian.org



xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-06-18 Thread Sven Joachim
 configure.ac  |2 -
 src/Makefile.am   |   48 
 src/nouveau_exa.c |   91 +-
 src/nouveau_xv.c  |5 --
 src/nv50_accel.h  |8 ++--
 src/nv_driver.c   |   25 +-
 src/nv_type.h |7 +---
 7 files changed, 102 insertions(+), 84 deletions(-)

New commits:
commit 6dbf4ea12600275775123f9f564469454415da55
Author: Ben Skeggs 
Date:   Mon Jun 18 13:28:07 2012 +1000

bump version to 1.0.0

Signed-off-by: Ben Skeggs 

diff --git a/configure.ac b/configure.ac
index afb6cde..cc8732b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[0.0.16],
+[1.0.0],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 5e74cee90eeb4e8e638b371a5f1a2c6737be70ff
Author: Ben Skeggs 
Date:   Mon Jun 18 15:36:47 2012 +1000

distcheck fixes

diff --git a/src/Makefile.am b/src/Makefile.am
index 6aeb486..bf9c967 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,19 +30,12 @@ nouveau_drv_la_LDFLAGS = -module -avoid-version 
@LIBDRM_NOUVEAU_LIBS@ \
 nouveau_drv_ladir = @moduledir@/drivers
 
 nouveau_drv_la_SOURCES = \
-nouveau_class.h nouveau_local.h \
 nouveau_exa.c nouveau_xv.c nouveau_dri2.c \
 nouveau_wfb.c \
-nv_accel_common.c nv04_accel.h \
-nv_const.h \
+nv_accel_common.c \
 nv_dma.c \
-nv_dma.h \
 nv_driver.c \
-nv_include.h \
-nv_proto.h \
-nv_rop.h \
 nv_shadow.c \
-nv_type.h \
 nv04_exa.c \
 nv04_xv_ovl.c \
 nv04_xv_blit.c \
@@ -52,15 +45,42 @@ nouveau_drv_la_SOURCES = \
 nv30_xv_tex.c \
 nv40_exa.c \
 nv40_xv_tex.c \
-nv50_accel.c nv50_accel.h \
+nv50_accel.c \
 nv50_exa.c \
 nv50_xv.c \
-nv50_texture.h \
-nvc0_accel.c nvc0_accel.h \
+nvc0_accel.c \
 nvc0_exa.c \
 nvc0_xv.c \
 drmmode_display.c \
-compat-api.h \
-vl_hwmc.c \
-vl_hwmc.h
+vl_hwmc.c
+
+EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \
+hwdefs/nv_m2mf.xml.h \
+hwdefs/nv_object.xml.h \
+hwdefs/nv01_2d.xml.h \
+hwdefs/nv10_3d.xml.h \
+hwdefs/nv30-40_3d.xml.h \
+hwdefs/nv50_2d.xml.h \
+hwdefs/nv50_3d.xml.h \
+hwdefs/nv50_defs.xml.h \
+hwdefs/nv50_texture.h \
+hwdefs/nvc0_3d.xml.h \
+hwdefs/nvc0_m2mf.xml.h \
+nouveau_local.h \
+nv_const.h \
+nv_dma.h \
+nv_include.h \
+nv_proto.h \
+nv_rop.h \
+nv_type.h \
+nv04_accel.h \
+nv50_accel.h \
+nvc0_accel.h \
+nvc0_shader.h \
+nve0_shader.h \
+compat-api.h \
+vl_hwmc.c \
+vl_hwmc.h
+
+
 

commit 383aef5a8882a65efdf34e8d2681cd5ccec51b22
Author: Ben Skeggs 
Date:   Mon Jun 18 13:31:37 2012 +1000

exa: drop massive gart allocation in favour of smaller ones, as needed

Signed-off-by: Ben Skeggs 

diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index fb27b1e..55dce99 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -164,6 +164,34 @@ nv50_style_tiled_pixmap(PixmapPtr ppix)
   nouveau_pixmap_bo(ppix)->config.nv50.memtype;
 }
 
+static int
+nouveau_exa_scratch(NVPtr pNv, int size, struct nouveau_bo **pbo, int *off)
+{
+   struct nouveau_bo *bo;
+   int ret;
+
+   if (!pNv->transfer ||
+pNv->transfer->size <= pNv->transfer_offset + size) {
+   ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP,
+0, NOUVEAU_ALIGN(size, 1 * 1024 * 1024),
+NULL, &bo);
+   if (ret == 0)
+   ret = nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client);
+   if (ret != 0)
+   return ret;
+
+   nouveau_bo_ref(bo, &pNv->transfer);
+   pNv->transfer_offset = 0;
+   }
+
+   *off = pNv->transfer_offset;
+   *pbo = pNv->transfer;
+
+   pNv->transfer_offset += size + 0xff;
+   pNv->transfer_offset &= ~0xff;
+   return 0;
+}
+
 static Bool
 nouveau_exa

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2012-06-19 Thread Sven Joachim
 configure.ac  |2 -
 src/nouveau_exa.c |   12 ++---
 src/nv10_exa.c|4 +--
 src/nv30_exa.c|6 ++--
 src/nv30_xv_tex.c |2 -
 src/nv40_exa.c|6 ++--
 src/nv40_xv_tex.c |2 -
 src/nv50_accel.h  |   12 -
 src/nvc0_accel.h  |   28 +-
 src/nve0_shader.h |   66 ++
 10 files changed, 63 insertions(+), 77 deletions(-)

New commits:
commit 0d2b414aff634c996e0468bb0df1894d6c28c09e
Author: Ben Skeggs 
Date:   Tue Jun 19 10:12:37 2012 +1000

bump version to 1.0.1

diff --git a/configure.ac b/configure.ac
index cc8732b..af126fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.0],
+[1.0.1],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit f84c28c9e6a0079e527655994689cb9c2ba51999
Author: Ben Skeggs 
Date:   Tue Jun 19 09:49:02 2012 +1000

exa: fix remaining signed datatype issues

Wasn't expecting this situation, apparently it happens..

Signed-off-by: Ben Skeggs 

diff --git a/src/nv10_exa.c b/src/nv10_exa.c
index a3f7df3..cb9eb7c 100644
--- a/src/nv10_exa.c
+++ b/src/nv10_exa.c
@@ -594,9 +594,9 @@ PUSH_VTX2s(struct nouveau_pushbuf *push,
   int x1, int y1, int x2, int y2, int dx, int dy)
 {
BEGIN_NV04(push, NV10_3D(VERTEX_TX0_2I), 1);
-   PUSH_DATA (push, (y1 << 16) | x1);
+   PUSH_DATA (push, ((y1 & 0x) << 16) | (x1 & 0x));
BEGIN_NV04(push, NV10_3D(VERTEX_TX1_2I), 1);
-   PUSH_DATA (push, (y2 << 16) | x2);
+   PUSH_DATA (push, ((y2 & 0x) << 16) | (x2 & 0x));
BEGIN_NV04(push, NV10_3D(VERTEX_POS_3F_X), 3);
PUSH_DATAf(push, dx);
PUSH_DATAf(push, dy);
diff --git a/src/nv30_exa.c b/src/nv30_exa.c
index 9be52e5..95509bc 100644
--- a/src/nv30_exa.c
+++ b/src/nv30_exa.c
@@ -545,10 +545,10 @@ PUSH_VTX2s(struct nouveau_pushbuf *push,
   int x1, int y1, int x2, int y2, int dx, int dy)
 {
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2);
-   PUSH_DATA (push, (y1 << 16) | x1);
-   PUSH_DATA (push, (y2 << 16) | x2);
+   PUSH_DATA (push, ((y1 & 0x) << 16) | (x1 & 0x));
+   PUSH_DATA (push, ((y2 & 0x) << 16) | (x2 & 0x));
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1);
-   PUSH_DATA (push, (dy << 16) | dx);
+   PUSH_DATA (push, ((dy & 0x) << 16) | (dx & 0x));
 }
 
 void
diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c
index 33c5602..bf75cfa 100644
--- a/src/nv30_xv_tex.c
+++ b/src/nv30_xv_tex.c
@@ -167,7 +167,7 @@ NV30StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool 
Exit)
PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy));\
PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0);\
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1);  \
-   PUSH_DATA (push, ((dy)<<16)|(dx)); \
+   PUSH_DATA (push, (((dy)&0x)<<16)|((dx)&0x));   \
 } while(0)
 
 int
diff --git a/src/nv40_exa.c b/src/nv40_exa.c
index ce0d78a..977c855 100644
--- a/src/nv40_exa.c
+++ b/src/nv40_exa.c
@@ -527,10 +527,10 @@ PUSH_VTX2s(struct nouveau_pushbuf *push,
   int x1, int y1, int x2, int y2, int dx, int dy)
 {
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2);
-   PUSH_DATA (push, (y1 << 16) | x1);
-   PUSH_DATA (push, (y2 << 16) | x2);
+   PUSH_DATA (push, ((y1 & 0x) << 16) | (x1 & 0x));
+   PUSH_DATA (push, ((y2 & 0x) << 16) | (x2 & 0x));
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1);
-   PUSH_DATA (push, (dy << 16) | dx);
+   PUSH_DATA (push, ((dy & 0x) << 16) | (dx & 0x));
 }
 
 void
diff --git a/src/nv40_xv_tex.c b/src/nv40_xv_tex.c
index 9f2e336..79ef1fc 100644
--- a/src/nv40_xv_tex.c
+++ b/src/nv40_xv_tex.c
@@ -167,7 +167,7 @@ NV40StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool 
Exit)
PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy));\
PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0);\
BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1);  \
-   PUSH_DATA (push, ((dy)<<16)|(dx)); \
+   PUSH_DATA (push, (((dy)&0x)<<16)|((dx)&0x));   \
 } while(0)
 
 int
diff --git a/src/nv50_accel.h b/src/nv50_accel.h
index 24f0fa8..87c88a3 100644
--- a/src/nv50_accel.h
+++ b/src/nv50_accel.h
@@ -53,20 +53,18 @@ PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float 
sy, int dx, int dy)
PUSH_DATAf(push, sx);
PUSH_DATAf(push, sy);
BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1);
-   PUSH_DATA (push, (dy << 16) | dx);
+   PUSH_DATA (push, ((dy & 0x) << 16) | (dx & 0x));
 }
 
 static __inline__ void
 PUSH_VTX2s(struct nouveau_pushbuf *push,
  

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2011-12-01 Thread Sven Joachim
 src/drmmode_display.c   |1 
 src/hwdefs/nv01_2d.xml.h| 1416 ++
 src/hwdefs/nv10_3d.xml.h| 1637 +++
 src/hwdefs/nv30-40_3d.xml.h | 2052 +
 src/hwdefs/nv50_2d.xml.h|  434 ++
 src/hwdefs/nv50_3d.xml.h| 2127 ++
 src/hwdefs/nv50_defs.xml.h  |  155 
 src/hwdefs/nv50_texture.h   |  166 
 src/hwdefs/nv_3ddefs.xml.h  |   93 
 src/hwdefs/nv_m2mf.xml.h|  174 
 src/hwdefs/nv_object.xml.h  |  295 +
 src/hwdefs/nvc0_3d.xml.h| 1867 +
 src/hwdefs/nvc0_m2mf.xml.h  |  178 
 src/nouveau_class.h | 9084 
 src/nouveau_dri2.c  |   10 
 src/nouveau_exa.c   |   28 
 src/nouveau_xv.c|   23 
 src/nv04_exa.c  |   57 
 src/nv04_xv_blit.c  |   34 
 src/nv10_exa.c  |  205 
 src/nv30_exa.c  |  192 
 src/nv30_shaders.c  |   32 
 src/nv30_xv_tex.c   |  118 
 src/nv40_exa.c  |  181 
 src/nv40_xv_tex.c   |  110 
 src/nv50_accel.c|  141 
 src/nv50_accel.h|   14 
 src/nv50_defs.xml.h |  144 
 src/nv50_exa.c  |  101 
 src/nv50_texture.h  |  166 
 src/nv50_xv.c   |   69 
 src/nv_3ddefs.xml.h |   93 
 src/nv_accel_common.c   |  146 
 src/nv_driver.c |5 
 src/nv_include.h|1 
 src/nv_object.xml.h |  246 -
 src/nvc0_3d.xml.h   | 1093 -
 src/nvc0_accel.c|   18 
 src/nvc0_accel.h|7 
 src/nvc0_exa.c  |   39 
 src/nvc0_m2mf.xml.h |  138 
 src/nvc0_xv.c   |9 
 42 files changed, 11383 insertions(+), 11716 deletions(-)

New commits:
commit b5534a15a5f5e1c3bd6c92e3ed8391ff628c09bb
Author: Marcin Slusarz 
Date:   Wed Nov 30 18:56:54 2011 +0100

fix typo in conversion to rnn headers

diff --git a/src/nv40_exa.c b/src/nv40_exa.c
index be479a7..258f5cf 100644
--- a/src/nv40_exa.c
+++ b/src/nv40_exa.c
@@ -603,7 +603,7 @@ NV40EXADoneComposite(PixmapPtr pdPix)
 #define NV30_3D_CHIPSET_4X_MASK 0x0baf
 #define NV44TCL_CHIPSET_4X_MASK 0x5450
 Bool
-NVAccelInitNV30_3D(ScrnInfoPtr pScrn)
+NVAccelInitNV40TCL(ScrnInfoPtr pScrn)
 {
NVPtr pNv = NVPTR(pScrn);
struct nouveau_channel *chan = pNv->chan;
diff --git a/src/nv50_accel.c b/src/nv50_accel.c
index 2010eb9..98945b6 100644
--- a/src/nv50_accel.c
+++ b/src/nv50_accel.c
@@ -58,7 +58,7 @@ NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box)
 }
 
 Bool
-NVAccelInitNV50_3D(ScrnInfoPtr pScrn)
+NVAccelInitNV50TCL(ScrnInfoPtr pScrn)
 {
NVPtr pNv = NVPTR(pScrn);
struct nouveau_channel *chan = pNv->chan;

commit 5975ce34a12d1943b2852d0f5fbe09358754c2ad
Author: Ben Skeggs 
Date:   Wed Nov 30 17:40:02 2011 +1000

convert entire ddx to rnn headers

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3afef66..75ef6dd 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -496,7 +496,6 @@ drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr 
rotate_pixmap, void *dat
 {
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
-   NVPtr pNv = NVPTR(crtc->scrn);
 
if (rotate_pixmap)
FreeScratchPixmapHeader(rotate_pixmap);
diff --git a/src/hwdefs/nv01_2d.xml.h b/src/hwdefs/nv01_2d.xml.h
new file mode 100644
index 000..afae00c
--- /dev/null
+++ b/src/hwdefs/nv01_2d.xml.h
@@ -0,0 +1,1416 @@
+#ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV01_2D_XML
+#define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV01_2D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git 
repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- /home/skeggsb/git/envytools/rnndb/nv_objects.xml  (794 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/copyright.xml   (   6452 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml (   2696 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv_object.xml   (  12672 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nvchipsets.xml  (   3617 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv_defs.xml (   4437 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv50_defs.xml   (   5468 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml   (   2687 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv01_2d.xml (  32584 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml(   3000 bytes, from 
2011-10-22 08:01:09)
+- /home/skeggsb/git/envytools/rnndb/nv03_3d.xml (   5209 bytes, from 
2011-10-22 08:01:09)
+- /home/skeg

xserver-xorg-video-nouveau: Changes to 'upstream-unstable'

2017-06-21 Thread Sven Joachim
 configure.ac   |2 
 src/Makefile.am|   17 
 src/drmmode_display.c  |   31 +
 src/hwdefs/gm107_texture.xml.h |  365 +
 src/hwdefs/nvc0_3d.xml.h   |  867 -
 src/nouveau_copy.c |5 
 src/nouveau_dri2.c |   14 
 src/nouveau_exa.c  |3 
 src/nouveau_local.h|2 
 src/nouveau_present.c  |6 
 src/nouveau_xv.c   |4 
 src/nv_accel_common.c  |2 
 src/nv_driver.c|7 
 src/nv_proto.h |1 
 src/nv_type.h  |1 
 src/nvc0_accel.c   |   74 +++
 src/nvc0_accel.h   |   57 ++
 src/nvc0_exa.c |   71 ++-
 src/nvc0_xv.c  |  115 +++--
 src/shader/Makefile|   23 -
 src/shader/exac8nv110.fp   |   47 ++
 src/shader/exac8nv110.fpc  |   38 +
 src/shader/exacanv110.fp   |   47 ++
 src/shader/exacanv110.fpc  |   38 +
 src/shader/exacmnv110.fp   |   47 ++
 src/shader/exacmnv110.fpc  |   38 +
 src/shader/exas8nv110.fp   |   42 +
 src/shader/exas8nv110.fpc  |   28 +
 src/shader/exasanv110.fp   |   47 ++
 src/shader/exasanv110.fpc  |   38 +
 src/shader/exascnv110.fp   |   38 +
 src/shader/exascnv110.fpc  |   20 
 src/shader/videonv110.fp   |   54 ++
 src/shader/videonv110.fpc  |   52 ++
 src/shader/xfrm2nv110.vp   |   82 +++
 src/shader/xfrm2nv110.vpc  |  102 
 36 files changed, 1986 insertions(+), 439 deletions(-)

New commits:
commit a7c190e0c230ed2d5e047ed6aba12d71a4866950
Author: Lyude 
Date:   Fri Apr 21 14:41:17 2017 -0400

Bump version to 1.0.15

Signed-off-by: Lyude 

diff --git a/configure.ac b/configure.ac
index e494300..0b01d3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-nouveau],
-[1.0.14],
+[1.0.15],
 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
 [xf86-video-nouveau])
 

commit 3047e99a641d2b8720371aae292750206f5e91fc
Author: Ben Skeggs 
Date:   Thu Apr 20 15:57:33 2017 +1000

fix null pointer deref when building against >=libdrm 2.4.78

A new pointer got added to drmEventContext.

As a result of us both:
- Setting drmEventContext.version to "latest" AND
- Not zeroing the struct

We end up thwarting libdrm's compatibility checks, resulting in
libdrm choosing to call through an invalid pointer.

Fix this by zeroing the struct.

Signed-off-by: Ben Skeggs 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ae29d9a..2b71c9c 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1433,7 +1433,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
unsigned int crtcs_needed = 0;
int crtcshift;
 
-   drmmode = xnfalloc(sizeof *drmmode);
+   drmmode = xnfcalloc(sizeof(*drmmode), 1);
drmmode->fd = fd;
drmmode->fb_id = 0;
 

commit e9418e434311336e905b70553a5ed740838d90ad
Author: Mariusz Bialonczyk 
Date:   Wed Mar 29 22:07:50 2017 +0200

Do not register hotplug without RandR

When using Xinerama, RandR is automatically disabled, and calling RR
routines will trigger an assert() because the RR keys/resources are
not set, leading to an Xserver abort.

Hotplug makes little sense without RandR, so no need to install a
udev monitor if RandR is not available.

Ported from xf86-video-intel commit
1a489142c8e6a4828348cc9afbd0f430d3b1e2d8, original work by:
Chris Wilson 

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98383
Signed-off-by: Mariusz Bialonczyk 
Acked-by: Ilia Mirkin 

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index dd9fa27..ae29d9a 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1556,6 +1556,15 @@ drmmode_udev_notify(int fd, int notify, void *data)
 }
 #endif
 
+static bool has_randr(void)
+{
+#if HAS_DIXREGISTERPRIVATEKEY
+   return dixPrivateKeyRegistered(rrPrivKey);
+#else
+   return *rrPrivKey;
+#endif
+}
+
 static void
 drmmode_uevent_init(ScrnInfoPtr scrn)
 {
@@ -1564,6 +1573,12 @@ drmmode_uevent_init(ScrnInfoPtr scrn)
struct udev *u;
struct udev_monitor *mon;
 
+   /* RandR will be disabled if Xinerama is active, and so generating
+* RR hotplug events is then forbidden.
+*/
+   if (!has_randr())
+   return;
+
u = udev_new();
if (!u)
return;

commit e472b47d15634a864c8c981ed588d882aceaf26b
Author: Ilia Mirkin 
Date:   Tue Mar 21 21:25:33 2017 -0400

Add Pascal family support, identical to Maxwell

Signed-off-by: Ilia Mirkin 
Tested-by: Lyude 

diff --git a/src/nouveau_copy.c b/src/nouveau_copy.c
index 7118a7a..7fbcc87 100644
--- a/src/nouveau_copy.c
+++ b/src/nouveau_copy.c
@@ -42,6 +