configure.ac                    |   15 --
 debian/changelog                |    5 
 debian/compat                   |    2 
 debian/control                  |    2 
 debian/rules                    |    4 
 debian/upstream/signing-key.asc |  111 ++++++++++++++++++
 debian/watch                    |    1 
 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 
 54 files changed, 582 insertions(+), 629 deletions(-)

New commits:
commit cda88668e6b1a7ba553e51401217f715c627257c
Author: Sven Joachim <svenj...@gmx.de>
Date:   Thu Dec 10 18:48:54 2015 +0100

    Let uscan verify tarball signatures

diff --git a/debian/changelog b/debian/changelog
index b4ff0a5..8bca00e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xserver-xorg-video-nouveau (1:1.0.12-1) UNRELEASED; 
urgency=medium
 
   * New upstream release.
   * Bump debhelper compat level to 9.
+  * Let uscan verify tarball signatures.
   * Bump Standards-Version to 3.9.6, no changes needed.
   * Remove myself from Uploaders.
 
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..dfe9054
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,111 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBE6N4qMBEACtDFIAwKCQQlJmWDBChO+cPd/7f+6xt0onsFYwjTImhCM6VfjP
+Sk6V+o/tv6JO5hbuNIUW3hiwz4nZSAxrEtHAeTBL+XbXMQX/b3tKzXylYlHfp0md
+R444ErwOMqcp9ch5P6kCbATPNsu/7yWnJSzfdQXybz3HPbMeweI8Xcz6m2zfawRA
+Wg8h66s1ZLjspG4ZwEuShrmERrVDoq+1UaKq2stgngGBC/K9I9hBcGp3fLHWIMb8
+Kpzc4prmyZkZV6iy0B0nGrcRMdookb1NgFGNm1u+IJiSeQnvb6q4Sq5SGSu/hNUZ
+8KJxI1JSq10MFqmgwOXz4E7KeC7F0dHMVWcI03CZ0Y6tQN4Lk2iD67JECLmfwW+c
+70osNfO9d4XVcenwoZ3tL/UCnN9nxQtZ8zm5typh+J0MDcE8vZtiT4zbt9hSG2gZ
+2QNYNl3Rt+Kj3oI2AiTXxyhcjYqWUl14m6ydafkG27JhfbEWzUvV/Guj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k=
+=G7Eh
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/debian/watch b/debian/watch
index 0293126..3a4bc16 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 #git=git://anongit.freedesktop.org/nouveau/xf86-video-nouveau
 version=3
+opts=pgpsigurlmangle=s/$/.sig/ \
 http://xorg.freedesktop.org/releases/individual/driver/ 
xf86-video-nouveau-(.+)\.tar\.gz

commit 4efa8ceef9d8166c5cf6030724033c763bcb3377
Author: Sven Joachim <svenj...@gmx.de>
Date:   Thu Dec 10 18:37:26 2015 +0100

    Bump debhelper compat level to 9
    
    Needs another override for dh_auto_configure to avoid installing the
    driver into a multiarch directory.

