platform/upstream/xf86-video-vmware.git
12 years agovmwgfx: Kill a deprecation warning on server 1.12
Thomas Hellstrom [Wed, 1 Feb 2012 16:30:52 +0000 (17:30 +0100)]
vmwgfx: Kill a deprecation warning on server 1.12

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agovmwgfx: Fix up swap[sl] for server 1.12
Thomas Hellstrom [Wed, 1 Feb 2012 16:25:19 +0000 (17:25 +0100)]
vmwgfx: Fix up swap[sl] for server 1.12

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agovmwgfx: Avoid including a library header and use pixman for type conversion
Thomas Hellstrom [Wed, 1 Feb 2012 15:59:13 +0000 (16:59 +0100)]
vmwgfx: Avoid including a library header and use pixman for type conversion

The PictTransform type is a typedef of a pixman type.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agoBump version number for release xf86-video-vmware-11.99.901
Thomas Hellstrom [Fri, 13 Jan 2012 16:01:02 +0000 (17:01 +0100)]
Bump version number for release

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoMake the driver build pass "make distcheck"
Thomas Hellstrom [Fri, 13 Jan 2012 16:14:47 +0000 (17:14 +0100)]
Make the driver build pass "make distcheck"

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Adapt to new XA version number v2
Thomas Hellstrom [Thu, 12 Jan 2012 13:00:41 +0000 (14:00 +0100)]
vmwgfx: Adapt to new XA version number v2

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx,saa: Fix a bunch of compilation warnings
Thomas Hellstrom [Thu, 12 Jan 2012 16:57:37 +0000 (17:57 +0100)]
vmwgfx,saa: Fix a bunch of compilation warnings

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Make the default be a minimum of 800x600
Jakob Bornecrantz [Fri, 9 Dec 2011 06:34:58 +0000 (07:34 +0100)]
vmwlegacy: Make the default be a minimum of 800x600

This patch and the corresponding vmwgfx patch formalizes both drivers
on the same behviour. The minimum is 800x600 (unless the max size is
smaller). This makes it unnecessary to check against VRAM size since
it is always at least large enough to fit the max values.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmware: Make sure the driver builds on old servers
Thomas Hellstrom [Thu, 12 Jan 2012 09:00:41 +0000 (10:00 +0100)]
vmware: Make sure the driver builds on old servers

Move things around a bit so the driver compiles with
servers back to Xserver 1.0.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmware: Update Manpage
Thomas Hellström [Wed, 11 Jan 2012 13:49:56 +0000 (14:49 +0100)]
vmware: Update Manpage

Update the Manpage with new options and a brief modesetting- and 3D
description.

Signed-off-by: Thomas Hellström <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoMerge branch 'vmwgfx_branch'
Thomas Hellstrom [Mon, 19 Dec 2011 19:25:43 +0000 (20:25 +0100)]
Merge branch 'vmwgfx_branch'

12 years agosaa, vmwgfx: Fix saa_copy_composite
Thomas Hellstrom [Wed, 14 Dec 2011 11:38:27 +0000 (12:38 +0100)]
saa, vmwgfx: Fix saa_copy_composite

The traditional accelerated copy methods aren't format aware.
Make saa copy format aware,and pass formats on to the driver copy function
if available. If the driver can't handle format conversions it needs to
return FALSE.

This fixes format confusion in the copy composite fastpath.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agosaa: Always read back hw contents on poly_fill_rect
Thomas Hellstrom [Wed, 14 Dec 2011 09:22:22 +0000 (10:22 +0100)]
saa: Always read back hw contents on poly_fill_rect

The damage region may be much larger than the actual area
filled, so make sure we read back any hw contents in the damage region
since we use it to mark sw dirty.
Revisit this in the future since it may increase readbacks in an
undesired way. There are workarounds.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agosaa: Only try to accelerate pixmaps that are driver pixmaps
Thomas Hellstrom [Wed, 14 Dec 2011 09:18:16 +0000 (10:18 +0100)]
saa: Only try to accelerate pixmaps that are driver pixmaps

