summaryrefslogtreecommitdiffstats
path: root/server/red_worker.h
Commit message (Collapse)AuthorAgeFilesLines
* server: create display and cursor channels in RedWorker constructorMarc-André Lureau2015-11-091-0/+2
| | | | | | | | Instead of requiring the dispatcher to send a message to the worker to create the display channel and cursor channel, just create them when the worker is created. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* Various changes in RedWorker and CursorChannel related to error and warning ↵Marc-André Lureau2015-11-041-1/+0
| | | | | | | messages. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: make more of cursor privateMarc-André Lureau2015-11-031-0/+1
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: make cursor channel privateMarc-André Lureau2015-11-031-0/+5
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* Move pipe item enumerations out of red_worker.hMarc-André Lureau2015-11-021-18/+3
| | | | | | | | | | Move the cursor-specific pipe item types to cursor-channel.h, and the display-specific types to red_worker.c. Only leave the common definitions in red_worker.h. This prepares for splitting the display channel into a separate file. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* __new_channel -> red_worker_new_channel()Marc-André Lureau2015-10-301-10/+4
| | | | | | | | Rename and lightly refactor the function that creates new common channels for RedWorker (essentially Cursor and Display channels). Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* common_channel_client_create -> common_channel_new_clientMarc-André Lureau2015-10-301-11/+11
| | | | | | | | Rename and re-order the initial arguments to make this function look and act more like a method of the CommonChannel class. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Change red_marshall_verb() to accept a VerbItemMarc-André Lureau2015-10-301-2/+2
| | | | | | | Instead of passing a verb enumeration value, pass the verb pipe item Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: move some cursor code to cursor-channel.cMarc-André Lureau2015-10-291-0/+92
| | | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: remove need for WorkerInitDataMarc-André Lureau2015-10-261-29/+1
| | | | | | Move code around to declare and place it where it fits better. Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: access dispatcher pending field using helper functionsMarc-André Lureau2015-10-261-5/+0
| | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* server: start separate display/cursor channel headersMarc-André Lureau2015-10-231-0/+20
| | | | | | Just move some declarations around Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: remove worker thread creation from dispatcherMarc-André Lureau2015-10-221-1/+4
| | | | | Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* server/dispatcher: move worker enums to dispatcher headerMarc-André Lureau2015-10-221-92/+1
| | | | | | | Group enums with their respective struct location. Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
* server: remove hardcoded RED_MAX_RENDERERSMarc-André Lureau2015-09-011-3/+3
| | | | | Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* Adjust to new SpiceImageCompress nameChristophe Fergeau2015-07-291-1/+1
| | | | | | | | This has been renamed to SpiceImageCompression in order to avoid clashes with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This commit is a straight rename of SpiceImageCompress to SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to SPICE_IMAGE_COMPRESSION_
* Use image compress constants from spice-protocolJavier Celaya2015-06-301-1/+1
|
* server: move bit set/clear utilities out of red_worker.hAlon Levy2013-08-141-18/+0
|
* server: Add public spice_qxl_driver_unload methodHans de Goede2013-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | With a SPICE_DISPLAY_CAP_MONITORS_CONFIG capable client, the client needs to know what part of the primary to use for each monitor. If the guest driver does not support this, the server sends messages to the client for a single monitor spanning the entire primary. As soon as the guest calls spice_qxl_monitors_config_async once, we set the red_worker driver_has_monitors_config flag and stop doing this. This is a problem when the driver gets unloaded, for example after a reboot or when switching to a text vc with usermode mode-setting under Linux. To reproduce this start a multi-mon capable Linux guest which uses usermode mode-setting and then once X has started switch to a text vc. Note how the client window does not only not resize, if you try to resize it manually you always keep blackborders since the aspect is wrong. This patch is the spice-server side of fixing this, it adds a new spice_qxl_driver_unload method which clears the driver_has_monitors_config flag. The other patch needed to fix this is in qemu, and will calls this new method from qxl_enter_vga_mode. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* server: add monitors_config supportAlon Levy2012-07-221-0/+2
| | | | | | | | | | | | | | | | a SpiceMsgDisplayMonitorsConfig is sent on two occasions: * as a result of a spice_qxl_monitors_config_async * whenever a client connects and there is a previously set monitors config Sending the new message is protected by a new cap, SPICE_DISPLAY_CAP_MONITORS_CONFIG More elaborately: spice_qxl_monitors_config_async receives a QXLPHYSICAL address of a QXLMonitorsConfig struct and reads it, caching it in the RedWorker, and sending it to all clients. Whenever a new client connects it receives a SpiceMsgDisplayMonitorsConfig message as well.
* Use the spice-common logging functionsMarc-André Lureau2012-03-251-2/+2
| | | | | It will abort by default for critical level messages. That behaviour can be tuned at runtime.
* Remove trailing blank linesDaniel P. Berrange2012-01-131-1/+0
| | | | Remove any blank lines at the end of all source files
* server/red_worker: reuse dispatcherAlon Levy2011-11-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | This patch reuses Dispatcher in RedDispatcher. It adds two helpers to red_worker to keep RedWorker opaque to the outside. The dispatcher is abused in three places that use the underlying socket directly: once sending a READY after red_init completes once for each channel creation, replying with the RedChannel instance for cursor and display. FDO Bugzilla: 42463 rfc->v1: * move callbacks to red_worker.c including registration (Yonit) * rename dispatcher to red_dispatcher in red_worker.c and red_dispatcher.c * add accessor red_dispatcher_get_dispatcher * s/dispatcher_handle_recv/dispatcher_handle_recv_read/ and change sig to just Dispatcher *dispatcher (was the SpiceCoreInterface one) * remove SpiceCoreInterface parameter from dispatcher_init (Yonit) * main_dispatcher needed it for channel_event so it has it in struct MainDispatcher * add dispatcher_get_recv_fd for red_worker
* server: registering RedChannel in reds, instead of ChannelYonit Halperin2011-08-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Merging the functionality of reds::channel, into RedChannel. In addition, cleanup and fix disconnection code: before this patch, red_dispatcher_disconnect_display_client could have been called from the red_worker thread (and it must be called only from the io thread). RedChannel holds only connected channel clients. RedClient holds all the channel clients that were created till it is destroyed (and then it destroys them as well). Note: snd_channel still doesn't use red_channel, however it creates dummy channel and channel clients, in order to register itself in reds. server/red_channel.c: a channel is connected if it holds at least one channel client Previously I changed RedChannel to hold only connected channel clients and RedClient, to hold all the channel clients as long as it is not destroyed. usbredir: multichannel has not been tested, it just compiles.
* server: Add RedClientAlon Levy2011-08-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That means RedClient tracks a ring of channels. Right now there will be only a single client because of the disconnection mechanism - whenever a new client comes we disconnect all existing clients. But this patch adds already a ring of clients to reds.c (stored in RedServer). There is a known problem handling many connections and disconnections at the same time, trigerrable easily by the following script: export NEW_DISPLAY=:3.0 Xephyr $NEW_DISPLAY -noreset & for ((i = 0 ; i < 5; ++i)); do for ((j = 0 ; j < 10; ++j)); do DISPLAY=$NEW_DISPLAY c_win7x86_qxl_tests & done sleep 2; done I fixed a few of the problems resulting from this in the same patch. This required already introducing a few other changes: * make sure all removal of channels happens in the main thread, for that two additional dispatcher calls are added to remove a specific channel client (RED_WORKER_MESSAGE_CURSOR_DISCONNECT_CLIENT and RED_WORKER_MESSAGE_DISPLAY_DISCONNECT_CLIENT). * change some asserts in input channel. * make main channel disconnect not recursive * introduce disconnect call back to red_channel_create_parser The remaining abort is from a double free in the main channel, still can't find it (doesn't happen when running under valgrind - probably due to the slowness resulting from that), but is easy to see when running under gdb.
* server/red_worker: explicitly include unistd and errnoAlon Levy2011-08-231-0/+2
|
* server: add QXLWorker.flush_surfaces_async for S3/S4 supportAlon Levy2011-07-201-0/+2
| | | | | | | | | | | This does the following, all to remove any referenced memory on the pci bars: flush_all_qxl_commands(worker); flush_all_surfaces(worker); red_wait_outgoing_item((RedChannel *)worker->display_channel); red_wait_outgoing_item((RedChannel *)worker->cursor_channel); The added api is specifically async, i.e. it calls async_complete when done.
* server: add async io supportAlon Levy2011-07-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new _ASYNC io's in qxl_dev listed at the end get six new api functions, and an additional callback function "async_complete". When the async version of a specific io is used, completion is notified by calling async_complete, and no READY message is written or expected by the dispatcher. update_area has been changed to push QXLRects to the worker thread, where the conversion to SpiceRect takes place. A cookie has been added to each async call to QXLWorker, and is passed back via async_complete. Added api: QXLWorker: update_area_async add_memslot_async destroy_surfaces_async destroy_primary_surface_async create_primary_surface_async destroy_surface_wait_async QXLInterface: async_complete
* server: use gcc builtin for atomic get/set bitChristophe Fergeau2011-05-031-2/+4
|
* server: enabling/disabling jpeg and zlib-over-glz via spice command line argsYonit Halperin2010-07-121-0/+2
|
* RedWorkeMessage -> RedWorkerMessageAlexander Larsson2010-05-211-5/+5
|
* replace worker load/save with loadvm_commands, allow keeping surface contentGerd Hoffmann2010-05-191-2/+1
| | | | | | | | | | | | | | | Add worker->loadvm_commands. qemu will uses this to send a series of commands needed to restore state after savevm/loadvm and migration. That will be one create-surface command per surface and one cursor-set command for the local pointer. The worker->save/load functions are not needed any more. Likewise the interface->{get,set}_save_data callbacks. Surfaces created via loadvm_commands *will* not be cleared. Also primary surfaces are not cleared any more (unconditionally, although we could do that conditionally on loadvm using the flags field in QXLSurfaceCreate).
* QXL: redesign.Gerd Hoffmann2010-05-191-1/+1
|
* Remove all mentions of "cairo" from the codeAlexander Larsson2010-05-031-1/+1
| | | | | The command line option is renamed from "cairo" to "sw", and similarly all filenames and types from Cairo to Sw (and similar).
* Relicense everything from GPL to LGPL 2.1+Alexander Larsson2010-04-131-9/+9
|
* libspice: add off screens supportIzik Eidus2010-04-031-0/+1
| | | | Signed-off-by: Izik Eidus <ieidus@redhat.com>
* new libspice api: make image_compression_t part of the public api.Gerd Hoffmann2010-03-091-1/+1
|
* libspice: add surface 0 supportIzik Eidus2010-01-281-2/+8
| | | | | | This include alot of infestracture for off screens. Signed-off-by: Izik Eidus <ieidus@redhat.com>
* spice: server: add memslots support.Izik Eidus2009-11-231-0/+6
| | | | Signed-off-by: Izik Eidus <ieidus@redhat.com>
* fresh startYaniv Kamay2009-10-141-0/+134