Commit Graph

313 Commits

Author SHA1 Message Date
Jakob Bornecrantz
0a212afefd vmware/legacy: Fix uninitialized values in video commands
Fixed bug where video stopped working on systems that didn't have the new kms
enabled kernel driver installed. Found on CentOS 6.4.

After updating the register header SVGA_VIDEO_NUM_REGS value got upped by two
in order to support GMR and Screen Objects. Since this path is mostly used
on older hosts that may not support them, don't send them at all.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-08-11 19:08:03 +02:00
Thomas Hellstrom
0a596fd0c9 vmware/vmwgfx: Fix an error path segfault
Part of freedesktop.org bugzilla bug #80645
If taking a scanout reference on a pixmap fails, the
struct vmwgfx_screen_entry::pixmap pointer must be set to NULL, otherwise
the driver will incorrectly attempt to remove the scanout reference in the
error path, causing a segfault.

This problem is seen in the above-mentioned bug, but it is not the root
cause of the problem. With this patch applied, the server will terminate
cleanly instead of segfaulting.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-07-03 03:46:13 -07:00
Jakob Bornecrantz
4e378a730d vmware/legacy: Apply same fix to auto colorkey fill
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23 12:57:01 +02:00
Jakob Bornecrantz
82c9b0c1d3 vmware/vmwgfx: Fix auto colorkey fill usage
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23 12:57:00 +02:00
Jakob Bornecrantz
43e043868f vmware/vmwgfx: A bit more error logging when handling cursors
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23 12:57:00 +02:00
Jakob Bornecrantz
aa73092548 vmware/vmwgfx: Don't move cursors without images
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23 12:56:59 +02:00
Thomas Hellstrom
e8d6facf34 vmware/vmwgfx: Fix xwayland build on newer XA versions
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-21 02:35:29 -07:00
Hans de Goede
268307e85c Add support for server managed fds
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-14 12:08:17 +02:00
Hans de Goede
675fe58eee Add support for XSERVER_PLATFORM_BUS
This is a preparation patch for adding support for server managed fds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-14 12:08:17 +02:00
Thomas Hellstrom
88c487cb19 vmware/saa: Disable the noreadback polyfillrect optimization
It causes rendering artefacts with some motif applications due to
damage area confusion. Until that is sorted out, temporarily disable the
optimization.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-09 11:41:40 +02:00
Thomas Hellstrom
f31eed4a57 vmware/vmwgfx: Fix initial dirty region for pixmaps
When storage is attached to pixmaps for the first time the dirty region is
set to cover either the hardware surface or the software buffer based on
the presence of the hardware surface.

However, if the storage was created as part of an accelerated operation,
the dirty region was assigned before the hardware surface was assigned to the
pixmap, causing the dirty region to incorrectly cover the software buffer.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-08 09:46:14 +02:00
Thomas Hellstrom
1ed14687a3 vmware/vmwgfx: Set desired modes after xMir screen init
While XMir does initial mode configuration, it leaves setting initial
modes to the DDX driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-11 12:35:11 +02:00
Thomas Hellstrom
64e0faf148 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>
2014-04-03 10:38:19 +02:00
Thomas Hellstrom
c062d08a50 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>
2014-04-03 10:37:41 +02:00
Julien Cristau
c42e1f7506 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>
2014-04-01 14:12:00 +02:00
Jakob Bornecrantz
cbd56b3759 Bump the version number to 13.0.2
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2014-03-26 12:46:25 +01:00
Jakob Bornecrantz
51cdfa6f51 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>
2014-02-26 19:02:45 +01:00
Thomas Hellstrom
8da981712f 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>
2014-01-15 11:11:55 +01:00
Thomas Hellstrom
31bff9f7f3 vmware: Require libdrm 2.4.38 to build XMir.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-01-09 14:32:27 +01:00
Thomas Hellstrom
d6b179a5ad 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>
2014-01-09 14:31:46 +01:00
Thomas Hellstrom
f37684e716 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>
2014-01-09 11:49:57 +01:00
Thomas Hellstrom
97ce302ddd 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>
2014-01-08 18:46:53 +01:00
Thomas Hellstrom
fd636e39a3 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>
2013-12-19 07:47:17 -08:00
Thomas Hellstrom
c020923597 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>
2013-12-19 07:47:11 -08:00
Thomas Hellstrom
c8e1c49843 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>
2013-12-19 07:46:20 -08:00
Thomas Hellstrom
f45a551e9b 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
2013-12-16 10:38:21 +01:00
Thomas Hellstrom
93228f3dd3 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>
2013-12-12 00:19:35 -08:00
Thomas Hellstrom
4af6062ce2 Revert "vmwgfx: Get rid of device-specific DMA code"
This reverts commit 45b2457516.

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>
2013-12-12 00:19:03 -08:00
Thomas Hellstrom
c36cbcefb8 vmwgfx: Remove stray 1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2013-12-12 00:17:08 -08:00
Thomas Hellstrom
a40cbd7b4f 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>
2013-12-06 05:24:37 -08:00
Thomas Hellstrom
7ac45326ec 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>
2013-12-05 01:01:14 -08:00
Gaetan Nadon
e26dec8f52 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>
2013-11-18 15:46:39 +01:00
Thomas Hellstrom
45b2457516 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>
2013-09-30 23:30:00 -07:00
Thomas Hellstrom
7192acf9f0 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>
2013-09-30 23:29:18 -07:00
Thomas Hellstrom
835ce4698f 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>
2013-09-30 23:28:47 -07:00
Rob Clark
0945bea5fc 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>
2013-08-02 17:59:28 +02:00
Jakob Bornecrantz
b334588633 Bump the version number to 13.0.1 2013-04-17 12:03:32 +02:00
Loïc Yhuel
d13a6334fe vmwgfx: Use myGlyphs to fix crashes
Tested-by: Christian Hesse <mail@eworm.de>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Loïc Yhuel <loic.yhuel@gmail.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2013-04-12 11:29:26 +02:00
Zack Rusin
23d87c92b7 Kill mibstore
It was a noop for at least 5 years and it has been removed.