Trying to accelerate scratch pixmaps doesn't work currently,
and I'm not sure it's a big benefit either.

This is in line with what EXA does.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrants <jakob@vmware.com>
12 years agovmwgfx: Reduce system resource usage with textured video
Thomas Hellstrom [Thu, 8 Dec 2011 12:14:57 +0000 (13:14 +0100)]
vmwgfx: Reduce system resource usage with textured video

Use U and V textures and corresponding dma buffers that match
the size of the input UV data rather than using textures and DMA buffers
that match the Y data. This simplifies data copy and reduces the amount of
image data transfered to the host by up to 50% (YV12).

It also reduces dma buffer- and surface memory usage correspondingly.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Hook up XV color conversion control attributes
Thomas Hellstrom [Wed, 7 Dec 2011 19:19:34 +0000 (20:19 +0100)]
vmwgfx: Hook up XV color conversion control attributes

This enables the standard XV color conversion control attributes
contrast, scaling, saturation and hue.

Currently the attribute change takes effect on the next image only.
If we ever implement a ReputImage callback, we can use it to update
the image immediately on attribute change.

The attribute ranges follow those used by the proprietary Nvidia driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Adapt to new interface of xa_yuv_planar_blit
Thomas Hellstrom [Wed, 7 Dec 2011 13:17:45 +0000 (14:17 +0100)]
vmwgfx: Adapt to new interface of xa_yuv_planar_blit

Also make it easier to modify the color conversion matrix based on
yuv encoding properties.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Fix MessageType members that are incorrectly typed as Bool
Thomas Hellstrom [Tue, 6 Dec 2011 09:00:00 +0000 (10:00 +0100)]
vmwgfx: Fix MessageType members that are incorrectly typed as Bool

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Add an option to enable rendercheck mode
Thomas Hellstrom [Tue, 6 Dec 2011 08:53:16 +0000 (09:53 +0100)]
vmwgfx: Add an option to enable rendercheck mode

Rendercheck mode is used to enable acceleration of all supported composite
operations, regardless of the current data location. The mode is off by
default, but could be turned on to test the hardware composite operation
implementation. Due to excessive data migration, rendercheck mode will be
slow.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Adapt to the dri state tracker sending depth instead of bpp
Thomas Hellstrom [Tue, 6 Dec 2011 08:21:25 +0000 (09:21 +0100)]
vmwgfx: Adapt to the dri state tracker sending depth instead of bpp

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Don't register back buffers as "hw_is_dri2_fronts" v2
Thomas Hellstrom [Mon, 5 Dec 2011 19:58:45 +0000 (20:58 +0100)]
vmwgfx: Don't register back buffers as "hw_is_dri2_fronts" v2

That is reserved for dri2 front or fake front pixmaps that need
immediate flushing of software contents to hardware.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Include drm.h from correct path
Jakob Bornecrantz [Thu, 1 Dec 2011 15:47:41 +0000 (16:47 +0100)]
vmwgfx: Include drm.h from correct path

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Make the drm device name persistent
Thomas Hellstrom [Mon, 28 Nov 2011 13:51:36 +0000 (14:51 +0100)]
vmwgfx: Make the drm device name persistent

The DRI2 code doesn't copy the device name, but assumes the storage
is persistent.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
12 years agovmwgfx: Get the drm device name from the open file descriptor
Thomas Hellstrom [Fri, 25 Nov 2011 13:38:45 +0000 (14:38 +0100)]
vmwgfx: Get the drm device name from the open file descriptor

Rather than hardcoding it.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Use config options to optionally set GUI topology
Thomas Hellstrom [Fri, 25 Nov 2011 10:27:26 +0000 (11:27 +0100)]
vmwgfx: Use config options to optionally set GUI topology

Use option "StaticXinerama" or "GuiLayout" to set initial GUI topology,
similar to how these options are used with the legacy driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Factor out code that can be common for vmwgfx and vmwlegacy
Thomas Hellstrom [Wed, 23 Nov 2011 10:02:00 +0000 (11:02 +0100)]
vmwlegacy: Factor out code that can be common for vmwgfx and vmwlegacy

