Commit Graph

190 Commits

Author SHA1 Message Date
Thomas Hellstrom
c5c38bab8c vmware/legacy: Fix initial mode size v2
Commit "vmwlegacy: Make the default be a minium of 800x600..."
read the dimensions from the incorrect register pair.

v2: Also treat initial widths and heights larger than the maximum
values as an error and revert back to the minimum.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2012-02-08 16:13:58 +01:00
Thomas Hellstrom
ecf6c5b108 vmware: Kill warnings on Xserver 1.12
Compile-tested on servers 1.0 through 1.12.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2012-02-02 10:32:13 +01:00
Jakob Bornecrantz
0628ad20f3 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>
2012-01-12 17:12:56 +01:00
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 Hellstrom
b5546fb1de Merge branch 'vmwgfx_branch' 2011-12-19 20:25:43 +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
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
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
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
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
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
4ae8aac35b 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>
2011-07-05 20:19:03 +02:00
Thomas Hellstrom
84166d4b45 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>
2011-06-16 16:04:47 +02:00
Thomas Hellstrom
0142bb8d10 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>
2011-03-30 14:23:37 +02:00
Thomas Hellstrom
04297d435b 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>
2011-03-30 14:22:54 +02:00
Thomas Hellstrom
c5ca599361 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>
2011-03-30 11:01:06 +02:00
Thomas Hellstrom
c02d597701 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 Dnzer <daenzer@vmware.com>
2011-03-30 10:52:38 +02:00
Thomas Hellstrom
b234d7d692 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 Dnzer <daenzer@vmware.com>
2011-03-30 10:52:19 +02:00
Thomas Hellstrom
cdb04224db 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>
2011-03-29 09:04:18 +02:00
Thomas Hellstrom
9a8f0af878 Remove unused variable
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-03-03 09:47:48 +01:00
Alan Hourihane
c208a5380b 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>
2011-02-16 19:50:34 +01:00
Thomas Hellstrom
2e5001b7e9 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>
2011-02-16 19:50:29 +01:00
Thomas Hellstrom
b3c244ebd7 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>
2011-02-16 19:50:24 +01:00
Michel Dänzer
eacfa46ada vmwlegacy: Send ConfigureNotify events on Xinerama state changes with no mode change
Signed-off-by: Michel Dnzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-02-04 09:51:03 +01:00
Thomas Hellstrom
cc66e4a49a Fix crosscompile build for older Xservers v2
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-01-27 11:02:44 +01:00
Thomas Hellstrom
d1ac343b88 Revert "Fix crosscompile build for older Xservers"
This reverts commit 16e1639038.

The fix was bogus as pointed out by Cyril Bruleboid <kibi@debian.org>, and
Gaetan Nadon <memsize@videotron.ca>
2011-01-21 23:07:10 +01:00
Thomas Hellstrom
16e1639038 Fix crosscompile build for older Xservers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-01-13 13:20:50 +01:00
Thomas Hellstrom
5b30df4711 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>
2011-01-13 13:19:32 +01:00
Jesse Adkins
30ac6eaf64 Purge cvs tags.
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06 20:51:32 -07:00
Thomas Hellstrom
083a663bbb 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>
2010-09-16 10:18:24 +02:00
Thomas Hellstrom
da0f931b90 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>
2010-09-08 10:00:37 +02:00
Thomas Hellstrom
03dca39afa 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>
2010-09-07 21:59:37 +02:00
Thomas Hellstrom
dfb062e024 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>
2010-09-07 12:19:21 +02:00
Thomas Hellstrom
12e4577c02 vmwlegacy: Always scale screen dimensions to the initial DPI on modeswitch.
When we switch mode we usually alter the size in a constant DPI environment
rather than keeping the size constant and alter the DPI.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-09-03 11:21:43 +02:00
Thomas Hellstrom
81a0a1a37e vmware: Handle chain-loader failures gracefully.
If the vmwlegacy driver wasn't present when expected, that would
leave the X server in a confused state. Thus report loading errors properly
back to the X server.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-09-01 08:00:40 +02:00
Thomas Hellstrom
f51ca2cb75 Make the driver build and run without libdrm.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-08-18 12:07:01 +02:00
Thomas Hellstrom
2e6eca3e7b Only set the first xinerama output as primary.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-08-12 17:45:02 +02:00
Julien Cristau
e647511e4b Don't crash the server on Xorg -configure 2010-07-13 11:57:15 +01:00
Fernando Carrijo
0bd99bb142 Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-09 20:53:08 -07:00
Michel Dänzer
423d8a069a Fix some issues pointed out by compiler warnings.
* vmware_chain_module() doesn't return any values.
* Remove an unused local variable.
2010-03-29 10:19:04 +02:00
Jakob Bornecrantz
a5fb3698a0 Rework chainloader code to check for vmwgfx userspace driver as well 2010-03-09 08:37:11 +00:00
Roland Scheidegger
bf18be6f45 fix a cursor refcounting bug, leading to segfaults
this is similar to what xf86_use_hw_cursor() does, which is replaced by
vmwareUseHWCursor (otherwise, the refcount could reach zero and hence the
cursor deallocated while xf86CursorEnableDisableFBAccess() could still bring
it back to life from the saved cursor).
It is probably insane to do refcounting here, but this needs a xserver fix,
and even if that's fixed this fix here shouldn't hurt (though would be
unnecessary).
2010-03-09 16:10:25 +01:00
Roland Scheidegger
257614ae9b make DEBUG_LOGGING compile 2010-03-09 16:03:59 +01:00