summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-01-28vmware/vmwgfx: Expose KMS connector properties and react to hotplug eventsfeature/thellstrom/resolutionKMSThomas Hellstrom4-47/+432
Optionally re-export KMS connector properties as Xserver output properties. Also install an udev monitor that rereads KMS information when it has changed. Some of this code is stolen from the modesetting- and qxl drivers. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-11-18vmware/vmwgfx: Make large Xv video blits cheaperThomas Hellstrom1-8/+267
As screens grow larger, attempt to make large Xv video blits cheaper by performing the color conversion and scaling in two steps: 1) Color conversion which has a 4x4 matrix multiplication shader is performed to a bounce buffer the size of which is never larger than the source image. 2) Scaling is performed as a src composite blit to the destination image with a simple copy shader. This split is done only if the destination image is substantially larger than the source image / bounce buffer Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2014-10-14xf86xv.h cannot be included without first including xorg-server.h.Stefan Dirsch1-0/+1
Without this the build fails on systems with the latest glibc, throwing this error: In file included from /usr/include/string.h:634:0, from /usr/include/xorg/os.h:53, from /usr/include/xorg/misc.h:115, from /usr/include/xorg/screenint.h:50, from /usr/include/xorg/scrnintstr.h:50, from /usr/include/xorg/xvdix.h:55, from /usr/include/xorg/xf86xv.h:32, from vmwgfx_overlay.c:38: /usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__' strndup(const char *str, size_t n); This is caused by HAVE_STRNDUP not being set (it is set from xorg-server.h), causing os.h to redefine it. Signed-off-by: Stefan Dirsch <sndirsch@suse.de> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-09-24vmware/saa: Fix saa_check_poly_fill_rect_noreadback v2Thomas Hellstrom1-11/+9
We were not clipping the dirty region correctly, Fix this. Also actually do what the comment in the function says: If there are more than an ad-hoc number of rectangles to read back, then revert to the default saa_check_poly_fill_rect function that reads back the whole damage region. v2: Fix commit log message. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-24vmware/saa: Fix saa_check_copy_window dirty region v3Thomas Hellstrom1-1/+23
The saa_check_copy_window could dirty regions that were never touched, since we were using the X server provided damage region rather than the more detailed region actually copied. This would have been OK if we had first done a read-back of the region to be dirtied, but since we want to avoid that, instead compute the detailed destination region and use that for dirtying. This fixes rendering glitches seen with motif applications. v2: Fix whitespace error. v3: Move dirty region computation. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-23Revert "vmware/saa: Disable the noreadback polyfillrect optimization"Thomas Hellstrom1-11/+1
This reverts commit 88c487cb19aaf2882d582f7f887a52935ef8d92e. While the commit made the rendering artefacts less frequent, they didn't disappear completely and are likely caused by something else, so revert this commit. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Acked-by: Sinclair Yeh <syeh@vmware.com>
2014-09-09vmware/vmwgfx: Fix cursor problem with multimonThomas Hellstrom1-0/+9
In a multimon environment, the cursor would sometimes disappear on the newly enabled screen. Fix this. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-03vmware/vmwgfx: Don't add pixmaps to the pixmap list if they're already on itThomas Hellstrom1-1/+2
This could cause loops through the list to spin indefinitely. This would most likely occur at VT switches. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-08-28vmware/legacy: Fix overlay related compile breakage on earlier X serversThomas Hellstrom1-0/+4
Introduced by commit: vmware/legacy: Apply same fix to auto colrkey fill Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-08-28vmware: Fix bootstrap related compile errors on earlier X serversThomas Hellstrom1-2/+5
Introduced by commit Add support for XSERVER_PLATFORM_BUS Note that the vmware DriverRec declaration can be cleaned up considerably using C99 designated initializers. Perhaps something for the next release... Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-08-25vmware: Clear the PITCHLOCK register if available before modesetThomas Hellstrom1-1/+4
In some situations the fbdev driver may have set this register before legacy driver startup causing a weird-looking desktop. Make sure this register is cleared on each modeset. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-08-14vmware/legacy: Fix out of bound array indexingJakob Bornecrantz1-1/+1
Spotted by coverity. Reported-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2014-08-11vmware/vmwgfx: Fix compilation issue on older X serversJakob Bornecrantz1-0/+2
Introduced in 268307 "Add support for server managed fds" Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-08-11vmware/legacy: Fix uninitialized values in video commandsJakob Bornecrantz1-1/+2
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-07-03vmware/vmwgfx: Fix an error path segfaultThomas Hellstrom1-0/+1
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-05-23vmware/legacy: Apply same fix to auto colorkey fillJakob Bornecrantz1-1/+6
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23vmware/vmwgfx: Fix auto colorkey fill usageJakob Bornecrantz1-10/+18
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23vmware/vmwgfx: A bit more error logging when handling cursorsJakob Bornecrantz1-1/+7
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-23vmware/vmwgfx: Don't move cursors without imagesJakob Bornecrantz1-0/+4
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
2014-05-21vmware/vmwgfx: Fix xwayland build on newer XA versionsThomas Hellstrom1-1/+1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-14Add support for server managed fdsHans de Goede3-4/+34
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-05-14Add support for XSERVER_PLATFORM_BUSHans de Goede3-8/+53
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-09vmware/saa: Disable the noreadback polyfillrect optimizationThomas Hellstrom1-1/+11
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-08vmware/vmwgfx: Fix initial dirty region for pixmapsThomas Hellstrom1-1/+2
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-04-11vmware/vmwgfx: Set desired modes after xMir screen initThomas Hellstrom1-0/+6
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-03vmware/vmwgfx: Don't tell XA that we have a mask when we haven'tThomas Hellstrom1-0/+2
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-03vmware/vmwgfx: Don't change backing-store of active scanout surfacesThomas Hellstrom3-11/+70
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-01configure: fix build without xatrackerJulien Cristau1-1/+1
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-03-26Bump the version number to 13.0.2xf86-video-vmware-13.0.2Jakob Bornecrantz1-1/+1
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-26vmware: Fix compilation on newer X serversJakob Bornecrantz1-1/+3
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-01-15vmware/vmwgfx: Always allocate shared hardware surfaces.Thomas Hellstrom2-2/+2
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-09vmware: Require libdrm 2.4.38 to build XMir.Thomas Hellstrom6-2/+14
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-01-09vmware: Fix build errors and warningsThomas Hellstrom5-6/+7
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-09vmwgfx: Block DMA to prime surfaces for nowhostedThomas Hellstrom2-16/+25
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-08vmwgfx: Enable direct dmasThomas Hellstrom1-1/+1
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>
2013-12-19vmwgfx: Add support for XWaylandThomas Hellstrom4-0/+194
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2013-12-19vmwgfx: Add support for XMir v2.Thomas Hellstrom9-20/+433
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-19vmwgfx: Add an infrastructure to be able to run hosted under a compositor v2Thomas Hellstrom10-121/+610
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-16vmwgfx: Fix compile breakage on XA version 1.Thomas Hellstrom1-2/+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-12vmwgfx: Really allow XA version 2.Thomas Hellstrom1-1/+1
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-12Revert "vmwgfx: Get rid of device-specific DMA code"Thomas Hellstrom4-26/+136
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>
2013-12-12vmwgfx: Remove stray 1Thomas Hellstrom1-1/+1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2013-12-06vmwgfx: Support also XA version 1 v2Thomas Hellstrom6-14/+30
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-05vmwgfx: Fix some compilation warnings and indentationsThomas Hellstrom6-21/+18
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-11-18vmwgfx: handle changes of DamageUnregister API in 1.14.99.2Gaetan Nadon1-0/+6
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-09-30vmwgfx: Get rid of device-specific DMA codeThomas Hellstrom4-136/+26
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-30vmwgfx: Implement textured video completely on top of XA.Thomas Hellstrom1-95/+14
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-30vmwgfx: Avoid HW operations when not masterThomas Hellstrom6-1/+75
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-08-02vmwgfx: update for XA API changesRob Clark5-12/+23
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-04-17Bump the version number to 13.0.1xf86-video-vmware-13.0.1Jakob Bornecrantz1-1/+1