In this case it's the parsing of the gui / statix xinerama topology.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Accept option "GuiLayout" as a synonym for "staticXinerama"
Thomas Hellstrom [Wed, 23 Nov 2011 09:49:33 +0000 (10:49 +0100)]
vmwlegacy: Accept option "GuiLayout" as a synonym for "staticXinerama"

It's more user-friendly and in line with what it's being used for in the
vmwgfx driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmware: Update library dependencies
Thomas Hellstrom [Fri, 25 Nov 2011 08:42:16 +0000 (09:42 +0100)]
vmware: Update library dependencies

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Pre-init fixes
Thomas Hellstrom [Tue, 22 Nov 2011 20:06:24 +0000 (21:06 +0100)]
vmwgfx: Pre-init fixes

A bunch of fixes that makes the fallback from vmwgfx to vmwlegacy easier.

1) Allow only 16 and 24 bit depths with vmwgfx. We may revisit this later.
2) Try to reclaim some resources if pre_init fails.
3) Print error messages so the user understands what happens on fallback.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmware: Update the vmware register definition
Thomas Hellstrom [Fri, 25 Nov 2011 08:15:32 +0000 (09:15 +0100)]
vmware: Update the vmware register definition

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmware: Hook up vmwgfx to be tried before falling back to legacy
Thomas Hellstrom [Tue, 22 Nov 2011 18:56:20 +0000 (19:56 +0100)]
vmware: Hook up vmwgfx to be tried before falling back to legacy

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Factor out bootstrap functions
Thomas Hellstrom [Tue, 22 Nov 2011 17:37:44 +0000 (18:37 +0100)]
vmwlegacy: Factor out bootstrap functions

Preparing for choosing driver path in preinit instead of using
shim loader.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Fix up Xinerama / panoramiX replies.
Thomas Hellstrom [Thu, 17 Nov 2011 15:38:22 +0000 (16:38 +0100)]
vmwlegacy: Fix up Xinerama / panoramiX replies.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwlegacy: Fix device fifo communication
Thomas Hellstrom [Wed, 16 Nov 2011 09:23:10 +0000 (10:23 +0100)]
vmwlegacy: Fix device fifo communication

This fixes two issues with the device fifo communication:
1) Idle the fifo before initializing it. If the fifo is already up and
processing data due to an uncleanly shut down server, and init could
otherwise confuse the device.

2) Mark fifo memory volatile when writing to it and make sure commands
are written before telling the device they are available.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Make sure we don't render when VT switched
Thomas Hellstrom [Wed, 9 Nov 2011 10:34:16 +0000 (11:34 +0100)]
vmwgfx: Make sure we don't render when VT switched

When compiz is enabled, we may try to DMA sw rendered contents of dri2
drawables to surfaces while VT switched. I'm not sure how this could be
happening, but queue the DMA until the next block handler.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
12 years agovmwgfx: Fix rendering errors when rotating / unrotating a screen.
Thomas Hellstrom [Tue, 8 Nov 2011 14:28:40 +0000 (15:28 +0100)]
vmwgfx: Fix rendering errors when rotating / unrotating a screen.

The dirty trackers weren't correctly translated to
pending presents / updates when a pixmap was bound as a scanout.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrants <jakob@vmware.com>
12 years agovmwgfx: A number of damage fixes
Thomas Hellstrom [Tue, 8 Nov 2011 13:49:36 +0000 (14:49 +0100)]
vmwgfx: A number of damage fixes

A damage tracker was sometimes attached to a pixmap in the middle of an
operation. That meant that damage was never registered for that operation
which caused dirty-tracking to fail. Instead, add a damage tracker as
soon as we have storage attached to the pixmap.

Also, when a pixmap was resized, the dirty region trackers could become
stale, and cause DMA operation extending outside of the pixmap with
server crashes as a result. This commit fixes that.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Add an option to use a scanout surface
Thomas Hellstrom [Tue, 1 Nov 2011 14:39:07 +0000 (15:39 +0100)]
vmwgfx: Add an option to use a scanout surface

