summaryrefslogtreecommitdiff
path: root/src/vmware.c
AgeCommit message (Collapse)Author
2018-02-20Fix a couple of shadowed declaration warningsThomas Hellstrom
In some enviroments, "index", "y1" and "y2" are defined globally causing warnings about shadowed declarations. Fix this. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-15legacy: Avoid using the xf86[Un]blockSigio functionsThomas Hellstrom
They have been deprecated since mouse doesn't use SIGIO anymore. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Deepak Rawat <drawat@vmware.com>
2017-08-07vmware: Fix build warningsDeepak Singh Rawat
Due to following commit in xserver there were build warnings, as variables now declared const. d89b42bda46d36fc0879611cc3b3566957ce36d0 e1e01d2e33c632e395d7e396f73fba8ae606b15a Added a compat header file. Signed-off-by: Deepak Rawat <drawat@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>:q
2014-08-25vmware: Clear the PITCHLOCK register if available before modesetThomas Hellstrom
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-05-14Add support for XSERVER_PLATFORM_BUSHans de Goede
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>
2013-02-14Kill mibstoreZack Rusin
It was a noop for at least 5 years and it has been removed. Signed-off-by: Zack Rusin <zackr@vmware.com>
2012-06-09vmware: port vmware driver to new compat APIDave Airlie
This is a port of the vmware driver to the new compat API. Tested-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2012-03-20vmware/legacy: Fix crash on Xserver 1.12.0Jakob Bornecrantz
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
2012-02-08vmware/legacy: Fix initial mode size v2Thomas Hellstrom
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-02vmware: Kill warnings on Xserver 1.12Thomas Hellstrom
Compile-tested on servers 1.0 through 1.12. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2012-01-12vmwlegacy: Make the default be a minimum of 800x600Jakob Bornecrantz
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-12vmware: Make sure the driver builds on old serversThomas Hellstrom
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>
2011-12-19Merge branch 'vmwgfx_branch'Thomas Hellstrom
2011-11-25vmwlegacy: Factor out code that can be common for vmwgfx and vmwlegacyThomas Hellstrom
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-25vmwlegacy: Accept option "GuiLayout" as a synonym for "staticXinerama"Thomas Hellstrom
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-25vmwlegacy: Factor out bootstrap functionsThomas Hellstrom
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-17vmwlegacy: Fix device fifo communicationThomas Hellstrom
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-10-07Build fix for ABI version 12Jeremy Huddleston
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-07-05vmwlegacy: Fix server termination due to pitch inconsistency.Thomas Hellstrom
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-03-30vmwlegacy: Fix a bug in screen dimension calculationThomas Hellstrom
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-30vmwlegacy: Silence a number of warningsThomas Hellstrom
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>
2011-03-29vmwlegacy: Fix segfault and setup of initial mode.Thomas Hellstrom
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-02-16vmwlegacy: Fix mode lookupAlan Hourihane
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-01-13vmwlegacy: Remove Write-Combining setupsThomas Hellstrom
The virtual CPUs doesn't support it anyway. Once suggested by Michel Daenzer. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-16Make the modinfo string contain an optional subpatch numberThomas Hellstrom
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-08vmwlegacy: Fix a segfault in vmwareCursorCloseScreen.Thomas Hellstrom
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-07vmware/vmwlegacy: Silence compilation errors and -warnings.Thomas Hellstrom
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-03vmwlegacy: Always scale screen dimensions to the initial DPI on modeswitch.Thomas Hellstrom
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-08-12Only set the first xinerama output as primary.Thomas Hellstrom
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-02-26Don't hardcode the module version in the sourceJakob Bornecrantz
As pointed out by Julien Cristau XORG_RELEASE_VERSION gives us that info from configure.ac. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2010-02-22Bump major for new chainloading driverxf86-video-vmware-11.0.0Jakob Bornecrantz
2010-02-22Make sure that modinfo strings are uniqueJakob Bornecrantz
2010-02-11Add a chain loading module to load new vmwgfx driver if kernel module is loadedJakob Bornecrantz
2009-12-29Bump for 10.16.9 release.xf86-video-vmware-10.16.9Michel Dänzer
2009-12-29vmware: Fix crash with xserver >= 1.7.Michel Dänzer
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=24541 .
2009-09-08Bump fo 10.16.8 Releasexf86-video-vmware-10.16.8Philip Langdale
2009-07-28vmware: change to using ABI version checkDave Airlie
2009-07-28vmware: fix resource removal properlyDave Airlie
2009-07-28vmware: update for resources/RAC API removalDave Airlie
2009-07-20Bump for 10.16.7 Release.xf86-video-vmware-10.16.7Philip Langdale
2009-06-01 An imperfect fix for Xinerama state changes without a mode changeMicah Dowty
This patch improves behaviour for Xinerama state changes (via the VMWARE_CTRL) extension that don't have an accompanying mode change. This will be the case if a new Xinerama monitor layout has a bounding box with an identical size to that of the previous layout. Prior to this patch, the behaviour was pretty bad. If you sent two Xinerama states with the same bounding box, the second state would be set as pending but no actual mode change would occur, because the X server would already be in the right video mode. This means that the pending mode stays pending. If another Xinerama state comes in after this, we would hit our "Aborting due to existing pending state" error, and the new state would be discarded. This means we'd drop the mode switch on the floor, plus we'd lie to the client and say it worked. One example of the user-visible symptoms from this: The user has four monitors of the same size. We'll call them A through D. The VM goes into full-screen mode, and they set it to use screens ABC. Now they switch to BCD. These have the same bounding box size, so no mode change occurs and a topology is still pending. Now they switch to monitors BC. This mode switch is dropped, so the guest is still in the ABC topology and the mode is too wide for BC. This patch is an incomplete fix. If we're setting a new topology with the same bounding box, we'll flush the Xinerama state immediately since we know the mode switch will never occur. This means we don't get stuck with xineramaNextState set when it shouldn't be, and we don't have the problem with dropping subsequent mode changes. We also do set the new Xinerama state, so apps that query it will see the updated state immediately. But the fix isn't perfect- as far as I can tell, there's no way to notify applications that the monitor layout changed without a mode switch. So even though we've set the new topology, most apps won't notice. There are ways we could hack around this, but none of them are pretty.
2009-05-22Fix black screen after resume from hibernate.Bob Long
The root cause for the black screen and system lock up is caused by not recovering the SVGA ID register after hibernation. Incorrect ID register value will invalidate the FIFO memory start register, and driver will not retrieve correct FIFO memory start address and the busy read of svga FIFO sync register will lock up the whole system. Currently SVGA Xorg driver does not have a kernel module to handle the power management event, but Xorg will call driver provided LeaveVT before shutting down system and call EnterVT after resuming system from hibernation, so these two callback functions are good entry points to save and restore the ID register value. This patch saves the ID register value in LeaveVT and restores the value to SVGA ID register in EnterVT.
2009-05-12Bump for 10.16.6 releasexf86-video-vmware-10.16.6Philip Langdale
2009-05-12Fix dynamic mode edge casesMicah Dowty
The VMware Xorg driver supports dynamic modelines that can be set from userspace via an X extension. These are used to implement VM features which need to automatically change the resolution of the guest OS. This driver implements the feature using two modelines. The driver would alternately update one mode then the other, so that in typical usage one mode is current and the other is available for the next mode switch. This usually worked, but there were many edge cases that could cause this alternating pattern to get 'out of sync', so we'd end up changing the resolution of the current video mode. This could end up putting the X server in a state where the screen resolution has been changed, but the hardware was never reprogrammed for the new resolution. This patch fixes the problem by explicitly searching for a dynamic mode that isn't currently in use. We no longer rely on the alternating pattern.
2009-04-16Automatically add modelines for the driver's built-in set of modes.Shelley Gong
The driver has had a built-in set of modes for a while, but there was nothing adding modelines to back them up, causing initial modes to be rejected at startup with certain Xorg versions. This change adds the actual modelines for sufficiently new versions of the server (>= 1.2), as the necessary calls were only introduced at that time.
2008-08-19Bump version for 10.16.5 release.xf86-video-vmware-10.16.5Philip Langdale
2008-08-19Add RegionEqual function for older XFree86 versions.Bankim Bhavsar
Fixes bug : http://bugzilla.eng.vmware.com/show_bug.cgi?id=312853 When we added AUTOPAINT_COLORKEY capability to our VMware video driver, region functions were used to keep track of colorkey painting. REGION_EQUAL was one of them. Unfortunately REGION_EQUAL was not present in regionstr.h shipped with XFree86 version 4.3.0. This version is used by TurboLinux 10; causing X server to crash while playing videos. REGION_EQUAL was added in revision 1.8 of regionstr.h and available for xfree86 version 4.3.99 onwards. Reference: http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/include/regionstr.h.diff?r1=1.7&r2=1.8 When I compiled the existing code(without my change), I see a warning was generated indicating REGION_EQUAL is not present. Too bad we missed it. This patch includes 1) Slightly modified version of miRegionEqual from miRegion.c 2) Some formating cleanup.
2008-07-21Prepare for 10.16.4 release.xf86-video-vmware-10.16.4Philip Langdale
2008-07-18Prepare for 10.16.3xf86-video-vmware-10.16.3Philip Langdale
Bump up version numbers.