Signed-off-by: Zack Rusin <zackr@vmware.com>
2013-02-14 20:48:57 -08:00
Zack Rusin
686859fba1 Bump the version number to 13.0.0
New abi and various fixes

Signed-off-by: Zack Rusin <zackr@vmware.com>
2013-01-15 12:05:45 -08:00
Zack Rusin
adf375f3d4 xf86-video-vmware 12.0.99.901
Internal release for a round of QE testing

Signed-off-by: Zack Rusin <zackr@vmware.com>
2012-12-06 16:40:13 -05:00
Jakob Bornecrantz
007bed3027 vmwgfx: Guard against null rotate pixmap in shadow destroy
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-08-30 16:35:04 +02:00
Dave Airlie
e5ac80d8f7 vmware: avoid warnings about shadowing 'i'
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-03 13:50:30 +01:00
Dave Airlie
46c0862d20 vmware: drop infoFromScreen inline in favour of new interface
This also should fix the build regression introduced with the fix
for this macro.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-03 13:49:27 +01:00
Robert Hooker
50c01998c7 vmware: Fix up some warnings after new compat API change.
Fixes multiple instances of these warnings on x86_64:
../../src/vmware.h:180:5: warning: implicit declaration of function 'xf86ScreenToScrn' [-Wimplicit-function-declaration]
../../src/vmware.h:180:5: warning: nested extern declaration of 'xf86ScreenToScrn' [-Wnested-externs]
../../src/vmware.h:180:5: warning: return makes pointer from integer without a cast [enabled by default]
Function `xf86ScreenToScrn' implicitly converted to pointer at ../../src/vmware.h:180

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Robert Hooker <sarvatt@ubuntu.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-06-15 20:21:32 +02:00
Dave Airlie
61df95a86f vmware: port vmware driver to new compat API
This is a port of the vmware driver to the new compat API.

Tested-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-06-09 05:54:30 +02:00
Brian Paul
46cdf0ed0a vmwgfx: set the XA_FLAG_SHARED flag for composite dest surfaces
This fixes a failed assertion in the gallium/svga driver in the
svga_texture_get_handle() function.  The texture resource wasn't
getting created with the PIPE_BIND_SHARED flag so the !cachable
assertion would fail and the X session would abort.  This didn't
happen with release builds.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-04-20 15:59:23 -06:00
Jakob Bornecrantz
4d76cfe5e8 Bump version number for the release
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-03-20 22:18:19 +01:00
Jakob Bornecrantz
c6f27561c7 vmware/legacy: Fix crash on Xserver 1.12.0
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
2012-03-20 22:17:55 +01:00
Zack Rusin
b70116b907 Fix a memory corruption due to a redundant free.
We use the empty rect purely as a placeholder and never
initialize it with its own memory so lets not try to free
it.
Spotted by Dave Airlie.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-03-15 16:54:54 -04:00