With this option enabled, we compose all contents (both sw and hw) in
the guest before presenting it. Just like the old xorg state tracker did
when 3D was enabled. It's not as bad as the old xorg state tracker was for
interactivity, but there's a small but noticeable lag when moving windows.

It's mainly intended for testing purposes, like testing the surface
dirty paths in the kernel module.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Be correct when setting up damage tracking
Thomas Hellstrom [Tue, 1 Nov 2011 08:59:18 +0000 (09:59 +0100)]
vmwgfx: Be correct when setting up damage tracking

When setting up damage tracking, previously the code would guess wether
sw or hw was currently dirty. The caller always have that information,
so pass it to the damage tracking setup function.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Add an option for direct presents
Thomas Hellstrom [Tue, 1 Nov 2011 07:38:52 +0000 (08:38 +0100)]
vmwgfx: Add an option for direct presents

With this option set to true, accelerated copies to a scanout pixmap will
be performed as hardware presents instead of copies to an intermediate
3D surface backing the scanout pixmap, followed by a present.

Depending on the application this might be a performance boost, but since
it might trigger device software readbacks in other situations, for example
dri2 copy front->fake_front, it might be a performance hog in other situations,
so disable it by default. (Before this commit it was enabled by default).

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Fix acceleration options.
Thomas Hellstrom [Mon, 31 Oct 2011 14:14:21 +0000 (15:14 +0100)]
vmwgfx: Fix acceleration options.

Introduce relevant acceleration options and fix up the log printout.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
12 years agovmwgfx: Remove a couple of unused options
Thomas Hellstrom [Mon, 31 Oct 2011 13:40:55 +0000 (14:40 +0100)]
vmwgfx: Remove a couple of unused options

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
12 years agovmwgfx: Don't do present readbacks per crtc
Thomas Hellstrom [Mon, 31 Oct 2011 13:27:29 +0000 (14:27 +0100)]
vmwgfx: Don't do present readbacks per crtc

The kernel now takes care of doing this the right way;
no need to duplicate that functionality.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Fall back to sw cursors if needed
Thomas Hellstrom [Mon, 31 Oct 2011 09:50:09 +0000 (10:50 +0100)]
vmwgfx: Fall back to sw cursors if needed

If there is a risc that we need two simultaneous cursors,
(two outputs showing the same contents, at least one of them explicit),
fall back to sw cursor.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Fix crtc position of transformed fb
Thomas Hellstrom [Wed, 26 Oct 2011 14:33:30 +0000 (16:33 +0200)]
vmwgfx: Fix crtc position of transformed fb

The fb allocated for transformed data always matches the scanout region,
so set the crtc origin to (0,0)

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Hook up vmwarectrl to the gui layout ioctl
Thomas Hellstrom [Wed, 26 Oct 2011 13:08:18 +0000 (15:08 +0200)]
vmwgfx: Hook up vmwarectrl to the gui layout ioctl

Requires drm 2.3.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Update the connector type name array
Thomas Hellstrom [Wed, 26 Oct 2011 05:28:31 +0000 (07:28 +0200)]
vmwgfx: Update the connector type name array

Also map connector types that are not in the array to "Unknown".

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agovmwgfx: Save the dri2 requested depth since it may differ from the drawable
Thomas Hellstrom [Fri, 21 Oct 2011 09:19:36 +0000 (11:19 +0200)]
vmwgfx: Save the dri2 requested depth since it may differ from the drawable
depth.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoBuild fix for ABI version 12
Jeremy Huddleston [Fri, 7 Oct 2011 20:15:11 +0000 (13:15 -0700)]
Build fix for ABI version 12

