summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-01vmwgfx: Be correct when setting up damage trackingThomas Hellstrom1-7/+22
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-01vmwgfx: Add an option for direct presentsThomas Hellstrom4-5/+22
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-10-31vmwgfx: Fix acceleration options.Thomas Hellstrom2-59/+63
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-31vmwgfx: Remove a couple of unused optionsThomas Hellstrom2-11/+0
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Alan Hourihane <alanh@vmware.com>
2011-10-31vmwgfx: Don't do present readbacks per crtcThomas Hellstrom3-61/+29
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-31vmwgfx: Fall back to sw cursors if neededThomas Hellstrom3-11/+180
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-31vmwgfx: Fix crtc position of transformed fbThomas Hellstrom1-2/+4
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-31vmwgfx: Hook up vmwarectrl to the gui layout ioctlThomas Hellstrom5-16/+102
Requires drm 2.3. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-26vmwgfx: Update the connector type name arrayThomas Hellstrom1-1/+8
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-26vmwgfx: Save the dri2 requested depth since it may differ from the drawableThomas Hellstrom1-2/+12
depth. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-07Build fix for ABI version 12Jeremy Huddleston1-0/+2
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-07Fix build failures resulting from changes to the swaps and swapl macros in ↵Jeremy Huddleston3-48/+56
recent xorg-server Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-05xf86-video-vmware 11.0.99.901xf86-video-vmware-11.0.99.901Thomas Hellstrom1-1/+1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-10-05Use dixLookupWindow instead of LookupWindow on Xorg 1.5 & laterAlan Coopersmith1-6/+32
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-09-29vmwgfx: Adapt to vmwgfx kernel driver 2.1Thomas Hellstrom6-213/+334
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-25Fix wrong-sized swapsMatt Turner1-4/+2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-08-31vmwgfx-xorg: Avoid enabling unwanted outputs in initial configurationThomas Hellstrom3-1/+23
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-07-14vmwgfx: Just include vmwgfx_drm.hJakob Bornecrantz3-2/+617
We do this in mesa as well Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-14saa: Remove superflouos headers includesJakob Bornecrantz2-2/+0
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-11vmwgfx: Fix logic when checking for XAJakob Bornecrantz1-1/+1
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-07-09vmwgfx: Don't dirty the front buffer as hw when doing a dri2copyregion from itThomas Hellstrom1-5/+2
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-07vmwgfx: Add boolean flags for different rendering modesThomas Hellstrom2-24/+56
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-07vmwgfx: Various acceleration fixes.Thomas Hellstrom2-31/+30
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-05vmwlegacy: Fix server termination due to pitch inconsistency.Thomas Hellstrom2-1/+5
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-01vmwgfx: Require libxatracker >= 0.4.Thomas Hellstrom1-1/+1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01vmwgfx: Set up XA version checking.Thomas Hellstrom1-0/+33
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-07-01vmwgfx: Try to sort out format handling with composite.Thomas Hellstrom7-232/+704
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-01vmwgfx: Support xa composite.Thomas Hellstrom4-9/+443
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22saa: Add driver composite.Thomas Hellstrom2-5/+98
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22saa: Reuse code for computing composite bounds.Thomas Hellstrom3-76/+148
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22vmwgfx: Try to match created hardware formats with the dri state tracker.Thomas Hellstrom5-24/+98
2011-06-22vmwgfx: Fix dirty present bugThomas Hellstrom2-4/+4
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-22vmwgfx: Don't call xa_copy_done after a present.Thomas Hellstrom1-0/+1
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22vmwgfx: Make present readbacks not cross scanout bounding box boundariesThomas Hellstrom1-7/+40
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22vmwgfx: Make a list of scanout bounding boxes available to each scanout pixmapThomas Hellstrom3-33/+55
This info is needed for present readback. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-22vmwgfx: Import the WSBM list macrosThomas Hellstrom5-44/+100
Use WSBM list handling macros for the glxWaitX flush list. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-17vmwgfx: Check for large filesThomas Hellstrom1-0/+1
Fixes segfault on 32-bit servers. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-17vmwgfx, saa: Build saa as a convenience libraryThomas Hellstrom3-4/+4
instead of as a shared object. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-16vmwgfx: Fix up driver build process for Xserver >= 1.7.Thomas Hellstrom12-35/+56
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-06-16vmwgfx, saa: Initial importThomas Hellstrom27-349/+11982
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-03-30vmwlegacy: Don't prune modes based on the virtual size of the default modeThomas Hellstrom1-0/+16
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-30vmwlegacy: Fix up default mode VRefresh anc Clock calculationThomas Hellstrom1-6/+3
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-30vmwlegacy: Fix a bug in screen dimension calculationThomas Hellstrom1-4/+4
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: Make sure we draw the colorkey to the right drawableThomas Hellstrom2-17/+37
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>
2011-03-30vmwlegacy: Silence a number of warningsThomas Hellstrom2-50/+10
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 Hellstrom3-73/+82
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-03Remove unused variableThomas Hellstrom1-1/+0
Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-02-16vmwlegacy: Fix mode lookupAlan Hourihane3-5/+84
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-16vmwlegacy: Add a missing includeThomas Hellstrom1-0/+6
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-16vmwlegacy: Don't attempt to call RRSendConfigNotify on Xservers < 1.2Thomas Hellstrom1-0/+2
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Alan Hourihane <alanh@vmware.com> Reviewed-by: Michel DƤnzer <daenzer@vmware.com>