summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-02-02spice: windows qxl drivers: support x64 buildHEADmasterArnon Gilboa13-73/+101
-fix types & casts for correctness in x64 -add #ifndef _WIN64 for all the SSE2/FPU/fast_memcpy stuff -miniport/makefile: remove IFNDEF AMD64 to enable x64 build -miniport/qxl.inf: add x64 support
2010-09-29Bump version to 1.4.1.0 for 0.6.1 releaseAlexander Larsson2-3/+3
2010-09-20Protect palette cache agains concurrent accessAlexander Larsson2-0/+15
2010-09-20Protect cursor cache against concurrent accessAlexander Larsson2-1/+18
2010-09-20Protect image cache from concurrent accessAlexander Larsson2-10/+45
2010-09-20Fix typos Chach -> CacheAlexander Larsson1-6/+6
2010-09-20Prepend QXL to public function CheckIfCacheImageAlexander Larsson3-3/+3
2010-09-20Make internal functions staticAlexander Larsson1-2/+2
2010-09-20Add semaphore to protect quic_data from concurrent accessAlexander Larsson2-1/+12
2010-09-20Remove unused structure memberAlexander Larsson1-2/+0
2010-09-20Save FPU on stack, not in pdevAlexander Larsson2-16/+17
We can't use the global pdev FPUSave, because multiple processes could be calling the sse2 using code in parallel.
2010-09-20Add protection for cursor_ringAlexander Larsson2-0/+12
2010-09-20Fixed up cmd_sem useAlexander Larsson1-6/+6
2010-09-20Only look for streams on primary surfaceAlexander Larsson1-4/+6
We currently only support streams there anyway, and the code doesn't work for offscreen surfaces as is since its only looking at the destination rect.
2010-09-20Protect surface id allocation with semaphoreAlexander Larsson3-7/+27
2010-09-20Protect all references to cmd_ring with cmd_semAlexander Larsson1-2/+7
2010-09-20Move cmd_sem and print_sem to global device infoAlexander Larsson3-24/+24
The cmd and print semaphores protect hardware instances that exist one per device, so we can't really use per-pdev locks to protect them.
2010-09-20Drop DevResDynamicAlexander Larsson2-37/+24
Now that all DevRes are dynamic we can just put the data in DevRes.
2010-09-20Make global_res be an array of pointers and Res a pointerAlexander Larsson5-209/+195
Instead of allocating an array of DevRes we allocate each DevRes dynamically for each element. Also make PDEV->Res be a pointer instead of copying the global pdev. This also drops the needto Sync it when the pdev is made inactive, as all pdevs share the same DevRes. This way shared things like semaphores are really shared.
2010-09-16WDK clarificationGerd Hoffmann25-286/+721
Update the licence text of the windows qxl driver files. Adds a paragraph clarifying that the WDK Code qualifies for the system library exception in the GPL. This follows the licensing model the virtio windows drivers are using.
2010-09-09Sync dll version with inf fileAlexander Larsson1-2/+2
It seems we bumped the inf file version without changing the version encoded in the dll.
2010-09-09Protect release_ring with malloc_semAlexander Larsson2-1/+6
We need to protect the release ring against concurrent access, so we need a semaphore for it. Since we already hold the malloc_sem in almost all cases we access the ring we just extend its use to cover all the places its used.
2010-09-09Don't leak resourcesAlexander Larsson1-1/+2
Ensure we break from the release loop if num_to_release got to zero. This fixes a leak of resources as we otherwise threw away the whole list of things to free and started on the next one.
2010-08-31Update inf file for releaseAlexander Larsson1-1/+1
2010-08-23Remove unused surfaces_usedAlexander Larsson2-12/+1
2010-08-23New list based surface allocatorAlexander Larsson4-9/+22
We store a free list in the SurfaceInfos, using a field not otherwise used for free surfaces. Also, treat base_mem == NULL as "surface in use" for easy checking.
2010-08-23Add union to SurfaceInfo to put in next_free pointerAlexander Larsson4-6/+10
2010-08-23Free surface id if surface construction failedAlexander Larsson1-2/+4
2010-08-23Release resources before allocatingAlexander Larsson1-32/+49
Before trying to allocate memory we free a large chunk of freeable resources. Leaving the resources unfreed before allocating increases the risks of unnecessarily fragmenting the heap, which is bad, especially for the vram which needs large free contiguous allocations for surfaces. We do somewhat limit the number of resources we free on each call to ensure that we get an approximately even spread of the cost of allocations.
2010-08-23Grab malloc_sem in FreeMemAlexander Larsson1-0/+2
This is needed as much as in AllocMem to protect the mspaces data from concurrent access.
2010-08-23Make malloc_sem globalAlexander Larsson3-19/+18
It protects shared data (mspaces info) so it needs to be shared.
2010-08-20Move SurfaceInfo to global dataAlexander Larsson4-15/+21
When we release a surface resource, for instance when AllocMem gets OOM, we call ReleaseOutput with the pdev in use (i.e. probably the currently active one). However, its possible that the resource we free is actually from another (now inactive) pdev. Since the surface release function FreeDelSurface() uses pdev to find the data for the surface id we may find the wrong surface data. So, we move all the SurfaceInfos except the primary one to a global array. This is fine since the surface ids (except 0) are never shared between pdevs due to the surfaces_used global array.
2010-08-20Add helper functions for surface info <-> id mappingAlexander Larsson4-16/+22
2010-08-20Move SurfaceInfo structureAlexander Larsson1-14/+13
This is in preparation for using it in DevRes
2010-08-18aligning surfaces stride to 4Yonit Halperin1-4/+6
2010-08-18Change surfaces allocation method.Yonit Halperin6-222/+111
The driver no longer claims to support DirectDraw. It uses mspace to allocate surfaces and not HeapVidMemAllocAligned. This fixes freedesktop bug #29254.
2010-07-20Update date in inf fileAlexander Larsson1-1/+1
2010-07-20Update PCI data to stable v0.6 id/revAlexander Larsson2-6/+6
Also adds the subsystem id to the inf file
2010-07-14Fix corrupted ram data (e.g., release_ring), and unsynchronized worker, ↵Yonit Halperin4-0/+25
after driver is disabled and re-enabled. On logoff, in Win7 guest, and on switch user and login into a Winxp guest, the driver is disabled and re-enabled (while the miniport in not reset). However, before the fix, all the draw objects, e.g., surfaces, were still alive in the worker and the release ring still contained objects, while all the driver's data was initialized. This caused blue screens, and panics in the worker.
2010-07-12Fix memory leak: deleting primary surface device bitmap when it is disabled.Yonit Halperin2-12/+1
The bug caused BSOD: SESSION_HAS_VALID_POOL_ON_EXIT on switching users/log off (after the driver is disabled and enabled back again, while the miniport is not restarted).
2010-07-12Fix global resources cleanupYonit Halperin1-1/+1
2010-07-08Use the new PCI id/rev macrosAlexander Larsson1-2/+2
2010-07-08Update to the new QXL types (not SpiceXyz)Alexander Larsson3-10/+10
2010-07-07Initialize id and widht/height of ImageDescriptor for surface imagesAlexander Larsson1-2/+6
2010-07-05Remove unused vector font codeAlexander Larsson1-52/+0
2010-07-01Remove unused code from driverAlexander Larsson1-102/+4
We're disabling geometric lines, so remove code relating to that. Also, remove commented out never-to-be-used driver capabilities flags.
2010-07-01Update to use the new QXL type instead of the Spice onesAlexander Larsson7-50/+50
2010-06-29Fix bad memory free of cursorAlexander Larsson1-1/+1
When freeing the chunks we freed the resource multiple times instead of actually freeing the chunks.
2010-04-28Support HIGH_BITS_SET flag to avoid sending rgba unnecessarilyAlexander Larsson1-11/+30
2010-04-28Ensure image->descriptor.flags is zero for surface imagesAlexander Larsson1-0/+2