summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-06-15prefix io with qxl_io, add severalAlon Levy3-9/+40
2012-06-15qxl.h: add device_primary tri state UNDEFINED/NONE/CREATEDAlon Levy2-0/+12
2012-06-15qxl_surface: logging: add function name to ErrorFAlon Levy1-3/+3
2012-06-15qxl_surface: cosmeticsAlon Levy1-1/+1
2012-06-15qxl_pre_init: memset qxl structAlon Levy1-0/+1
2012-06-15qxl_driver: abort on mspace error, don't spin (default abort function)Alon Levy1-0/+19
2012-06-15mspace: add mspace_malloc_stats_returnAlon Levy2-7/+31
2012-06-15qxl_leave_vt: change outb to ioport_write (easier to grep / breakpoint on a ↵Alon Levy1-1/+1
single point)
2012-06-15rename qxl_reset to qxl_reset_and_create_mem_slotsAlon Levy1-4/+4
2012-06-15qxl_mem: add debug flags, simple accounting and valgrind enabledAlon Levy3-1/+68
adds preprocessor definitions DEBUG_QXL_MEM & DEBUG_QXL_MEM_VERBOSE
2012-06-15qxl_surface: handle destroyed pixmaps while evacuatedAlon Levy1-6/+37
Prevent access to freed memory when: 1. qxl_leave_vt/qxl_surface_cache_evacuate_all freed cache->all_surfaces 2. ProcRenderDispatch/damageDestroyPixmap/qxl_destroy_pixmap/qxl_surface_kill access a surface that pointed inside the all_surfaces array Solution in this patch: 1. never free all_surfaces 2. add an 'evacuated' field per surface, initialized to NULL, set during evacuation. 3. on qxl_surface_kill, if surface->evacuated is set, don't destroy the surface (it is already destroyed by this point via a reset in qxl_surface_cache_evacuate_all's caller, qxl_leave_vt), just unref the host pixmap, free the evacuated_surface_t and unlink it from the evacuated linked list, so it isn't recreated later on qxl_surface_cache_replace_all.
2012-06-15qxl_driver: hide cursors on vt switchAlon Levy1-0/+12
This is not enough to prevent any qxl_destroy_pixmap call during vt switch, but it prevents those triggered by CursorDisplayCursor. Note: a matching xf86_show_cursors call doesn't hurt, but is not required, so not adding it. It is still possible to access freed memory by the following trigger: ==4416== Invalid read of size 8 ==4416== at 0x5D15EC1: unlink_surface (qxl_surface.c:685) ==4416== by 0x5D162F9: qxl_surface_kill (qxl_surface.c:799) ==4416== by 0x5D12688: qxl_destroy_pixmap (qxl_driver.c:928) ==4416== by 0x55730B: damageDestroyPixmap (damage.c:1556) ==4416== by 0x51C77B: ShmDestroyPixmap (shm.c:273) ==4416== by 0x54591B: FreePicture (picture.c:1465) ==4416== by 0x467A32: doFreeResource (resource.c:873) ==4416== by 0x467B7E: FreeResource (resource.c:903) ==4416== by 0x547742: ProcRenderFreePicture (render.c:661) ==4416== by 0x54B13A: ProcRenderDispatch (render.c:1988) ==4416== by 0x430670: Dispatch (dispatch.c:428) ==4416== by 0x492604: main (main.c:288) ==4416== Address 0x121031e0 is 116,960 bytes inside a block of size 122,880 free'd ==4416== at 0x4A079AE: free (vg_replace_malloc.c:427) ==4416== by 0x5D16BDA: qxl_surface_cache_evacuate_all (qxl_surface.c:1060) ==4416== by 0x5D13078: qxl_leave_vt (qxl_driver.c:1209) ==4416== by 0x4A4D4F: xf86VTSwitch (xf86Events.c:462) ==4416== by 0x4A4926: xf86Wakeup (xf86Events.c:285) ==4416== by 0x43E2E1: WakeupHandler (dixutils.c:421) ==4416== by 0x488A75: WaitForSomething (WaitFor.c:224) ==4416== by 0x4303CF: Dispatch (dispatch.c:357) ==4416== by 0x492604: main (main.c:288) This is fixed by a following patch to not free all_surfaces, instead keeping pointers from it to the evacuated list.
2012-06-15qxl_surface: remove redundant qxl_garbage_collect, qxl_allocnf calls itAlon Levy1-2/+0
2012-06-15uxa-damage: remove unnecessary include (doesn't fix any warnings)Alon Levy1-1/+0
2012-06-15uxa: remove unnecessary includes, reduces warnings due to duplicate definitionsAlon Levy2-4/+0
2012-06-06qxl: fix spice buildDave Airlie1-2/+2
reported by jenkins. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-06qxl: add API compat for latest X server.Dave Airlie8-50/+153
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-06Do not call update_area when lacking device memoryYonit Halperin1-14/+0
The QXL_IO_NOTIFY_OOM is intended exactly for handling occurrences of lacking memory. The spice server tries to first release resources that are no longer in the current tree (and thus, do not need rendering). It renders drawables only as a last resort. And even then, it does not update the whole primary surface, but rather renders the oldest X drawables. The call to update_area is redundant, and its effect on performance is noticeable when playing full screen video. Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
2012-04-24qxl_driver: ifdef out qxl_wait_for_io_command if not XSPICEAlon Levy1-0/+2
2012-04-24qxl_surface.c: fix -Wshadow warningAlon Levy1-1/+0
qxl_surface.c:735:6: warning: declaration of 'i' shadows a previous local [-Wshadow]
2012-04-24mspace: no more warningsAlon Levy2-6/+10
2012-04-24spiceqxl_io_port: use pointer_to_u64 (fix warning)Alon Levy1-1/+1
2012-04-24spiceqxl_io_port: use attribute printf (fix warning)Alon Levy1-1/+1
2012-04-24qxl_surface: qxl_surface_prepare_access: remove assigned but unused variablesAlon Levy1-4/+0
2012-04-24spiceqxl: Xspice is spelled with a lower sAlon Levy1-2/+2
2012-03-18qxl: missed one file that needs config.hDave Airlie1-0/+3
2012-03-18qxl: fix config.h usageDave Airlie13-2/+42
You have to include config.h at top of each C file, not inside a header file. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-15Add qxl_option_helper.h to Makefile.amSøren Sandmann Pedersen1-1/+2
2012-03-15In qxl_prepare_access(), don't modify the width/height of the pixmapSøren Sandmann Pedersen1-4/+0
The width and height were not properly restored, which caused GetDrawableInfo() to return bogus results, which caused GNOME shell crashes. Signed-off-by: Soren Sandmann <ssp@redhat.com>
2012-03-14qxl_surface.c: Remove #if 0'd debug spewSøren Sandmann Pedersen1-169/+4
2012-03-09options: Turn surfaces and caching on by defaultSøren Sandmann Pedersen1-3/+3
2012-02-16missed when added qxl_option_helpers.cAlon Levy1-0/+14
2012-02-16replace lookup3 with MurmurHash3Alon Levy6-803/+404
See http://code.google.com/p/smhasher/wiki/MurmurHash3 Performance quotes from there are 2.5 times what lookup3 can do, for 32 bit variant, which is what we use: Lookup3_x86_32 - 1234 mb/sec Lookup3_x64_32 - 1265 mb/sec MurmurHash3_x86_32 - 3105 mb/sec New files are released to the public domain, keeping them that way. My own comparison shows the added hash to be ~45% faster then the existing one, see the tests at https://gitorious.org/hash_tests/hash_tests
2012-02-16xspice_keyboard_proc: fix arrow keysAlon Levy1-1/+8
Not sure yet why the regression with the arrow keys not producing the right keysym, but it appears that the keycode is correct for up (as an example), 111, but the keysym being produced was 0xff6c and not the correct 0xff52. This boiled down to the rules of the default rmlvo being "base" instead of "evdev". Providing an rmlvo parameter to InitKeyboardDeviceStruct allows to override that. The chosen rules = "evdev" model = "pc105" layout = "us" Is the default used by Xephyr from xorg-x11-server-Xephyr-1.11.99.901-3.20120124.fc17.x86_64
2012-02-16introduce qxl_option_helpers.[ch]Alon Levy4-34/+40
2012-02-09Don't leak the surface when we run out of video memory.Søren Sandmann1-16/+19
Running out of video memory would cause send_create_surface() to return NULL without putting the allocated surface back on the free list. Fix this by not allocating the surface until after the video memory is allocated, and, if surface allocation fails, freeing the video memory.
2012-02-09Move check for zero width/height surfaces to qxl_surface_create()Søren Sandmann1-6/+6
2012-02-07In qxl_check_copy() accept pixmaps that don't have surfacesSøren Sandmann2-17/+0
UXA will correctly fall back to using PutImage if the pixmaps are not in offscreen memory (ie., they don't have surfaces attached), so there is no need to return FALSE in qxl_check_copy() just because the pixmaps don't have surfaces associated with them.
2012-01-31xf86PciInfo.h is deprecated and unused, drop itAlon Levy1-1/+0
2012-01-31qxl_image: cleanup qxl_image_createAlon Levy1-8/+5
2012-01-30Enable surface and caching option defaults for XspiceAlon Levy1-4/+6
2012-01-30xspice: remove duplicate declaration (fixes warning)Alon Levy1-1/+0
2012-01-30Enable surface and caching options for XSpice tooSøren Sandmann Pedersen1-5/+4
2012-01-27Enable caching of images based on the configuration optionsSøren Sandmann Pedersen3-69/+28
2012-01-27Return NULL from qxl_surface_create() when surfaces are disabledSøren Sandmann Pedersen1-0/+3
2012-01-27Add support for parsing various optionsSøren Sandmann Pedersen2-2/+35
- EnableImageCache - EnableFallbackCache - EnableSurfaces EnableImageCache will enable the use of caching for PutImage requests. EnableFallbackCache will enable the use of caching for image commands that are the result of fallback rendering.
2012-01-19Use u64_to_pointer() instead of a cast to void *Søren Sandmann Pedersen1-1/+1
2012-01-19Track damage for PolyLine fallbacks.Søren Sandmann Pedersen1-2/+9
This is a substantial speedup for the Gimp.
2012-01-18qxl-driver: call vgaHWSetStdFuncs explicitlyAlon Levy1-0/+1
Previously it was called via vgaHWGetHWRec, since 1.11.99.901 it is no longer so. The relevant xserver commit: 4bd6579188e718654c35f95623fd4772f9e0ef06 vgahw: Don't default to standard (port space) access routines From: Adam Jackson <ajax@redhat.com>
2012-01-18build fixes: sched_yield and missing declarationAlon Levy3-2/+6
From: Adam Jackson <ajax@redhat.com>