summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-21uxa: use GCPtr instead of GC *HEADmasterEnrico Weigelt, metux IT consult2-4/+4
Xserver includes have explicit pointer types for quite all kind of structs (at least those used by drivers), which are used all over the Xserver. Thus it's much cleaner to use those everywhere. This commit also clears the road to fix a horrible nightmare of hacks just needed to circumvent naming clashes between Xserver and Xlib (affecting all DDXes that are painting on another Xserver): we can simply rename Xserver's own "GC" type to "GCRec" (the usual naming convention here) and so no trouble with Xlib's "GC" type anymore. Once this has landed, we're free to do that without breaking this driver. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-10-05gitlab CI: ensure libtool is installed in build containerAlan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-01-24qxl 0.1.6xf86-video-qxl-0.1.6Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-04-12Default to one head if there is no NUM_HEADS optionJoachim Breuer1-0/+4
2022-04-12Initialize pScrn->{width, height} from primaryJoachim Breuer1-2/+2
... instead of pScrn->currentMode, the latter is not initialized in xorg-server-21.1.3
2022-04-12fix pScrn->modes == NULL in xf86InitViewport()Joachim Breuer1-1/+1
track pScrn->modes along with qxl->x_modes
2022-04-06configure: Simplify fragile libdrm detectionAdam Jackson1-7/+1
libdrm 2.4.46 always installs qxl_drm.h
2022-04-06gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-19uxa: Convert source files from ISO-8859-1 to UTF-8Alan Coopersmith2-3/+3
Clears errors from FlawFinder in gitlab CI: Error: encoding error in ./src/uxa/uxa-unaccel.c 'utf-8' codec can't decode byte 0xa9 in position 19: invalid start byte Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-19gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-06Fix a build error with Xorg masterZoltán Böszörményi2-9/+10
Use xf86ReturnOptValBool() in get_bool_option() instead of options[option_index].value.bool to fix a compiler error with current Xorg xserver master branch. Also use xf86GetOptValInteger() in get_int_option() and xf86GetOptValString() in get_str_option() for consistency. The change causes a slight performance drop during option parsing because the passed-in index_value is no longer used as an index into the options array. Instead, it's used as a token now for the standard option getter functions which works since the index_value to the get_*_option() functions are identical to the value of options[n].token in the passed-in OptionInfoRec array. Also rename "int option_index" to "int token" for clarity in all three functions. Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2022-01-23Fix spelling/wording issuesAlan Coopersmith2-2/+2
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-23Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-02-05qxl: Include only the dpms headers we needAdam Jackson1-6/+0
dpms.h is provided by libXext, but nothing in our configure.ac is verifying that we have libXext's headers. Fortunately we only need the definitions in dpmsconst.h (which dpms.h included for us), which is in xorgproto and thus implied by having an xserver DDK to build against. And we're even trying to include dpmsconst.h when we think we have it, meaning when HAVE_XEXTPROTO_71 is defined, but while many other drivers define that macro in their configure.ac, we for no particularly good reason do not. Oops. But since xextproto is about ten years old by now we can probably just safely include it unconditionally.
2019-04-06Correct a long standing led state bug in XSpice.Jeremy White1-1/+3
The CtrlProc for our keyboard driver incorrectly mapped the device private to a SpiceKbd* intead of to a InputInfoPtr. That resulted in led state being written into the driver name for our driver structure, instead of into the led state. That, in turn, led to a cool bug where if you pressed caps lock, the two second sync timer in the spice server would cause it to attempt to correct the state by pressing caps lock to get the states to match. Since the states will never match, the caps lock effectively cycles on and off every two seconds. Signed-off-by: Jeremy White <jwhite@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-06Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-18Update README for gitlab migrationAlan Coopersmith3-27/+18
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-16qxl: Initialize prev field while dup surface listVictor Toso1-0/+1
Otherwise we will can hit a segfault qxl_surface_kill() │717 void │718 qxl_surface_kill (qxl_surface_t *surface) │719 { │720 struct evacuated_surface_t *ev = surface->evacuated; │721 │722 if (ev) │723 { │724 /* server side surface is already destroyed (via reset), don't │725 * resend a destroy. Just mark surface as not to be recreated */ │726 ev->pixmap = NULL;│ │727 if (ev->image)│ │728 pixman_image_unref (ev->image); │729 if (ev->next) │730 ev->next->prev = ev->prev; │731 if (ev->prev) >│732 ev->prev->next = ev->next; │733 free(ev); │734 surface->evacuated = NULL; │735 return; │736 } Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641793 Signed-off-by: Victor Toso <victortoso@redhat.com>
2018-11-13Make output names match modesetting driverJonathon Jongsma1-16/+19
The xrandr output name used by the QXL driver is based on the drm connector type, but the names do not match the kernel names (see /drivers/gpu/drm/drm_connector.c) or the modesetting driver names (see hw/xfree86/drivers/modesetting/drmmode_display.c). Making these more consistent will require less driver-specific special-case code if a user wants to match an xrandr output to a drm connector. Note that this patch should not actually change any behavior, since the QXL driver only uses the 'Virtual' connector type, so this is done only for consistency. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-11-13Make output name numbering 1-basedJonathon Jongsma1-2/+1
The QXL driver names its outputs starting at 0 (e.g. Virtual-0, Virtual-1, etc). This code was presumably copy/pasted from a different driver, and is not necessary for the QXL driver. Other drivers simply use the kernel connector_type_id which starts at 1. For example, the modesetting driver changed from 0-based names to 1-based names for the same reason in xserver commit 139e36dd. This will help to make it easier to identify which xrandr outputs belong to which drm connector without requiring as many driver-specific special-cases. This change might effect custom xorg configurations that references a specific output name. But the same change was made in modesetting driver despite that possibility. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-06-19qxl: call provider initDave Airlie1-0/+3
This prevents crashes when multiple QXL devices are configured in a VM. https://bugzilla.redhat.com/show_bug.cgi?id=1428340
2017-06-13modesetting: Validate the atom for enum propertiesAdam Jackson1-1/+2
The client could have said anything here, and if what they said doesn't actually name an atom NameForAtom() will return NULL, and strcmp() will be unhappy about that. [copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc] Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-07Make some variables staticFrediano Ziglio6-6/+6
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-04-07Make some function staticFrediano Ziglio4-6/+4
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-04-06Spelling and typo fixes in some commentsFrancois Gouget7-10/+10
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-04-06Spelling fixes in the READMEs and configuration samplesFrancois Gouget3-3/+3
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-02-08Xspice: Fix Python3 str() vs bytes() confusionChristophe Fergeau1-1/+1
With python3, without universal_newlines=True, Popen().stdout.read() will return a byte array, while find(str) expects to operate on a string. I've checked that this still works with python2 as well.
2017-02-08Xspice: Remove extra space before assignmentChristophe Fergeau1-2/+2
2017-02-08Xspice: Use print("") instead of print ""Christophe Fergeau1-8/+8
This allows Xspice to run when using python3 instead of python2
2016-12-19NEWS: Xspice now works with X.org 1.19xf86-video-qxl-0.1.5Christophe Fergeau1-1/+1
2016-12-19Revert "Remove unused 'event_mask' field"Christophe Fergeau1-2/+5
This reverts commit bfb724076d575d5a49d08913b86885688251a176. This was pushed by mistake.
2016-12-19Remove unused 'event_mask' fieldChristophe Fergeau1-5/+2
With the Xorg 1.19 codepaths, the 'event_mask' field of SpiceWatch is only useful for sanity checking the event we get from Xorg. This commit assumes Xorg is sane, and removes this extra field.
2016-12-19Xspice: Replace malloc/strdup use with xnfalloc/xnfstrdupChristophe Fergeau3-9/+9
spiceqxl_*.c files are Xspice-only code. They contain a few uses of malloc/strdup, and none of these are checked for failure. It's better to replace these with xfnalloc/xnfstrdup which are provided by the X server and cannot fail (aborts on failure). Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-12-19xspice: Adjust to X.org 1.19 changesChristophe Fergeau2-11/+89
In newer X.org versions, it's no longer supported to modify the set of FDs passed to a BlockHandler method to get notified when the FD has data to be read. This was limited anyway as we could only get read events this way, and had to do our own polling to get notified about socket writeability. Starting from xserver 1.19, the supported way of doing this is to use the SetNotifyFd/RemoveNotifyFd API, which is actually a much better way as it matches very well the 'watch' API spice-server expects Xspice to implement. This commit switches to that new API, which removes the need for RegisterBlockAndWakeupHandlers(). Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
2016-12-12build-sys: Update for 0.1.5 releaseChristophe Fergeau2-1/+14
2016-12-12spiceqxl: Improve the Xspice and Xorg configuration option descriptionsFrancois Gouget2-118/+143
Group the options more logically and improve their descriptions. Add the missing help strings for Xspice --help and standardize the messages to start with a lowercase and not end with a period. In the Xorg configuration, always show the default in the commented-out sample. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-12-12build: Error out when enabling xspice with X.Org 1.19Christophe Fergeau1-2/+6
xspice needs to be updated to cope with some X.Org 1.19 API changes, better to make that explicit at configure time rather than letting people discover the hard way (it builds with warnings but will not work) that it's broken.
2016-12-12Fix "calles" typo in commentChristophe Fergeau1-1/+1
2016-12-12Disable composite/a8 surfaces for KMSDave Airlie1-0/+8
This should help with bug #974198
2016-12-12Disable surfaces when KMS is usedDave Airlie1-0/+2
This is not working properly at the moment.
2016-11-02spiceqxl: Remove an unused macroFrancois Gouget1-11/+0
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-10-04Fix crash caused by attempting to access the screen pixmap before it is createdHans de Goede3-3/+5
qxl_resize_primary_to_virtual() was using pScrn->pScreen != NULL to check if createScreenResources has been called. But starting with xserver 1.19 pScrn->pScreen is non NULL even before createScreenResources is called, causing an invalid access to the screenPixmap in qxl_resize_primary_to_virtual(). This commit fixes this. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1381045 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-08-30Check for either xfont.pc or xfont2.pcOwen W. Taylor2-2/+16
More recent versions of Xfont have a different API (with namespacing for libXfont functions.) Check for xfont2.pc and if found, use that, and use the new API. The rational for preferring libXfont2 is that as a recent change the xserver module looks for and requires libXfont2, and it's better not to have both versions of the library in process.
2016-07-07Xspice: Add --video-codecs to specify encoder and codec preferencesFrancois Gouget1-1/+2
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Jeremy White <jwhite@codeweavers.com>
2016-07-07spiceqxl: Add SpiceVideoCodecs to specify video codec preferenceFrancois Gouget4-0/+25
Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Signed-off-by: Jeremy White <jwhite@codeweavers.com>
2016-04-06xspice: Don't create Xorg time in timer_addChristophe Fergeau1-2/+2
SpiceCoreInterface::timer_add() is used by spice-server for integration with external mainloops. timer_add() is only meant to create a disabled timer, this timer will then be started with a call to timer_start(). The current implementation in Xspice creates a timer which will trigger in a very long time, assuming this will never happen. This 'forever' is 1,000,000 seconds, which amounts to 11 days. After that time, some timers which are meant to be disabled (eg migration related timers in spice-server) fire, then causing a crash with some failed assertions. Instead of creating the X timer right away in timer_add(), we can wait until timer_start() is called before starting it, which avoids this issue.
2016-03-24spiceqxl_audio: Stop the playback channel if there is nothing to playFrancois Gouget1-7/+21
This lets the client free the audio resources when an audio application is not actually playing anything, typically because playback is paused. This matches QEMU's behavior. As a side benefit it stops the client's mm-time from being stuck (due to the audio backend's delay updates being applied to the mm-time of the last audio message) which lets video streams play in this situation. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-03-24spiceqxl_audio: Only start the playback channel when fifos are presentFrancois Gouget1-12/+23
This lets the client free the audio resources when they are not needed. This matches QEMU's behavior. As a side benefit it stops the client's mm-time from being stuck (due to the audio backend's delay updates being applied to the mm-time of the last audio message, that is the channel's creation) when no audio application is running. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-03-24spiceqxl_audio: Fix a race condition in the audio playbackFrancois Gouget1-25/+22
can_feed() depends on the time and thus could return false in process_fifos(), causing it to stop reading from the fifos, and then true in watch_or_wait() so that the wall_timer would not be set, but the fifos would not be watched either because they already contain data to process. The audio playback would then come to a stop. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-03-24spiceqxl_audio: Only condense the fifo list when one has been closedFrancois Gouget1-23/+33
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>