diff --git a/debian/changelog b/debian/changelog
index 8b8db43..b4ff0a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-nouveau (1:1.0.12-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Bump debhelper compat level to 9.
   * Bump Standards-Version to 3.9.6, no changes needed.
   * Remove myself from Uploaders.
 
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index 59cbfca..9cbb1dd 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 # Uploaders: nobody, volunteers needed!
 Build-Depends:
- debhelper (>= 8),
+ debhelper (>= 9),
  dh-autoreconf,
  pkg-config,
  xserver-xorg-dev (>= 2:1.9.4),
diff --git a/debian/rules b/debian/rules
index 906a800..fe0a8e6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,9 @@ export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
 # Needed to find ChangeLog, and for verbose build logs:
 override_dh_auto_configure:
-       dh_auto_configure -- CURDIR="$(CURDIR)" --disable-silent-rules
+       dh_auto_configure -- CURDIR="$(CURDIR)" \
+                            --disable-silent-rules \
+                            --libdir=/usr/lib
 
 # Install in debian/tmp to retain control through dh_install:
 override_dh_auto_install:

commit f9e603041f2d0c24f8d8d8053a372b6301a7180e
Author: Sven Joachim <svenj...@gmx.de>
Date:   Thu Dec 10 18:04:54 2015 +0100

    New upstream release

diff --git a/debian/changelog b/debian/changelog
index 4bbcbec..8b8db43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-xserver-xorg-video-nouveau (1:1.0.11-2) UNRELEASED; urgency=medium
+xserver-xorg-video-nouveau (1:1.0.12-1) UNRELEASED; urgency=medium
 
+  * New upstream release.
   * Bump Standards-Version to 3.9.6, no changes needed.
   * Remove myself from Uploaders.
 

commit b18bc036bf9997ea65f5cbd824fd057931e604fe
Author: Ben Skeggs <bske...@redhat.com>
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 <bske...@redhat.com>

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 <mario.kleiner...@gmail.com>
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 <mario.kleiner...@gmail.com>
    Signed-off-by: Ben Skeggs <bske...@redhat.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index dc2e0ac..1dc48c5 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1211,7 +1211,7 @@ drmmode_zaphod_match(ScrnInfoPtr pScrn, const char *s, 
char *output_name)
 }
 
 static unsigned int
-drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
+drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int 
crtcshift)
 {
        NVPtr pNv = NVPTR(pScrn);
        xf86OutputPtr output;
@@ -1293,8 +1293,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, int num)
        output->subpixel_order = subpixel_conv_table[koutput->subpixel];
        output->driver_private = drmmode_output;
 
-       output->possible_crtcs = kencoder->possible_crtcs;
-       output->possible_clones = kencoder->possible_clones;
+       output->possible_crtcs = kencoder->possible_crtcs >> crtcshift;
+       output->possible_clones = kencoder->possible_clones >> crtcshift;
 
        output->interlaceAllowed = true;
        output->doubleScanAllowed = true;
@@ -1415,6 +1415,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
        NVEntPtr pNVEnt = NVEntPriv(pScrn);
        int i;
        unsigned int crtcs_needed = 0;
+       int crtcshift;
 
        drmmode = xnfalloc(sizeof *drmmode);
        drmmode->fd = fd;
@@ -1438,8 +1439,9 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
        }
 
        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing outputs ...\n");
+       crtcshift = ffs(pNVEnt->assigned_crtcs ^ 0xffffffff) - 1;
        for (i = 0; i < drmmode->mode_res->count_connectors; i++)
-               crtcs_needed += drmmode_output_init(pScrn, drmmode, i);
+               crtcs_needed += drmmode_output_init(pScrn, drmmode, i, 
crtcshift);
 
        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                   "%d crtcs needed for screen.\n", crtcs_needed);

commit 1ff13a922535924681b91452235b017e43a4c6f6
Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Sun Sep 13 15:29:15 2015 -0400

    fix build after glamor removal
    
    Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 6495961..dc2e0ac 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -104,7 +104,6 @@ drmmode_from_scrn(ScrnInfoPtr scrn)
 static inline struct nouveau_pixmap *
 drmmode_pixmap(PixmapPtr ppix)
 {
-       NVPtr pNv = NVPTR(xf86ScreenToScrn(ppix->drawable.pScreen));
        return nouveau_pixmap(ppix);
 }
 
diff --git a/src/nv_driver.c b/src/nv_driver.c
index c3bd41b..4dde8e0 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1051,12 +1051,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
        }
 
        if (pNv->AccelMethod == UNKNOWN) {
-#ifdef HAVE_GLAMOR
-               if (pNv->Architecture >= NV_MAXWELL)
-                       pNv->AccelMethod = GLAMOR;
-               else
-#endif
-                       pNv->AccelMethod = EXA;
+               pNv->AccelMethod = EXA;
        }
 
        if (xf86ReturnOptValBool(pNv->Options, OPTION_NOACCEL, FALSE)) {
@@ -1084,10 +1079,9 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 
        /* Define maximum allowed level of DRI implementation to use.
         * We default to DRI2 on EXA for now, as DRI3 still has some
-        * problems. However, the max_dri_level can be only honored
-        * by EXA, as GLAMOR only supports DRI3 at the moment.
+        * problems.
         */
-       pNv->max_dri_level = (pNv->AccelMethod == GLAMOR) ? 3 : 2;
+       pNv->max_dri_level = 2;
        from = X_DEFAULT;
 
        if (xf86GetOptValInteger(pNv->Options, OPTION_DRI,

commit 3bb943b33bbe8e593afc00d13fe867dd7a708c3c
Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Thu Aug 21 20:36:41 2014 -0400

    xv: use correct max width/height settings
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70931
    Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>

diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c
index a82ef2c..d514dbf 100644
--- a/src/nouveau_xv.c
+++ b/src/nouveau_xv.c
@@ -1068,6 +1068,8 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, 
short drw_x,
        if (pPriv->grabbedByV4L)
                return Success;
 
+       if (width > pPriv->max_image_dim || height > pPriv->max_image_dim)
+               return BadMatch;
 
        NV_set_action_flags(pScrn, pDraw, pPriv, id, drw_x, drw_y, drw_w,
                            drw_h, &action_flags);
@@ -1441,11 +1443,6 @@ NVQueryImageAttributes(ScrnInfoPtr pScrn, int id,
 {
        int size, tmp;
 
-       if (*w > IMAGE_MAX_W)
-               *w = IMAGE_MAX_W;
-       if (*h > IMAGE_MAX_H)
-               *h = IMAGE_MAX_H;
-
        *w = (*w + 1) & ~1; // width rounded up to an even number
        if (offsets)
                offsets[0] = 0;
@@ -1706,6 +1703,7 @@ NVSetupBlitVideo (ScreenPtr pScreen)
        pPriv->bicubic                  = FALSE;
        pPriv->doubleBuffer             = FALSE;
        pPriv->SyncToVBlank             = (pNv->dev->chipset >= 0x11);
+       pPriv->max_image_dim            = 2048;
 
        pNv->blitAdaptor                = adapt;
 
@@ -1766,6 +1764,7 @@ NVSetupOverlayVideoAdapter(ScreenPtr pScreen)
        pPriv->blitter                  = FALSE;
        pPriv->texture                  = FALSE;
        pPriv->bicubic                  = FALSE;
+       pPriv->max_image_dim            = 2048;
 
        NVSetPortDefaults (pScrn, pPriv);
 
@@ -1967,6 +1966,7 @@ NV30SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic)
        pPriv->bicubic                  = bicubic;
        pPriv->doubleBuffer             = FALSE;
        pPriv->SyncToVBlank             = TRUE;
+       pPriv->max_image_dim            = 4096;
 
        if (bicubic)
                pNv->textureAdaptor[1]  = adapt;
@@ -2048,6 +2048,7 @@ NV40SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic)
        pPriv->bicubic                  = bicubic;
        pPriv->doubleBuffer             = FALSE;
        pPriv->SyncToVBlank             = TRUE;
+       pPriv->max_image_dim            = 4096;
 
        if (bicubic)
                pNv->textureAdaptor[1]  = adapt;
diff --git a/src/nv50_xv.c b/src/nv50_xv.c
index 1c467f4..b2541b9 100644
--- a/src/nv50_xv.c
+++ b/src/nv50_xv.c
@@ -364,6 +364,7 @@ nv50_xv_set_port_defaults(ScrnInfoPtr pScrn, NVPortPrivPtr 
pPriv)
        pPriv->saturation       = 0;
        pPriv->hue              = 0;
        pPriv->iturbt_709       = 0;
+       pPriv->max_image_dim    = 8192;
 }
 
 int
diff --git a/src/nv_type.h b/src/nv_type.h
index d903e75..d7bb4f4 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -165,6 +165,7 @@ typedef struct _NVPortPrivRec {
        Bool            texture;
        Bool            bicubic; /* only for texture adapter */
        Bool            SyncToVBlank;
+       int             max_image_dim;
        struct nouveau_bo *video_mem;
        int             pitch;
        int             offset;

commit 3e2e0faa2ee1cce9c1bb5c7ad80d0592460f3edc
Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Sat Jul 11 17:16:27 2015 -0400

    remove maxwell GM10x support for now
    
    There is no EXA acceleration, and now no GLAMOR either.
    User is better off with modesetting until EXA makes an appearance.
    
    Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>

diff --git a/src/nv_driver.c b/src/nv_driver.c
index ab7e127..c3bd41b 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -389,10 +389,9 @@ NVHasKMS(struct pci_device *pci_dev, struct 
xf86_platform_device *platform_dev)
        case 0xe0:
        case 0xf0:
        case 0x100:
-       case 0x110:
                break;
        default:
-               xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
+               xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02X\n", chipset);
                return FALSE;
        }
        return TRUE;

commit 1f8b2b348526d94e9bde4a285f331a4934c11078
Author: Ilia Mirkin <imir...@alum.mit.edu>
Date:   Sat Jul 11 17:08:52 2015 -0400

    glamor: remove
    
    If you want glamor, just use modesetting instead. It's hooked up
    incorrectly in nouveau, and there doesn't seem to be any point in fixing
    it when the modesetting driver does it all properly.
    
    Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>

diff --git a/configure.ac b/configure.ac
index 03563c1..9c77f94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,17 +140,6 @@ if test "x$have_list_h" = xyes; then
                    #include "list.h"])
 fi
 
-AC_CHECK_HEADERS([glamor.h],[found_glamor_header=yes],[found_glamor_header=no],
-                [#include "xorg-server.h"])
-AC_MSG_CHECKING([whether to include GLAMOR support])
-if test "x$found_glamor_header" = xyes && pkg-config --exists "xorg-server >= 
1.15.99.901"
-then
-       AC_DEFINE(HAVE_GLAMOR, 1, [Build support for glamor acceleration])
-       AC_MSG_RESULT([yes])
-else
-       AC_MSG_RESULT([no])
-fi
-
 AC_CONFIG_FILES([
        Makefile
        src/Makefile
diff --git a/man/nouveau.man b/man/nouveau.man
index 3d5a428..64e4144 100644
--- a/man/nouveau.man
+++ b/man/nouveau.man
@@ -81,8 +81,7 @@ are supported:
 Enable or disable the HW cursor.  Default: on.
 .TP
 .BI "Option \*qAccelMethod\*q \*q" string \*q
-Specify the acceleration method. One of \*qnone\*q, \*qexa\*q, or
-\*qglamor\*q. Default: exa, except for GMxxx which default to glamor.
+Specify the acceleration method. One of \*qnone\*q, or \*qexa\*q. Default: exa.
 .TP
 .BI "Option \*qNoAccel\*q \*q" boolean \*q
 Disable or enable acceleration.  Default: acceleration is enabled.
diff --git a/src/Makefile.am b/src/Makefile.am
index 9d39a00..1e04ddf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -35,7 +35,6 @@ nouveau_drv_la_SOURCES = \
                         nouveau_copy90b5.c \
                         nouveau_copya0b5.c \
                         nouveau_exa.c nouveau_xv.c nouveau_dri2.c \
-                        nouveau_glamor.c \
                         nouveau_present.c \
                         nouveau_sync.c \
                         nouveau_wfb.c \
@@ -123,7 +122,6 @@ EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \
             shader/Makefile \
             nouveau_local.h \
             nouveau_copy.h \
-            nouveau_glamor.h \
             nouveau_present.h \
             nouveau_sync.h \
             nv_const.h \
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index cd13820..6495961 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -42,8 +42,6 @@
 #include "libudev.h"
 #endif
 
-#include "nouveau_glamor.h"
-
 static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height);
 typedef struct {
     int fd;
@@ -107,8 +105,6 @@ static inline struct nouveau_pixmap *
 drmmode_pixmap(PixmapPtr ppix)
 {
        NVPtr pNv = NVPTR(xf86ScreenToScrn(ppix->drawable.pScreen));
-       if (pNv->AccelMethod == GLAMOR)
-               return nouveau_glamor_pixmap_get(ppix);
        return nouveau_pixmap(ppix);
 }
 
@@ -1393,9 +1389,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int 
height)
                                       crtc->rotation, crtc->x, crtc->y);
        }
 
-       if (pNv->AccelMethod == GLAMOR)
-               nouveau_glamor_create_screen_resources(scrn->pScreen);
-
        if (old_fb_id)
                drmModeRmFB(drmmode->fd, old_fb_id);
        nouveau_bo_ref(NULL, &old_bo);
diff --git a/src/nouveau_glamor.c b/src/nouveau_glamor.c
deleted file mode 100644
index a8e9206..0000000
--- a/src/nouveau_glamor.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright 2014 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs <bske...@redhat.com>
- */
-
-#include "nouveau_glamor.h"
-#ifdef HAVE_GLAMOR
-
-static DevPrivateKeyRec glamor_private;
-
-void
-nouveau_glamor_pixmap_set(PixmapPtr pixmap, struct nouveau_pixmap *priv)
-{
-       dixSetPrivate(&pixmap->devPrivates, &glamor_private, priv);
-}
-
-struct nouveau_pixmap *
-nouveau_glamor_pixmap_get(PixmapPtr pixmap)
-{
-       return dixGetPrivate(&pixmap->devPrivates, &glamor_private);
-}
-
-static Bool
-nouveau_glamor_destroy_pixmap(PixmapPtr pixmap)
-{
-       struct nouveau_pixmap *priv = nouveau_glamor_pixmap_get(pixmap);
-       if (pixmap->refcnt == 1) {
-               glamor_egl_destroy_textured_pixmap(pixmap);
-               if (priv)
-                       nouveau_bo_ref(NULL, &priv->bo);
-       }
-       fbDestroyPixmap(pixmap);
-       return TRUE;
-}
-
-static PixmapPtr
-nouveau_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
-                            unsigned usage)
-{
-       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
-       struct nouveau_pixmap *priv;
-       PixmapPtr pixmap;
-       int pitch;
-
-       if (usage != CREATE_PIXMAP_USAGE_SHARED)
-               return glamor_create_pixmap(screen, w, h, depth, usage);
-       if (depth == 1)
-               return fbCreatePixmap(screen, w, h, depth, usage);
-       if (w > 32767 || h > 32767)
-               return NullPixmap;
-
-       pixmap = fbCreatePixmap(screen, 0, 0, depth, usage);
-       if (pixmap == NullPixmap || !w || !h)
-               return pixmap;
-
-       priv = calloc(1, sizeof(*priv));
-       if (!priv)
-               goto fail_priv;
-
-       if (!nouveau_allocate_surface(scrn, w, h,
-                                    pixmap->drawable.bitsPerPixel,
-                                    usage, &pitch, &priv->bo))
-               goto fail_bo;
-
-       nouveau_glamor_pixmap_set(pixmap, priv);
-       screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
-
-       if (!glamor_egl_create_textured_pixmap(pixmap, priv->bo->handle,
-                                              pixmap->devKind)) {
-               xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-                          "[GLAMOR] failed to create textured PRIME pixmap.");
-               return pixmap;
-       }
-
-       return pixmap;
-fail_bo:
-       free(priv);
-fail_priv:
-       fbDestroyPixmap(pixmap);
-       return fbCreatePixmap(screen, w, h, depth, usage);
-}
-
-static Bool
-nouveau_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,
-                                   void **phandle)
-{
-       struct nouveau_pixmap *priv = nouveau_glamor_pixmap_get(pixmap);
-       int ret, handle;
-
-       ret = nouveau_bo_set_prime(priv->bo, &handle);
-       if (ret)
-               return FALSE;
-
-       priv->shared = TRUE;
-       *phandle = (void *)(long)handle;
-       return TRUE;
-}
-
-static Bool
-nouveau_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *_handle)
-{
-       struct nouveau_pixmap *priv = nouveau_glamor_pixmap_get(pixmap);
-       ScreenPtr screen = pixmap->drawable.pScreen;
-       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
-       NVPtr pNv = NVPTR(scrn);
-       struct nouveau_bo *bo;
-       int ret, handle = (int)(long)_handle;
-
-       ret = nouveau_bo_prime_handle_ref(pNv->dev, handle, &bo);
-       if (ret)
-               return FALSE;
-
-       if (!priv) {
-               priv = calloc(1, sizeof(*priv));
-               if (!priv)
-                       return FALSE;
-               nouveau_glamor_pixmap_set(pixmap, priv);
-       }
-
-       priv->bo = bo;
-       priv->shared = TRUE;
-       close(handle);
-
-       if (!glamor_egl_create_textured_pixmap(pixmap, priv->bo->handle,
-                                              pixmap->devKind)) {
-               xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                          "[GLAMOR] failed to get PRIME drawable\n");
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-static void
-nouveau_glamor_flush(ScrnInfoPtr pScrn)
-{
-       glamor_block_handler(pScrn->pScreen);
-}
-
-Bool
-nouveau_glamor_create_screen_resources(ScreenPtr screen)
-{
-       PixmapPtr ppix = screen->GetScreenPixmap(screen);
-       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
-       NVPtr pNv = NVPTR(scrn);
-
-       if (!glamor_glyphs_init(screen))
-               return FALSE;
-
-       if (!glamor_egl_create_textured_screen_ext(screen,
-                                                  pNv->scanout->handle,
-                                                  scrn->displayWidth *
-                                                  scrn->bitsPerPixel / 8,
-                                                  NULL))
-               return FALSE;
-
-       if (!nouveau_glamor_pixmap_get(ppix)) {
-               struct nouveau_pixmap *priv = calloc(1, sizeof(*priv));
-               if (priv) {
-                       nouveau_bo_ref(pNv->scanout, &priv->bo);
-                       nouveau_glamor_pixmap_set(ppix, priv);
-               }
-       }
-
-       return TRUE;
-}
-
-Bool
-nouveau_glamor_pre_init(ScrnInfoPtr scrn)
-{
-       NVPtr pNv = NVPTR(scrn);
-       pointer glamor_module;
-
-       if (scrn->depth < 24) {
-               xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                          "[GLAMOR] requires depth >= 24\n");
-               return FALSE;
-       }
-
-       if ((glamor_module = xf86LoadSubModule(scrn, GLAMOR_EGL_MODULE_NAME))) {
-               if (!glamor_egl_init(scrn, pNv->dev->fd)) {
-                       xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                                  "[GLAMOR] failed to initialise EGL\n");
-                       return FALSE;
-               }
-       } else {
-               xf86DrvMsg(scrn->scrnIndex, X_ERROR, "[GLAMOR] unavailable\n");
-               return FALSE;
-       }
-
-       xf86DrvMsg(scrn->scrnIndex, X_INFO, "[GLAMOR] EGL initialised\n");
-       return TRUE;
-}
-
-Bool
-nouveau_glamor_init(ScreenPtr screen)
-{
-       ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
-       NVPtr pNv = NVPTR(scrn);
-
-       if (!glamor_init(screen, GLAMOR_INVERTED_Y_AXIS |
-                                GLAMOR_USE_EGL_SCREEN |
-                                GLAMOR_USE_SCREEN |
-                                GLAMOR_USE_PICTURE_SCREEN)) {
-               xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                          "[GLAMOR] failed to initialise\n");
-               return FALSE;
-       }
-
-       if (!glamor_egl_init_textured_pixmap(screen)) {
-               xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-                          "[GLAMOR] failed to initialize screen pixmap\n");
-               return FALSE;
-       }
-
-       if (!dixRegisterPrivateKey(&glamor_private, PRIVATE_PIXMAP, 0))
-               return FALSE;
-
-       screen->CreatePixmap = nouveau_glamor_create_pixmap;
-       screen->DestroyPixmap = nouveau_glamor_destroy_pixmap;
-       screen->SharePixmapBacking = nouveau_glamor_share_pixmap_backing;
-       screen->SetSharedPixmapBacking = 
nouveau_glamor_set_shared_pixmap_backing;
-
-       xf86DrvMsg(scrn->scrnIndex, X_INFO, "[GLAMOR] initialised with DRI3\n");
-       pNv->Flush = nouveau_glamor_flush;
-       return TRUE;
-}
-
-XF86VideoAdaptorPtr
-nouveau_glamor_xv_init(ScreenPtr pScreen, int num_adapt)
-{
-       return glamor_xv_init(pScreen, num_adapt);
-}
-#endif
diff --git a/src/nouveau_glamor.h b/src/nouveau_glamor.h
deleted file mode 100644
index fb6565d..0000000
--- a/src/nouveau_glamor.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef __NOUVEAU_GLAMOR_H__
-#define __NOUVEAU_GLAMOR_H__
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "xf86xv.h"
-
-#ifdef HAVE_GLAMOR
-#include "nv_include.h"
-#define GLAMOR_FOR_XORG 1
-#include "glamor.h"
-
-Bool nouveau_glamor_pre_init(ScrnInfoPtr scrn);
-Bool nouveau_glamor_init(ScreenPtr screen);
-Bool nouveau_glamor_create_screen_resources(ScreenPtr screen);
-XF86VideoAdaptorPtr nouveau_glamor_xv_init(ScreenPtr pScreen, int num_adapt);
-void nouveau_glamor_pixmap_set(PixmapPtr pixmap, struct nouveau_pixmap *priv);
-struct nouveau_pixmap *nouveau_glamor_pixmap_get(PixmapPtr pixmap);
-#else
-static inline Bool nouveau_glamor_pre_init(ScrnInfoPtr scrn) { return FALSE; }
-static inline Bool nouveau_glamor_init(ScreenPtr screen) { return FALSE; }
-static inline Bool
-nouveau_glamor_create_screen_resources(ScreenPtr screen) { return FALSE; }
-static inline void
-nouveau_glamor_pixmap_set(PixmapPtr pixmap, void *priv) { }
-static inline struct nouveau_pixmap *
-nouveau_glamor_pixmap_get(PixmapPtr pixmap) { return NULL; }
-static inline XF86VideoAdaptorPtr
-nouveau_glamor_xv_init(ScreenPtr pScreen, int num_adapt) { return NULL; }
-#endif
-
-#endif
diff --git a/src/nouveau_present.c b/src/nouveau_present.c
index 699a58d..482ac6e 100644
--- a/src/nouveau_present.c
+++ b/src/nouveau_present.c
@@ -25,7 +25,6 @@
 #include "nouveau_present.h"
 #if defined(DRI3)
 #include "nv_include.h"
-#include "nouveau_glamor.h"
 #include "xf86drmMode.h"
 
 struct nouveau_present {
@@ -177,38 +176,12 @@ static Bool
 nouveau_present_flip_exec(ScrnInfoPtr scrn, uint64_t event_id, int sync,
                          uint64_t target_msc, PixmapPtr pixmap, Bool vsync)
 {
-       ScreenPtr screen = scrn->pScreen;
-       struct nouveau_pixmap *priv = NULL;
+       struct nouveau_pixmap *priv = nouveau_pixmap(pixmap);
        NVPtr pNv = NVPTR(scrn);
        uint32_t next_fb;
-       CARD16 stride;
-       CARD32 size;
        void *token;
        int ret;
 
-#ifdef HAVE_GLAMOR
-       if (pNv->AccelMethod == GLAMOR &&
-           !(priv = nouveau_glamor_pixmap_get(pixmap))) {
-               int fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size);
-               if (fd < 0)
-                       return FALSE;
-
-               priv = calloc(1, sizeof(*priv));
-               if (!priv)
-                       return FALSE;
-

Reply via email to