summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-12-15saa, vmwgfx: Fix saa_copy_compositevmwgfx_branchThomas Hellstrom3-23/+36
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-15saa: Always read back hw contents on poly_fill_rectThomas Hellstrom1-1/+7
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-15saa: Only try to accelerate pixmaps that are driver pixmapsThomas Hellstrom2-1/+19
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-08vmwgfx: Reduce system resource usage with textured videoThomas Hellstrom1-18/+48
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-08vmwgfx: Hook up XV color conversion control attributesThomas Hellstrom1-22/+73
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-08vmwgfx: Adapt to new interface of xa_yuv_planar_blitThomas Hellstrom2-30/+82
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-06vmwgfx: Fix MessageType members that are incorrectly typed as BoolThomas Hellstrom1-4/+4
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-06vmwgfx: Add an option to enable rendercheck modeThomas Hellstrom7-5/+35
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-06vmwgfx: Adapt to the dri state tracker sending depth instead of bppThomas Hellstrom2-5/+12
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-12-06vmwgfx: Don't register back buffers as "hw_is_dri2_fronts" v2Thomas Hellstrom1-8/+11
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-01vmwgfx: Include drm.h from correct pathJakob Bornecrantz1-1/+1
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-28vmwgfx: Make the drm device name persistentThomas Hellstrom2-8/+13
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-25vmwgfx: Get the drm device name from the open file descriptorThomas Hellstrom1-2/+21
Rather than hardcoding it. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25vmwgfx: Use config options to optionally set GUI topologyThomas Hellstrom3-23/+79
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-25vmwlegacy: Factor out code that can be common for vmwgfx and vmwlegacyThomas Hellstrom4-128/+208
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 Hellstrom1-6/+24
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-25vmware: Update library dependenciesThomas Hellstrom2-0/+2
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25vmwgfx: Pre-init fixesThomas Hellstrom4-69/+82
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-25vmware: Update the vmware register definitionThomas Hellstrom1-49/+255
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25vmware: Hook up vmwgfx to be tried before falling back to legacyThomas Hellstrom10-541/+93
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-25vmwlegacy: Factor out bootstrap functionsThomas Hellstrom4-392/+529
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-09vmwgfx: Make sure we don't render when VT switchedThomas Hellstrom2-7/+16
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-09vmwgfx: Fix rendering errors when rotating / unrotating a screen.Thomas Hellstrom1-4/+6
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-09vmwgfx: A number of damage fixesThomas Hellstrom1-20/+42
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-01vmwgfx: Add an option to use a scanout surfaceThomas Hellstrom4-33/+93
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-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-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-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-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