Commit Graph

200 Commits

Author SHA1 Message Date
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
Thomas Hellstrom
858dbcdddb 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>
2011-07-09 22:59:41 +02:00
Thomas Hellstrom
eea96a6f5c 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>
2011-07-07 22:07:59 +02:00
Thomas Hellstrom
9cff0a8430 vmwgfx: Various acceleration fixes.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-07 10:56:59 +02:00
Thomas Hellstrom
81e7099b6b vmwgfx: Require libxatracker >= 0.4.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 13:23:30 +02:00
Thomas Hellstrom
d2e27ee5c1 vmwgfx: Set up XA version checking.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 12:31:45 +02:00
Thomas Hellstrom
8a9997f060 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>
2011-07-01 11:35:40 +02:00
Thomas Hellstrom
8a21da8eaa vmwgfx: Support xa composite.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01 11:35:32 +02:00
Thomas Hellstrom
c7e8388280 saa: Add driver composite.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22 22:40:20 +02:00
Thomas Hellstrom
b2e1169710 saa: Reuse code for computing composite bounds.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22 22:38:15 +02:00
Thomas Hellstrom
3650be74d5 vmwgfx: Try to match created hardware formats with the dri state tracker. 2011-06-22 22:37:00 +02:00
Thomas Hellstrom
63d7ddb35f 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>
2011-06-22 22:35:06 +02:00
Thomas Hellstrom
f71928d3f7 vmwgfx: Don't call xa_copy_done after a present.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22 22:34:59 +02:00
Thomas Hellstrom
4d5aec4a7e vmwgfx: Make present readbacks not cross scanout bounding box boundaries
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22 22:34:50 +02:00
Thomas Hellstrom
f6a4690832 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>
2011-06-22 22:34:43 +02:00
Thomas Hellstrom
eea0e6e242 vmwgfx: Import the WSBM list macros
Use WSBM list handling macros for the glxWaitX flush list.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22 22:34:27 +02:00
Thomas Hellstrom
eabf82fad8 vmwgfx: Check for large files
Fixes segfault on 32-bit servers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-17 11:25:53 +02:00
Thomas Hellstrom
7966dfa47c vmwgfx, saa: Build saa as a convenience library
instead of as a shared object.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-17 08:21:54 +02:00
Thomas Hellstrom
d28613e557 vmwgfx: Fix up driver build process for Xserver >= 1.7.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-16 21:31:44 +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
Thomas Hellstrom
8f8f71f007 Bump package version to 11.0.3 for release
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-09 14:31:30 +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
5a2206c328 Make sure we build on 1.4.99.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-09-16 09:59:12 +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
Gaetan Nadon
2a72ea7a1b vmwarectrl: rework standalone package as a subdir of driver
vmwarectrl is a unit test client tool for developers.
By default, it is not built unless --enable-vmwarectrl-client is used.

Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-08-19 08:18:08 -04: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
Adam Jackson
456b74e877 xf86-video-vmware 11.0.2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-08-10 11:02:05 -04:00