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

xserver-xorg-video-vmware: Changes to 'ubuntu'



 ChangeLog                   |  173 ++++++++++++++++++++++++
 configure.ac                |   10 +
 debian/changelog            |   48 ++++++
 debian/control              |    2 
 debian/rules                |    8 -
 src/vmware_bootstrap.c      |   20 ++
 src/vmware_bootstrap.h      |    2 
 src/vmwaremodes.c           |    4 
 src/vmwarevideo.c           |    4 
 vmwgfx/Makefile.am          |    5 
 vmwgfx/vmwgfx_dri2.c        |   37 +++++
 vmwgfx/vmwgfx_driver.c      |  309 ++++++++++++++++++++++++++------------------
 vmwgfx/vmwgfx_driver.h      |    4 
 vmwgfx/vmwgfx_drmi.c        |  142 ++++++++++++++++++++
 vmwgfx/vmwgfx_drmi.h        |   13 +
 vmwgfx/vmwgfx_hosted.c      |   71 ++++++++++
 vmwgfx/vmwgfx_hosted.h      |  258 ++++++++++++++++++++++++++++++++++++
 vmwgfx/vmwgfx_hosted_priv.h |   40 +++++
 vmwgfx/vmwgfx_overlay.c     |    8 -
 vmwgfx/vmwgfx_saa.c         |  274 +++++++++++++++++++++++++++++++++------
 vmwgfx/vmwgfx_saa.h         |    7 
 vmwgfx/vmwgfx_saa_priv.h    |   13 +
 vmwgfx/vmwgfx_tex_video.c   |    2 
 vmwgfx/vmwgfx_xa_surface.c  |   63 +++++++-
 vmwgfx/vmwgfx_xmir.c        |  178 +++++++++++++++++++++++++
 vmwgfx/vmwgfx_xwayland.c    |  186 ++++++++++++++++++++++++++
 26 files changed, 1698 insertions(+), 183 deletions(-)

New commits:
commit d1348cd564c9104ce2a486e4083a9e970b14eec2
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Apr 8 16:40:23 2014 +0200

    bump changelog