This results in the vmware driver assuming there is only one PCI domain,
which I think is true for everywhere this is expected to run anyway.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoFix build failures resulting from changes to the swaps and swapl macros in recent...
Jeremy Huddleston [Fri, 7 Oct 2011 20:10:59 +0000 (13:10 -0700)]
Fix build failures resulting from changes to the swaps and swapl macros in recent xorg-server

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoxf86-video-vmware 11.0.99.901 xf86-video-vmware-11.0.99.901
Thomas Hellstrom [Wed, 5 Oct 2011 11:33:17 +0000 (13:33 +0200)]
xf86-video-vmware 11.0.99.901

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agoUse dixLookupWindow instead of LookupWindow on Xorg 1.5 & later
Alan Coopersmith [Wed, 28 Sep 2011 02:31:22 +0000 (19:31 -0700)]
Use dixLookupWindow instead of LookupWindow on Xorg 1.5 & later

The LookupWindow function was deprecated in xserver commit ed75b056511ccb4
and removed during the Xorg 1.11 merge window by commit 82a8677d9175732.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agovmwgfx: Adapt to vmwgfx kernel driver 2.1
Thomas Hellstrom [Thu, 1 Sep 2011 11:59:10 +0000 (13:59 +0200)]
vmwgfx: Adapt to vmwgfx kernel driver 2.1

This introduces fence objects with 2.0, and present / present readback
ioctls with 2.1.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agoFix wrong-sized swaps
Matt Turner [Sun, 25 Sep 2011 18:06:47 +0000 (14:06 -0400)]
Fix wrong-sized swaps

Signed-off-by: Matt Turner <mattst88@gmail.com>
12 years agovmwgfx-xorg: Avoid enabling unwanted outputs in initial configuration
Thomas Hellstrom [Tue, 30 Aug 2011 10:22:53 +0000 (12:22 +0200)]
vmwgfx-xorg: Avoid enabling unwanted outputs in initial configuration

Add a hack so that we avoid enabling all connected outputs during the
initial configuration. On older X servers they would be enabled as cloned,
which didn't really cause any problem, but on later X servers they would
initially be enabled next to eachother which looks odd.

A RandR call will still show the disabled outputs as connected, and if there
is a monitor section in the config file for the output in question,
it will also have a connected status, so that it may be explicitly enabled
or disabled from a config file.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agovmwgfx: Just include vmwgfx_drm.h
Jakob Bornecrantz [Wed, 13 Jul 2011 15:30:01 +0000 (16:30 +0100)]
vmwgfx: Just include vmwgfx_drm.h

We do this in mesa as well

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agosaa: Remove superflouos headers includes
Jakob Bornecrantz [Wed, 13 Jul 2011 15:28:52 +0000 (16:28 +0100)]
saa: Remove superflouos headers includes

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agovmwgfx: Fix logic when checking for XA
Jakob Bornecrantz [Mon, 11 Jul 2011 11:23:32 +0000 (12:23 +0100)]
vmwgfx: Fix logic when checking for XA

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agovmwgfx: Don't dirty the front buffer as hw when doing a dri2copyregion from it
Thomas Hellstrom [Sat, 9 Jul 2011 20:54:41 +0000 (22:54 +0200)]
vmwgfx: Don't dirty the front buffer as hw when doing a dri2copyregion from it

When copying from a dri2 buffer we usually dirty it as hw, since dri has
been rendering to it, and there can only be hw contents in the buffer.

However for the real front, X has already done the dirty work for us.

Also remove a glxWaitX() debug message.

This should fix piglit read-front.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Add boolean flags for different rendering modes
Thomas Hellstrom [Thu, 7 Jul 2011 20:02:15 +0000 (22:02 +0200)]
vmwgfx: Add boolean flags for different rendering modes

Basically we support three ways of getting data to the screen:
1) Mixed mode: We mix presents and updates.
2) Mixed present optimized: A version of mixed where copies to the front
   buffer end up as presents, saving a blit.
3) 3D surface mode: We only present from a 3D surface. Software contents are
   first DMA'd to that surface.

This change adds boolean flags to the saa struct to select which mode to use.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Various acceleration fixes.
Thomas Hellstrom [Thu, 7 Jul 2011 07:21:56 +0000 (09:21 +0200)]
vmwgfx: Various acceleration fixes.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Fix server termination due to pitch inconsistency.
Thomas Hellstrom [Mon, 4 Jul 2011 13:39:02 +0000 (15:39 +0200)]
vmwlegacy: Fix server termination due to pitch inconsistency.

Don't require a 32*32 bit pitch alignment when validating modes, since the
requested virtual pitch (pVMWARE->maxWidth*bpp) must be a multiple of that
alignment. If not, the server will terminate with a cryptic error message.

This is only for validating modes. The driver will adjust the pitch to the
host requirement when a mode is set anyway, and hopefully the host won't
require a pitch it doesn't support.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Require libxatracker >= 0.4.
Thomas Hellstrom [Fri, 1 Jul 2011 11:23:30 +0000 (13:23 +0200)]
vmwgfx: Require libxatracker >= 0.4.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Set up XA version checking.
Thomas Hellstrom [Fri, 1 Jul 2011 10:29:50 +0000 (12:29 +0200)]
vmwgfx: Set up XA version checking.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Try to sort out format handling with composite.
Thomas Hellstrom [Fri, 1 Jul 2011 09:28:52 +0000 (11:28 +0200)]
vmwgfx: Try to sort out format handling with composite.

Try to catch all cases where we have to do readbacks or format conversions
due to composite formats not being compatible with ordinary accel formats.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Support xa composite.
Thomas Hellstrom [Wed, 22 Jun 2011 20:26:20 +0000 (22:26 +0200)]
vmwgfx: Support xa composite.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agosaa: Add driver composite.
Thomas Hellstrom [Wed, 22 Jun 2011 09:33:14 +0000 (11:33 +0200)]
saa: Add driver composite.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agosaa: Reuse code for computing composite bounds.
Thomas Hellstrom [Wed, 22 Jun 2011 08:50:35 +0000 (10:50 +0200)]
saa: Reuse code for computing composite bounds.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Try to match created hardware formats with the dri state tracker.
Thomas Hellstrom [Mon, 20 Jun 2011 22:13:32 +0000 (00:13 +0200)]
vmwgfx: Try to match created hardware formats with the dri state tracker.

13 years agovmwgfx: Fix dirty present bug
Thomas Hellstrom [Mon, 20 Jun 2011 19:57:38 +0000 (21:57 +0200)]
vmwgfx: Fix dirty present bug

Clear dirty present areas when new contents are drawn to the backing
pixmap. Not when it is actually pushed to the screen.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Don't call xa_copy_done after a present.
Thomas Hellstrom [Mon, 20 Jun 2011 19:48:23 +0000 (21:48 +0200)]
vmwgfx: Don't call xa_copy_done after a present.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Make present readbacks not cross scanout bounding box boundaries
Thomas Hellstrom [Mon, 20 Jun 2011 12:13:46 +0000 (14:13 +0200)]
vmwgfx: Make present readbacks not cross scanout bounding box boundaries

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Make a list of scanout bounding boxes available to each scanout pixmap
Thomas Hellstrom [Mon, 20 Jun 2011 07:58:44 +0000 (09:58 +0200)]
vmwgfx: Make a list of scanout bounding boxes available to each scanout pixmap

This info is needed for present readback.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Import the WSBM list macros
Thomas Hellstrom [Mon, 20 Jun 2011 07:05:48 +0000 (09:05 +0200)]
vmwgfx: Import the WSBM list macros

Use WSBM list handling macros for the glxWaitX flush list.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Check for large files
Thomas Hellstrom [Fri, 17 Jun 2011 09:25:53 +0000 (11:25 +0200)]
vmwgfx: Check for large files

Fixes segfault on 32-bit servers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx, saa: Build saa as a convenience library
Thomas Hellstrom [Fri, 17 Jun 2011 06:18:13 +0000 (08:18 +0200)]
vmwgfx, saa: Build saa as a convenience library

instead of as a shared object.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx: Fix up driver build process for Xserver >= 1.7.
Thomas Hellstrom [Thu, 16 Jun 2011 19:21:25 +0000 (21:21 +0200)]
vmwgfx: Fix up driver build process for Xserver >= 1.7.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwgfx, saa: Initial import
Thomas Hellstrom [Thu, 16 Jun 2011 13:55:07 +0000 (15:55 +0200)]
vmwgfx, saa: Initial import

This imports the vmwgfx driver, based on the Gallium3D Xorg state tracker,
as well as the saa library. A "Shadow Acceleration Architecture", which is
optimized for the case where transfers between system (shadow) and hw memory
is very costly.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Don't prune modes based on the virtual size of the default mode
Thomas Hellstrom [Wed, 30 Mar 2011 10:37:24 +0000 (12:37 +0200)]
vmwlegacy: Don't prune modes based on the virtual size of the default mode

We might be pruning modes based on the virtual size of the default mode in
some situations. Avoid this by allowing a virtual size equal to the device
max size, unless the user has requested something else.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
13 years agovmwlegacy: Fix up default mode VRefresh anc Clock calculation
Thomas Hellstrom [Wed, 30 Mar 2011 10:22:43 +0000 (12:22 +0200)]
vmwlegacy: Fix up default mode VRefresh anc Clock calculation

The VRefresh value was a factor 1000 too high.
Calculate clock based on vrefresh and resolution.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
13 years agovmwlegacy: Fix a bug in screen dimension calculation
Thomas Hellstrom [Wed, 30 Mar 2011 09:01:06 +0000 (11:01 +0200)]
vmwlegacy: Fix a bug in screen dimension calculation

This bug resulted in incorrect screen dimensions and DPI being calculated
in some circumstances, leading to among other things bad aspect ratios in xine.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Make sure we draw the colorkey to the right drawable
Thomas Hellstrom [Tue, 29 Mar 2011 11:03:39 +0000 (13:03 +0200)]
vmwlegacy: Make sure we draw the colorkey to the right drawable

Don't draw the colorkey to the screen drawable, but to the video drawable
when possible.

Also change the Xv API/ABI test to use the builtin ABI version
functions.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <daenzer@vmware.com>
13 years agovmwlegacy: Silence a number of warnings
Thomas Hellstrom [Tue, 29 Mar 2011 09:18:24 +0000 (11:18 +0200)]
vmwlegacy: Silence a number of warnings

This potentially also fixes a use of an uninitialized pointer value, which
may cause OOM or segfaults.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <daenzer@vmware.com>
13 years agovmwlegacy: Fix segfault and setup of initial mode.
Thomas Hellstrom [Fri, 25 Mar 2011 18:17:00 +0000 (19:17 +0100)]
vmwlegacy: Fix segfault and setup of initial mode.

The fact that modes were added without names caused segfaults on older
X servers. At least up to and including Xserver 1.4.

Also, for some reason, at least Xserver 1.4 insists on setting the first mode
in the modelist, even if we set another mode as the current one.

Work around this by inserting a new mode with the current screen dimensions,
and add that modename last to the array of display requested mode names.
This means that if none of the previous mode names are found, we will at least
find the newly inserted mode.

Also, if there are no requested mode names at all, the driver previously
chose the largest mode that fit the timings. Now we will, in that case,
always select the newly inserted mode and thus not change resolution unless
specified.

Also add an option to not add this default mode. The option
"AddDefaultMode" is true by default.

Finally when we restore registers at exit and VT switch, make sure we
reprogram the initial width, height and bpp for the next time we start a
server.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoRemove unused variable
Thomas Hellstrom [Thu, 3 Mar 2011 08:47:48 +0000 (09:47 +0100)]
Remove unused variable

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Fix mode lookup
Alan Hourihane [Wed, 16 Feb 2011 17:53:14 +0000 (18:53 +0100)]
vmwlegacy: Fix mode lookup

In situations where we have trouble finding a specified mode,
use the resolution given by the width and height device registers.

Signed-off-by: Alan Hourihane <alanh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Add a missing include
Thomas Hellstrom [Wed, 16 Feb 2011 17:47:02 +0000 (18:47 +0100)]
vmwlegacy: Add a missing include

The test for Xserver >= 1.2 in the affected file was always failing.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <daenzer@vmware.com>
13 years agovmwlegacy: Don't attempt to call RRSendConfigNotify on Xservers < 1.2
Thomas Hellstrom [Wed, 16 Feb 2011 16:29:47 +0000 (17:29 +0100)]
vmwlegacy: Don't attempt to call RRSendConfigNotify on Xservers < 1.2

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
Reviewed-by: Michel Dänzer <daenzer@vmware.com>
13 years agovmwlegacy: Send ConfigureNotify events on Xinerama state changes with no mode change
Michel Dänzer [Thu, 27 Jan 2011 10:09:39 +0000 (11:09 +0100)]
vmwlegacy: Send ConfigureNotify events on Xinerama state changes with no mode change

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoFix crosscompile build for older Xservers v2
Thomas Hellstrom [Thu, 27 Jan 2011 10:02:44 +0000 (11:02 +0100)]
Fix crosscompile build for older Xservers v2

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoRevert "Fix crosscompile build for older Xservers"
Thomas Hellstrom [Fri, 21 Jan 2011 22:07:10 +0000 (23:07 +0100)]
Revert "Fix crosscompile build for older Xservers"

This reverts commit 16e16390385d890b3666485a40369f4c690d5033.

The fix was bogus as pointed out by Cyril Bruleboid <kibi@debian.org>, and
Gaetan Nadon <memsize@videotron.ca>

13 years agoFix crosscompile build for older Xservers
Thomas Hellstrom [Thu, 13 Jan 2011 12:17:17 +0000 (13:17 +0100)]
Fix crosscompile build for older Xservers

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Remove Write-Combining setups
Thomas Hellstrom [Thu, 13 Jan 2011 11:52:14 +0000 (12:52 +0100)]
vmwlegacy: Remove Write-Combining setups

The virtual CPUs doesn't support it anyway.
Once suggested by Michel Daenzer.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoBump package version to 11.0.3 for release xf86-video-vmware-11.0.3
Thomas Hellstrom [Tue, 9 Nov 2010 13:31:30 +0000 (14:31 +0100)]
Bump package version to 11.0.3 for release

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoPurge cvs tags.
Jesse Adkins [Tue, 28 Sep 2010 20:29:52 +0000 (13:29 -0700)]
Purge cvs tags.

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoMake the modinfo string contain an optional subpatch number
Thomas Hellstrom [Thu, 16 Sep 2010 08:08:12 +0000 (10:08 +0200)]
Make the modinfo string contain an optional subpatch number

The idea is that the build system assigns this number if needed.
As an example it might be the commit number since the last version tag.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agoMake sure we build on 1.4.99.
Thomas Hellstrom [Thu, 16 Sep 2010 07:58:07 +0000 (09:58 +0200)]
Make sure we build on 1.4.99.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: Fix a segfault in vmwareCursorCloseScreen.
Thomas Hellstrom [Wed, 8 Sep 2010 07:57:35 +0000 (09:57 +0200)]
vmwlegacy: Fix a segfault in vmwareCursorCloseScreen.

The segfault occured because the named function was using resources that
were already taken down, because VMWARECloseScreen was called very late
in the CloseScreen callchain.

Make sure we wrap the CloseScreen pointers late in ScreenInit to avoid this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmwlegacy: A number of Xv fixes
Thomas Hellstrom [Tue, 7 Sep 2010 19:55:28 +0000 (21:55 +0200)]
vmwlegacy: A number of Xv fixes

Properly init and uninit the port private clipboxes on setup and end.
Clear the port private clipboxes on video stop, to force re-painting
of the colorkey when the stream is resumed.
Make sure the colorkey is painted *before* the overlay is flushed. Some
host implementations seem picky about this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agovmware/vmwlegacy: Silence compilation errors and -warnings.
Thomas Hellstrom [Tue, 7 Sep 2010 10:17:46 +0000 (12:17 +0200)]
vmware/vmwlegacy: Silence compilation errors and -warnings.

Silence warnings and errors on various server versions due to incorrect
usage of libc functions.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>