summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-28bugfix: set property correctly for qxl_connectedwip/randr12.v1wip/randr12Alon Levy1-1/+1
2012-06-27qxl_driver/qxl_initialize_x_modes: remove modes not fitting framebufferAlon Levy1-2/+8
2012-06-27add qxl_connected propertyAlon Levy1-7/+52
2012-06-27qxl_driver: introduce qxl_crtc, crtc privateAlon Levy2-5/+26
Additionally prevents disabling of the primary crtc.
2012-06-27add qxl_edidAlon Levy4-2/+251
Taken from Virtual Box, following exactly the same logic: gnome-settings-daemon relies on the serial given in the edid to set the resolution to the same one last used on that screen. Since this is not what we want with a virtual machine, we produce a serial that is different for every resolution.
2012-06-27qxl_driver: add infra for surface0 resizingAlon Levy1-38/+149
Most importantly, don't allow randr resize if it is too large for the currently allocated mspace. Ifdeffed out almost working code for reallocating the primary mspace (qxl->mem).
2012-06-27qxl_driver: move mspace_set_*_func earlierAlon Levy1-3/+4
2012-06-27qxl_driver: qxl_init_randr: limit width/height to 8192, real check done on ↵Alon Levy1-18/+2
randr screen resize callback
2012-06-27(for later) qxl_ring: add helpers (debugging/unused)Alon Levy2-0/+24
2012-06-27qxl: add qxl->ram_size (used later)Alon Levy2-0/+3
2012-06-27qxl_driver: implement randr, arbitrary resolution, multiple monitors (big dump)Alon Levy4-126/+536
Send a MonitorsUpdate - this should definitely be split into it's own patch. Require revision 4 - this is needed just for MonitorsUpdate, should go with it. Adds new config: OPTION_NUM_HEADS, defaults to 4.
2012-06-27qxl_surface: add download_box_no_updateAlon Levy1-5/+11
2012-06-27qxl_surface: normalize surface_send names, add option to surface_destroy to ↵Alon Levy1-7/+17
send/not send destroy message
2012-06-27spiceqxl_io_port: mark FLUSH_SURFACES_ASYNC as unimplemented, do half of itAlon Levy1-0/+4
2012-06-27qxl_screen_init: move uxa_resources_init down to after qxl_switch_mode has runAlon Levy1-7/+6
2012-06-27qxl_close_screen: disable fb access, prevent segfaults in uxa later onAlon Levy1-0/+6
I don't have a stacktrace to show any segfault unfortunately.
2012-06-27fix two segfaults in qxl_free_surfaceAlon Levy1-0/+5
Both results from ProcFreePixmap being called in unanticipated circumstances: cache->all_surfaces is NULL surface->host_image is NULL To reproduce the following scripts work, in tandem: create xterms, destroy them chvt ============ xterm_test ============ import os import subprocess import time import atexit env = os.environ env['DISPLAY'] = ':0.0' xterms = [] def kill_all(): print "killing xterms" for x in xterms: x.kill() del xterms[:] atexit.register(kill_all) while True: for i in range(10): xterms.append(subprocess.Popen(['xterm', '+u8'])) time.sleep(1) kill_all() ============= chvt_test_helper ============ XPID=`pgrep Xorg` XTTY=`find /proc/$XPID/fd -lname "/dev/tty*"` XTTY=`readlink $XTTY` XTTY=${XTTY#/dev/tty} echo "chvt 1 (from Xorg)" chvt 1 sleep 2 echo "chvt $XTTY (to Xorg)" chvt $XTTY ============== chvt_test ================= while true; do ./chvt-test ; sleep 3; done
2012-06-27qxl: remove qxl_screen_t->strideAlon Levy3-3/+1
2012-06-27spiceqxl_inputs: don't hide the pointer global typedefAlon Levy1-14/+14
2012-06-27uxa: fix bad argument type from removed index API change ↵Alon Levy2-3/+4
(s/SCREEN_ARG_TYPE/SCRN_ARG_TYPE/)
2012-06-27whitespace fixAlon Levy1-1/+1
2012-06-17Compute totalPixmapSize using the same logic as in dix/pixmap.c, rather than ↵Jeremy White1-2/+4
hard coding 100. This was found while building with a modified X server; one with a PixmapRec size of 224, not 64 :-/.
2012-06-17Actually process write watches in the wakeup handlerJeremy White1-1/+16
My apologies for the churn; this is, I think, a slightly better patch than my previous patch, 'Process watches even when there is no X activity', in that it avoids doing an extra polling select when we're idle.
2012-06-15qxl_switch_mode: don't evacuate, just recreate primary surfaceAlon Levy1-19/+14
In summary, on vt enter we still: reset recreate memory slots clear our mspace allocators and then do what switch mode below says On vt leave we still: reset (this is redundant since the first VGA access will trigger a reset on the device side) On switch mode however we only: destroy primary surface create primary surface (different size)
2012-06-15qxl_surface: don't unlink surface 0Alon Levy1-4/+7
The primary surface, i.e. qxl->primary, the only surface with id==0, is allocated in qxl_surface_cache_create_primary with prev==next==NULL. Unlinking it was producing a wrong cache->free_surfaces == NULL. This was not a problem because unlinking the primary only happened in switch_host, which then called surface_cache_init. In a following commit switch_host is simplified to destroy-primary+create-primary, so this bug needs to be fixed first to avoid leaking surfaces and reaching a no surface available situation.
2012-06-15qxl_surface: add DEBUG_SURFACE_LIFECYCLE helpersAlon Levy1-0/+46
2012-06-15io: add qxl_io_destroy_primaryAlon Levy2-0/+18
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-27Distribution-agnostic XORG_MACROS_VERSION check messageChristophe Fergeau1-1/+1
2012-04-25Change xorg-macros -> xorg-x11-util-macros in configure error messageYaniv Kaul1-1/+1
At least in Fedora 17, the correct RPM name is xorg-x11-util-macros
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