diff --git a/debian/changelog b/debian/changelog
index 470e1a9..0dfd7a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,10 @@
-xserver-xorg-video-vmware (1:13.0.1.git8da9817-0ubuntu1) trusty; urgency=low
+xserver-xorg-video-vmware (1:13.0.1.git.20140115.8da9817-0ubuntu2) trusty; urgency=low
+
+  * Rebuild for xorg 1.15 abi.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Wed, 05 Feb 2014 10:12:27 +0000
+
+xserver-xorg-video-vmware (1:13.0.1.git.20140115.8da9817-0ubuntu1) trusty; urgency=low
 
   * Sync fixes from git to make libxatracker2 work correctly. (LP: #1271186)
 

commit 64e0faf1480663a990e0f6aeef7af0e69845af49
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Apr 2 14:05:23 2014 +0200

    vmware/vmwgfx: Don't tell XA that we have a mask when we haven't
    
    In some cases, the X server sends us a composit operation with
    mask_pict != NULL, but mask_pix == NULL. Assume there's no mask
    involved in that case.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Brian Paul <brianp@vmware.com>

diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index 3da0222..99a289d 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -1158,6 +1158,8 @@ vmwgfx_composite_prepare(struct saa_driver *driver, CARD8 op,
      * and check whether XA can accelerate.
      */
 
+    if (!mask_pix)
+	mask_pict = NULL;
     xa_comp = vmwgfx_xa_setup_comp(vsaa->vcomp, op,
 				   src_pict, mask_pict, dst_pict);
     if (!xa_comp)

commit c062d08a50a26c99a3b8f565a8b2b00e8dc21c3f
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Thu Jan 16 18:27:57 2014 +0100

    vmware/vmwgfx: Don't change backing-store of active scanout surfaces
    
    With option "HwPresents" on, the driver would sometimes change backing
    store of active scanout surfaces, making the kernel module refuse to
    present. This was caused by scanout surfaces not having the RENDERTARGET flag
    on by default. So when rendered to, using copies or composites, they
    would be reallocated. Fix this by adding the RENDERTARGET flag from start.
    
    Also add code that prints out an error message when we change backing store
    of active scanout surfaces
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>

diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index b56b05f..3da0222 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -610,9 +610,9 @@ vmwgfx_pix_resize(PixmapPtr pixmap, unsigned int old_pitch,
     }
 
     if (vpix->hw) {
-	if (xa_surface_redefine(vpix->hw, draw->width, draw->height,
-				draw->depth, xa_type_argb,
-				xa_format_unknown, vpix->xa_flags, 1) != 0)
+      if (!vmwgfx_xa_surface_redefine(vpix, vpix->hw, draw->width,
+				      draw->height, draw->depth, xa_type_argb,
+				      xa_format_unknown, vpix->xa_flags, 1))
 	    return FALSE;
     }
 
@@ -1504,7 +1504,8 @@ vmwgfx_scanout_ref(struct vmwgfx_screen_entry  *entry)
 	     * The KMS fb will be a HW surface. Create it, add damage
 	     * and get the handle.
 	     */
-	    if (!vmwgfx_hw_accel_validate(pixmap, 0, XA_FLAG_SCANOUT, 0, NULL))
+	    if (!vmwgfx_hw_accel_validate(pixmap, 0, XA_FLAG_SCANOUT |
+					  XA_FLAG_RENDER_TARGET, 0, NULL))
 		goto out_err;
 	    if (_xa_surface_handle(vpix->hw, &handle, &dummy) != 0)
 		goto out_err;
diff --git a/vmwgfx/vmwgfx_saa_priv.h b/vmwgfx/vmwgfx_saa_priv.h
index c84827b..4a0c302 100644
--- a/vmwgfx/vmwgfx_saa_priv.h
+++ b/vmwgfx/vmwgfx_saa_priv.h
@@ -100,6 +100,17 @@ vmwgfx_hw_composite_dst_stage(PixmapPtr pixmap,
 Bool
 vmwgfx_hw_commit(PixmapPtr pixmap);
 
+Bool
+vmwgfx_xa_surface_redefine(struct vmwgfx_saa_pixmap *vpix,
+			   struct xa_surface *srf,
+			   int width,
+			   int height,
+			   int depth,
+			   enum xa_surface_type stype,
+			   enum xa_formats rgb_format,
+			   unsigned int new_flags,
+			   int copy_contents);
+
 /*
  * vmwgfx_xa_composite.c
  */
diff --git a/vmwgfx/vmwgfx_xa_surface.c b/vmwgfx/vmwgfx_xa_surface.c
index 189bfdc..a30b41c 100644
--- a/vmwgfx/vmwgfx_xa_surface.c
+++ b/vmwgfx/vmwgfx_xa_surface.c
@@ -43,6 +43,52 @@ static const enum xa_surface_type vmwgfx_stype_map[] = {
 static const unsigned int vmwgfx_stype_map_size =
     sizeof(vmwgfx_stype_map) / sizeof(enum xa_surface_type);
 
+/**
+ * vmwgfx_xa_surface_redefine - wrapper around xa_surface_redefine
+ *
+ * @vpix: Pointer to the struct vmwgfx_saa_pixmap the surface is attached to.
+ * @srf: The surface.
+ * @width: New width.
+ * @height: New height.
+ * @depth: New pixel depth.
+ * @stype: New surface type.
+ * @rgb_format: New rgb format.
+ * @new_flags: New surface flags.
+ * @copy_contents: Copy contents if new backing store is allocated.
+ *
+ * This is a wrapper that prints out an error message if the backing store
+ * of an active scanout surface is changed.
+ */
+Bool
+vmwgfx_xa_surface_redefine(struct vmwgfx_saa_pixmap *vpix,
+			   struct xa_surface *srf,
+			   int width,
+			   int height,
+			   int depth,
+			   enum xa_surface_type stype,
+			   enum xa_formats rgb_format,
+			   unsigned int new_flags,
+			   int copy_contents)
+{
+    uint32_t handle, new_handle, dummy;
+    Bool have_handle = FALSE;
+
+    if (!WSBMLISTEMPTY(&vpix->scanout_list))
+	have_handle = (_xa_surface_handle(srf, &handle, &dummy) == XA_ERR_NONE);
+
+    if (xa_surface_redefine(srf, width, height, depth, stype, rgb_format,
+			    new_flags, copy_contents) != XA_ERR_NONE)
+	return FALSE;
+
+    if (!WSBMLISTEMPTY(&vpix->scanout_list) && have_handle &&
+	_xa_surface_handle(srf, &new_handle, &dummy) == XA_ERR_NONE &&
+	new_handle != handle) {
+	LogMessage(X_ERROR, "Changed active scanout surface handle.\n");
+    }
+
+    return TRUE;
+}
+
 
 /*
  * Create an xa format from a PICT format.
@@ -323,13 +369,14 @@ vmwgfx_hw_commit(PixmapPtr pixmap)
 	if (vpix->staging_format != xa_surface_format(vpix->hw))
 	    LogMessage(X_INFO, "Changing hardware format.\n");
 
-	if (xa_surface_redefine(vpix->hw,
-				pixmap->drawable.width,
-				pixmap->drawable.height,
-				0,
-				xa_type_other,
-				vpix->staging_format,
-				new_flags, 1) != XA_ERR_NONE)
+	if (!vmwgfx_xa_surface_redefine(vpix,
+					vpix->hw,
+					pixmap->drawable.width,
+					pixmap->drawable.height,
+					0,
+					xa_type_other,
+					vpix->staging_format,
+					new_flags, 1) != XA_ERR_NONE)
 	    return FALSE;
 	vpix->xa_flags = new_flags;
     } else if (!vmwgfx_create_hw(vsaa, pixmap))

commit c42e1f750629f18144d065b8bba5e2eaf6cbf675
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Apr 1 10:11:13 2014 +0200

    configure: fix build without xatracker
    
    ACTION-IF-NOT-FOUND is the fourth argument to PKG_CHECK_MODULES, not the
    fifth.
    
    Debian bug#743239 <https://bugs.debian.org/743239>
    
    Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
    Signed-off-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>

diff --git a/configure.ac b/configure.ac
index dd3ad4e..be40ed7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,7 @@ if test x$BUILD_VMWGFX = xyes; then
 			  [PKG_CHECK_EXISTS([xatracker = 2.0.0],
 	                  [AC_DEFINE([HAVE_XA_2], 1,
                		  [Has version 2 of XA])])],
-			  [],[BUILD_VMWGFX=no])
+			  [BUILD_VMWGFX=no])
 #
 # Check for prime.
 #

commit f3723bb28b048f450af08afb0435249060887d53
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 31 22:38:08 2014 +0200

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index b352e35..b9bf917 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-vmware (1:13.0.2-2) unstable; urgency=medium
+
+  * Fix build failure on kfreebsd (closes: #743239)
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 31 Mar 2014 22:37:52 +0200
+
 xserver-xorg-video-vmware (1:13.0.2-1) unstable; urgency=medium
 
   * New upstream release

commit 5544fe0de73e5144f43cec1896445ef522dda3a7
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 31 22:35:27 2014 +0200

    configure: fix build without xatracker
    
    ACTION-IF-NOT-FOUND is the fourth argument to PKG_CHECK_MODULES, not the
    fifth.
    
    Debian bug#743239 <https://bugs.debian.org/743239>
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/configure.ac b/configure.ac
index dd3ad4e..be40ed7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,7 @@ if test x$BUILD_VMWGFX = xyes; then
 			  [PKG_CHECK_EXISTS([xatracker = 2.0.0],
 	                  [AC_DEFINE([HAVE_XA_2], 1,
                		  [Has version 2 of XA])])],
-			  [],[BUILD_VMWGFX=no])
+			  [BUILD_VMWGFX=no])
 #
 # Check for prime.
 #

commit 91f540ad132d0a62bcbe4018cbd1d3591de30e85
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 31 22:34:43 2014 +0200

    Mark 'build' as PHONY
    
    We use it as a build directory, so this unconfuses make.

diff --git a/debian/rules b/debian/rules
index 304c7ee..7fa7b81 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,5 +19,7 @@ override_dh_install:
 override_dh_shlibdeps:
 	dh_shlibdeps -- --warnings=6
 
-%:
+build %:
 	dh $@ --with quilt,autoreconf,xsf --builddirectory=build/
+
+.PHONY: build

commit 8633fafd5ab7073df21a1601e0ec3e19dc69b0a6
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 31 16:30:54 2014 +0200

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index 26b0083..b352e35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-video-vmware (1:13.0.2-1) UNRELEASED; urgency=medium
+xserver-xorg-video-vmware (1:13.0.2-1) unstable; urgency=medium
 
   * New upstream release
     + supports current libxatracker (closes: #742915)
 
- -- Julien Cristau <jcristau@debian.org>  Mon, 31 Mar 2014 16:24:10 +0200
+ -- Julien Cristau <jcristau@debian.org>  Mon, 31 Mar 2014 16:29:57 +0200
 
 xserver-xorg-video-vmware (1:13.0.1-3) unstable; urgency=medium
 

commit 01fea1a63b00de1abf3096e2db7b04a3303762f1
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Mar 31 16:25:40 2014 +0200

    Bump changelogs for 13.0.2

diff --git a/ChangeLog b/ChangeLog
index 57f46d8..f19a6ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,265 @@
+commit cbd56b3759f01ec18ae0705d023e4c0b2ab38c25
+Author: Jakob Bornecrantz <jakob@vmware.com>
+Date:   Wed Mar 26 12:45:52 2014 +0100
+
+    Bump the version number to 13.0.2
+    
+    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 51cdfa6f5102bde92c98630ace6650e4b286f6e2
+Author: Jakob Bornecrantz <jakob@vmware.com>
+Date:   Fri Feb 21 18:10:07 2014 +0100
+
+    vmware: Fix compilation on newer X servers
+    
+    Found by Bryan Lee. Later versions of X.org turns dispMode pointers
+    into const upsetting gcc, turn them into size_t's instead.
+    
+    Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
+
+commit 8da981712f62050076cff53e1b40ed1e307fcca8
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Jan 15 11:04:05 2014 +0100
+
+    vmware/vmwgfx: Always allocate shared hardware surfaces.
+    
+    Hardware surfaces are all likely to be shared at some point, and we *really*
+    don't want to change a hardware surface that is bound as a drm framebuffer.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 31bff9f7f3d9a68fd1449532e8ab50065de63857
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 9 13:53:59 2014 +0100
+
+    vmware: Require libdrm 2.4.38 to build XMir.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit d6b179a5addef6456325adf241eb8dcaf8e4c3d6
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 9 13:28:22 2014 +0100
+
+    vmware: Fix build errors and warnings
+    
+    A previous commit and the hosted merge unfortunately brought in some build
+    errors / warnings on early X servers.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit f37684e7169b9c0ab23ff748d5acacb65fad82f7
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Tue Jan 7 17:55:49 2014 +0100
+
+    vmwgfx: Block DMA to prime surfaces for now
+    
+    Since there is currently no _good_ way to get the surface format of a
+    prime surface, we block DMA to these surfaces; we don't know if our
+    software data is compatible with the surface format.
+    
+    This patch also makes sure that there is a hardware surface backing the
+    drawable we copy from.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 97ce302ddd6e86397ea56ea9089b9549af73c3ac
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Jan 6 12:37:36 2014 +0100
+
+    vmwgfx: Enable direct dmas
+    
+    Enable direct dmas instead of using the xa-provided dma functionality.
+    This saves a bounce-buffer software copy of all dma'd contents.
+    
+    This also implies that all drawables with mixed software / hardware contents
+    will use a kernel buffer for software rendering.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+
+commit fd636e39a3f32a6dcd107c370513d8cb9aae26c2
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:21:09 2013 -0800
+
+    vmwgfx: Add support for XWayland
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c020923597d3bc30dffa89ba0a47f3b9517dd5fb
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:13:25 2013 -0800
+
+    vmwgfx: Add support for XMir v2.
+    
+    Use the hosted infrastructure to add support for XMir.
+    Helpers go in vmwgfx_saa.c.
+    
+    v2: Added comments for the helpers, and added a
+    vmwgfx_flush_dri2 to be executed when coming back from vt switch.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c8e1c498431b1f8758f62c94131c302cf3d07b39
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:05:35 2013 -0800
+
+    vmwgfx: Add an infrastructure to be able to run hosted under a compositor v2
+    
+    Figure out what's needed both for XMir and XWayland and make a common
+    driver structure out of it.
+    
+    v2: Added a lot of comments. No code change.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit f45a551e9b70ccec8f92df02747d4e2af299cf8c
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 10:38:21 2013 +0100
+
+    vmwgfx: Fix compile breakage on XA version 1.
+    
+    A recent revert brought back code that assumed XA version 2.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: trivial
+
+commit 93228f3dd3355a25583d22dbb96791678b93be3e
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Dec 11 06:54:02 2013 -0800
+
+    vmwgfx: Really allow XA version 2.
+    
+    When XA starts to correctly advertise version 2, we didn't allow it.
+    Fix this.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 4af6062ce281a7f4aaa50985fe757e9569208ee1
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Dec 11 04:59:49 2013 -0800
+
+    Revert "vmwgfx: Get rid of device-specific DMA code"
+    
+    This reverts commit 45b2457516a9db4bd1d60fbb24a1efbe2d9dd932.
+    
+    Reverting this because using direct DMA for shared pixmaps should
+    boost performance. It should be usable both in a composited environment
+    and when running hosted. Need to retest the DMA flaws I saw before disabling
+    this code.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c36cbcefb8526944141eb431e1e736dc4485a36e
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 9 00:19:55 2013 -0800
+
+    vmwgfx: Remove stray 1
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit a40cbd7b4fa19219849b4b0a48f07538772c3e22
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Dec 5 02:58:47 2013 -0800
+
+    vmwgfx: Support also XA version 1 v2
+    
+    We need to support also XA version 1, since we want to be backwards
+    compatible with older mesa releases.
+    Unfortunately, the intended way of detecting XA major version at
+    compile-time was broken on mesa 10 so we need a workaround that tests
+    for XA version 2 at config time.
+    
+    v2: Update the test for XA version 2.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 7ac45326eccbf3bea9a4a8f95b9662a36ab58eb0
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Nov 28 02:02:20 2013 -0800
+
+    vmwgfx: Fix some compilation warnings and indentations
+    
+    Most of the compilation warnings we're seeing are due to bad xorg headers,
+    but fix the ones we can fix in the driver. Some indentation fixes as well.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit e26dec8f5278df74a102493bf6d2d8444dab5d6d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 28 18:21:29 2013 -0400
+
+    vmwgfx: handle changes of DamageUnregister API in 1.14.99.2
+    
+    Fix is inspired from the intel driver.
+    
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 45b2457516a9db4bd1d60fbb24a1efbe2d9dd932
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Sep 19 21:50:40 2012 +0200
+
+    vmwgfx: Get rid of device-specific DMA code
+    
+    It's rarely used and things seem to work well enough on top of XA.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Zack Rusin <zackr@vmware.com>
+
+commit 7192acf9f0bf8e7176ab0b803b861a858623f709
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Sep 19 20:36:57 2012 +0200
+
+    vmwgfx: Implement textured video completely on top of XA.
+    
+    Remove device-specific hacks. This may increase resource usage a little
+    on old hardware revisions, but we don't need separate code paths on
+    different hardware revisions.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Zack Rusin <zackr@vmware.com>
+
+commit 835ce4698f916ba080f4132988fd4caf898e0b1e
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Sep 26 01:25:33 2013 -0700
+
+    vmwgfx: Avoid HW operations when not master
+    
+    Note that for DRI2, a dri2_copy_region becomes a NOP when not master.
+    Additionally, all dri2 operations that lead to a potential kernel
+    access will return FALSE.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 0945bea5fc32eacb7bf42639efbd45dcd43e7ab5
+Author: Rob Clark <robdclark@gmail.com>
+Date:   Mon Jun 10 13:31:31 2013 -0400
+
+    vmwgfx: update for XA API changes
+    
+    Signed-off-by: Rob Clark <robdclark@gmail.com>
+    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+    Tested-by: Jakob Bornecrantz <jakob@vmware.com>
+
 commit b3345886332ee2b9fd1348dc2cd36257dfd71986
 Author: Jakob Bornecrantz <jakob@vmware.com>
 Date:   Wed Apr 17 12:03:32 2013 +0200
diff --git a/debian/changelog b/debian/changelog
index f91f5a5..26b0083 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-vmware (1:13.0.2-1) UNRELEASED; urgency=medium
+
+  * New upstream release
+    + supports current libxatracker (closes: #742915)
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 31 Mar 2014 16:24:10 +0200
+
 xserver-xorg-video-vmware (1:13.0.1-3) unstable; urgency=medium
 
   * vmwgfx: handle changes of DamageUnregister API in 1.14.99.2 (closes:

commit cbd56b3759f01ec18ae0705d023e4c0b2ab38c25
Author: Jakob Bornecrantz <jakob@vmware.com>
Date:   Wed Mar 26 12:45:52 2014 +0100

    Bump the version number to 13.0.2
    
    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>

diff --git a/configure.ac b/configure.ac
index 3e8d541..dd3ad4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-vmware],
-        [13.0.1],
+        [13.0.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-vmware])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 51cdfa6f5102bde92c98630ace6650e4b286f6e2
Author: Jakob Bornecrantz <jakob@vmware.com>
Date:   Fri Feb 21 18:10:07 2014 +0100

    vmware: Fix compilation on newer X servers
    
    Found by Bryan Lee. Later versions of X.org turns dispMode pointers
    into const upsetting gcc, turn them into size_t's instead.
    
    Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>

diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c
index 2965dca..41a9b4f 100644
--- a/src/vmwaremodes.c
+++ b/src/vmwaremodes.c
@@ -102,7 +102,9 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight)
 	    dispModeList = pScrn->display->modes;
 	    while(*dispModeList)
 		dispModeList++;
-	    dispModeCount = dispModeList - pScrn->display->modes;
+	    dispModeCount = (unsigned)(((size_t)dispModeList -
+	                                (size_t)pScrn->display->modes) /
+	                               sizeof(*dispModeList));
 	}
 
 	dispModeList = xnfcalloc(dispModeCount + 2, sizeof(*dispModeList));

commit 38d102ca56729adae87efd8095e3bfc84f2309d4
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Feb 4 16:56:22 2014 +0100

    Upload to unstable

diff --git a/debian/changelog b/debian/changelog
index 7ef6574..f91f5a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-vmware (1:13.0.1-3) unstable; urgency=medium
+
+  * vmwgfx: handle changes of DamageUnregister API in 1.14.99.2 (closes:
+    #736981)
+
+ -- Julien Cristau <jcristau@debian.org>  Tue, 04 Feb 2014 16:56:20 +0100
+
 xserver-xorg-video-vmware (1:13.0.1-2) unstable; urgency=low
 
   * Restrict libxatracker build-dep to Linux.

commit adfd0624add4a4ba49d5e51b8dafa3c65c35f425
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Mon Oct 28 18:21:29 2013 -0400

    vmwgfx: handle changes of DamageUnregister API in 1.14.99.2
    
    Fix is inspired from the intel driver.
    
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
    (cherry picked from commit e26dec8f5278df74a102493bf6d2d8444dab5d6d)

diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index 63df3a1..52a4d55 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -26,6 +26,7 @@
  */
 
 #include <xorg-server.h>
+#include <xorgVersion.h>
 #include <mi.h>
 #include <fb.h>
 #include <xf86drmMode.h>
@@ -76,7 +77,12 @@ vmwgfx_pixmap_remove_damage(PixmapPtr pixmap)
     if (!spix->damage || vpix->hw || vpix->gmr || vpix->malloc)
 	return;
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
+    DamageUnregister(spix->damage);
+#else
     DamageUnregister(&pixmap->drawable, spix->damage);
+#endif
+
     DamageDestroy(spix->damage);
     spix->damage = NULL;
 }

commit 341b48af92c6170fab156eabef8be62c9165ce22
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jan 21 17:30:14 2014 +0100

    Sync fixes from git to make libxatracker2 work correctly. (LP: #1271186)

diff --git a/ChangeLog b/ChangeLog
index c9ebc96..784e815 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,157 @@
+commit 8da981712f62050076cff53e1b40ed1e307fcca8
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Jan 15 11:04:05 2014 +0100
+
+    vmware/vmwgfx: Always allocate shared hardware surfaces.
+    
+    Hardware surfaces are all likely to be shared at some point, and we *really*
+    don't want to change a hardware surface that is bound as a drm framebuffer.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 31bff9f7f3d9a68fd1449532e8ab50065de63857
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 9 13:53:59 2014 +0100
+
+    vmware: Require libdrm 2.4.38 to build XMir.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit d6b179a5addef6456325adf241eb8dcaf8e4c3d6
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Thu Jan 9 13:28:22 2014 +0100
+
+    vmware: Fix build errors and warnings
+    
+    A previous commit and the hosted merge unfortunately brought in some build
+    errors / warnings on early X servers.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit f37684e7169b9c0ab23ff748d5acacb65fad82f7
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Tue Jan 7 17:55:49 2014 +0100
+
+    vmwgfx: Block DMA to prime surfaces for now
+    
+    Since there is currently no _good_ way to get the surface format of a
+    prime surface, we block DMA to these surfaces; we don't know if our
+    software data is compatible with the surface format.
+    
+    This patch also makes sure that there is a hardware surface backing the
+    drawable we copy from.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 97ce302ddd6e86397ea56ea9089b9549af73c3ac
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Jan 6 12:37:36 2014 +0100
+
+    vmwgfx: Enable direct dmas
+    
+    Enable direct dmas instead of using the xa-provided dma functionality.
+    This saves a bounce-buffer software copy of all dma'd contents.
+    
+    This also implies that all drawables with mixed software / hardware contents
+    will use a kernel buffer for software rendering.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+
+commit fd636e39a3f32a6dcd107c370513d8cb9aae26c2
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:21:09 2013 -0800
+
+    vmwgfx: Add support for XWayland
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c020923597d3bc30dffa89ba0a47f3b9517dd5fb
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:13:25 2013 -0800
+
+    vmwgfx: Add support for XMir v2.
+    
+    Use the hosted infrastructure to add support for XMir.
+    Helpers go in vmwgfx_saa.c.
+    
+    v2: Added comments for the helpers, and added a
+    vmwgfx_flush_dri2 to be executed when coming back from vt switch.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c8e1c498431b1f8758f62c94131c302cf3d07b39
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 06:05:35 2013 -0800
+
+    vmwgfx: Add an infrastructure to be able to run hosted under a compositor v2
+    
+    Figure out what's needed both for XMir and XWayland and make a common
+    driver structure out of it.
+    
+    v2: Added a lot of comments. No code change.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Brian Paul <brianp@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit f45a551e9b70ccec8f92df02747d4e2af299cf8c
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 16 10:38:21 2013 +0100
+
+    vmwgfx: Fix compile breakage on XA version 1.
+    
+    A recent revert brought back code that assumed XA version 2.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: trivial
+
+commit 93228f3dd3355a25583d22dbb96791678b93be3e
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Dec 11 06:54:02 2013 -0800
+
+    vmwgfx: Really allow XA version 2.
+    
+    When XA starts to correctly advertise version 2, we didn't allow it.
+    Fix this.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 4af6062ce281a7f4aaa50985fe757e9569208ee1
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Wed Dec 11 04:59:49 2013 -0800
+
+    Revert "vmwgfx: Get rid of device-specific DMA code"
+    
+    This reverts commit 45b2457516a9db4bd1d60fbb24a1efbe2d9dd932.
+    
+    Reverting this because using direct DMA for shared pixmaps should
+    boost performance. It should be usable both in a composited environment
+    and when running hosted. Need to retest the DMA flaws I saw before disabling
+    this code.
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
+commit c36cbcefb8526944141eb431e1e736dc4485a36e
+Author: Thomas Hellstrom <thellstrom@vmware.com>
+Date:   Mon Dec 9 00:19:55 2013 -0800
+
+    vmwgfx: Remove stray 1
+    
+    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
+    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+
 commit a40cbd7b4fa19219849b4b0a48f07538772c3e22
 Author: Thomas Hellstrom <thellstrom@vmware.com>
 Date:   Thu Dec 5 02:58:47 2013 -0800
diff --git a/debian/changelog b/debian/changelog
index da08ee5..470e1a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-vmware (1:13.0.1.git8da9817-0ubuntu1) trusty; urgency=low
+
+  * Sync fixes from git to make libxatracker2 work correctly. (LP: #1271186)
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 21 Jan 2014 17:28:41 +0100
+
 xserver-xorg-video-vmware (1:13.0.1.gita40cbd7-0ubuntu1) trusty; urgency=low
 
   * Grab fixes from git to rebuild against libxatracker2.

commit 8da981712f62050076cff53e1b40ed1e307fcca8
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Jan 15 11:04:05 2014 +0100

    vmware/vmwgfx: Always allocate shared hardware surfaces.
    
    Hardware surfaces are all likely to be shared at some point, and we *really*
    don't want to change a hardware surface that is bound as a drm framebuffer.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>

diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index 8c97618..b56b05f 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -811,7 +811,7 @@ vmwgfx_create_hw(struct vmwgfx_saa *vsaa,
 	return TRUE;
 
     new_flags = (vpix->xa_flags & ~vpix->staging_remove_flags) |
-	vpix->staging_add_flags;
+	vpix->staging_add_flags | XA_FLAG_SHARED;
 
     hw = xa_surface_create(vsaa->xat,
 			   pixmap->drawable.width,
diff --git a/vmwgfx/vmwgfx_xa_surface.c b/vmwgfx/vmwgfx_xa_surface.c
index 2f23c57..189bfdc 100644
--- a/vmwgfx/vmwgfx_xa_surface.c
+++ b/vmwgfx/vmwgfx_xa_surface.c
@@ -318,7 +318,7 @@ vmwgfx_hw_commit(PixmapPtr pixmap)
 	uint32_t new_flags;
 
 	new_flags = (vpix->xa_flags & ~vpix->staging_remove_flags) |
-	    vpix->staging_add_flags;
+	    vpix->staging_add_flags | XA_FLAG_SHARED;
 
 	if (vpix->staging_format != xa_surface_format(vpix->hw))
 	    LogMessage(X_INFO, "Changing hardware format.\n");

commit 31bff9f7f3d9a68fd1449532e8ab50065de63857
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Thu Jan 9 13:53:59 2014 +0100

    vmware: Require libdrm 2.4.38 to build XMir.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>

diff --git a/configure.ac b/configure.ac
index 123356c..3e8d541 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,12 @@ if test x$BUILD_VMWGFX = xyes; then
 	                  [AC_DEFINE([HAVE_XA_2], 1,
                		  [Has version 2 of XA])])],
 			  [],[BUILD_VMWGFX=no])
+#
+# Check for prime.
+#
+	PKG_CHECK_EXISTS([libdrm >= 2.4.38],
+			 [AC_DEFINE([HAVE_LIBDRM_2_4_38], 1,
+			 [Has version 2.4.38 or greater of libdrm])])
 fi
 
 DRIVER_NAME=vmware
diff --git a/vmwgfx/vmwgfx_drmi.c b/vmwgfx/vmwgfx_drmi.c


Reply to: