Commit Graph

248 Commits

Author SHA1 Message Date
Thomas Hellstrom
8ddbb3216d 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>
2012-01-12 13:54:22 +01:00
Thomas Hellström
194ff6f151 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>
2012-01-12 13:53:53 +01:00
Thomas Hellstrom
b5546fb1de Merge branch 'vmwgfx_branch' 2011-12-19 20:25:43 +01:00
Thomas Hellstrom
5748c33535 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>
2011-12-15 08:32:14 +01:00
Thomas Hellstrom
f664e31d73 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>
2011-12-15 08:31:16 +01:00
Thomas Hellstrom
0eef224370 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>
2011-12-15 08:30:29 +01:00
Thomas Hellstrom
afd2f828b8 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>
2011-12-08 17:35:18 +01:00
Thomas Hellstrom
121dba0093 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>
2011-12-08 09:56:30 +01:00
Thomas Hellstrom
8bdc6004d3 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>
2011-12-08 09:55:42 +01:00
Thomas Hellstrom
dba7b865d3 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>
2011-12-06 18:22:55 +01:00
Thomas Hellstrom
2c438ad8b8 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>
2011-12-06 18:22:55 +01:00
Thomas Hellstrom
1736a76246 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>
2011-12-06 18:22:55 +01:00
Thomas Hellstrom
fb35176958 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>
2011-12-06 18:22:55 +01:00
Jakob Bornecrantz
3c2486e05e vmwgfx: Include drm.h from correct path
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-01 17:20:07 +01:00
Thomas Hellstrom
995d86ceb0 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>
2011-11-28 19:36:26 +01:00
Thomas Hellstrom
08ca819238 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>
2011-11-25 17:06:06 +01:00
Thomas Hellstrom
d7576c2c50 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>
2011-11-25 17:04:40 +01:00
Thomas Hellstrom
22d3e58b88 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>
2011-11-25 17:00:41 +01:00
Thomas Hellstrom
2e8aac7031 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>
2011-11-25 16:59:46 +01:00
Thomas Hellstrom
31e80b2a60 vmware: Update library dependencies
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:58:36 +01:00
Thomas Hellstrom
da29c64805 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>
2011-11-25 16:57:34 +01:00
Thomas Hellstrom
e52b1505cf vmware: Update the vmware register definition
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25 16:56:52 +01:00
Thomas Hellstrom
1c77e3d743 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>
2011-11-25 16:56:11 +01:00
Thomas Hellstrom
2aa256c964 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>
2011-11-25 16:51:46 +01:00
Thomas Hellstrom
abf9cb7563 vmwlegacy: Fix up Xinerama / panoramiX replies.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-22 08:19:18 +01:00
Thomas Hellstrom
be23efbc91 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>
2011-11-17 16:16:34 +01:00
Thomas Hellstrom
70487eee97 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>
2011-11-09 14:04:11 +01:00
Thomas Hellstrom
e1810e0b09 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>
2011-11-09 14:03:02 +01:00
Thomas Hellstrom
d0b493d67a 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>
2011-11-09 14:02:17 +01:00
Thomas Hellstrom
aff799d007 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>
2011-11-01 18:37:10 +01:00
Thomas Hellstrom
5137e8736e 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>
2011-11-01 18:37:10 +01:00
Thomas Hellstrom
ed7bba3cda 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>
2011-11-01 18:37:10 +01:00
Thomas Hellstrom
b2c4a7e682 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>
2011-10-31 16:57:37 +01:00
Thomas Hellstrom
da85719e9e 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>
2011-10-31 16:56:33 +01:00
Thomas Hellstrom
b6faecc761 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>
2011-10-31 16:55:48 +01:00
Thomas Hellstrom
cc7c1c961b 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>
2011-10-31 15:27:12 +01:00
Thomas Hellstrom
427064b57c 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>
2011-10-31 15:21:49 +01:00
Thomas Hellstrom
55113dae7c 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>
2011-10-31 15:20:53 +01:00
Thomas Hellstrom
c73a7f3d99 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>
2011-10-26 13:19:57 +02:00
Thomas Hellstrom
a33710b0d1 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>
2011-10-26 13:19:32 +02:00
Jeremy Huddleston
4c08c26009 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>
2011-10-07 13:15:11 -07:00
Jeremy Huddleston
208ccbc717 Fix build failures resulting from changes to the swaps and swapl macros in recent xorg-server
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-07 13:10:59 -07:00
Thomas Hellstrom
de70a1d0cb xf86-video-vmware 11.0.99.901
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-10-05 13:33:17 +02:00
Alan Coopersmith
26845eb54a 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>
2011-10-05 13:30:49 +02:00
Thomas Hellstrom
5c43481aa6 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>
2011-09-29 20:30:21 +02:00
Matt Turner
b5438423ad Fix wrong-sized swaps
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-25 14:06:47 -04:00
Thomas Hellstrom
3c2f9cc43f 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>
2011-08-31 14:39:21 +02:00
Jakob Bornecrantz
f17abaa926 vmwgfx: Just include vmwgfx_drm.h
We do this in mesa as well

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-14 00:03:13 +01:00
Jakob Bornecrantz
b29d71e3ad saa: Remove superflouos headers includes
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-14 00:03:11 +01:00
Jakob Bornecrantz
98ff64fd7a vmwgfx: Fix logic when checking for XA
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-11 12:23:42 +01:00