summaryrefslogtreecommitdiff
path: root/hw/kdrive
AgeCommit message (Collapse)AuthorFilesLines
2018-08-02meson: Remove XXX for libconfig in kdrive.Eric Anholt1-2/+0
This is already included in ephyr (the only kdrive server left) Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-27meson: Install man pagesAdam Jackson1-0/+7
Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27man: s/__/@/gAdam Jackson2-5/+5
A cosmetic change for automake (though we have to replicate some of xorg-macros.m4 in manpages.am now), but meson's configure_file() wants @-delimited strings. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-05glamor: Implement GetSupportedModifiersLouis-Francis Ratté-Boulianne1-0/+1
Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible v5: Fix memory corruption in XWayland (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-20Xephyr: Avoid calling xcb_shm_detach() twiceAlexander Volkov1-1/+0
This call was forgotten to be removed in 90996f5909aab4bc9aa4011a6a6d0555a7aa3adf in which hostx_destroy_shm_segment() was introduced, which itself does it. Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-19meson: Xephyr Requires xcb-shm version 1.9.3 or newerLaurent Carlier1-1/+1
Sync with commit 8510f542e5474b719f7d7edba7ef0cc05af0271e Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
2018-02-14miinitext: Load GLX on the mi pathAdam Jackson1-16/+0
Add a stub for Xnest so it continues to link, but otherwise we support GLX on every server so there's no need to make every DDX add it. Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14glx: Use vnd layer for dispatch (v4)Adam Jackson3-1/+5
The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it. Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID. v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks. v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman) v4: Fix deletion of ghost contexts (Kyle Brenneman) Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-02Xephyr: Call forgotten XShmDetach if can't mmap SHM segmentAlexander Volkov1-3/+7
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-01Xephyr: Prefer using MIT-SHM FD-passing when possibleAlexander Volkov2-28/+82
This makes the shared memory visible only for the Xephyr and the X server to which it is connected. Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-01Xephyr: Extract functions to create/delete shared memory segmentsAlexander Volkov1-37/+48
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-12-13kdrive: remove KdSignalWrapper etc.Adam Jackson1-14/+0
This no longer does anything useful. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-11-15glamor: Drop the non-VAO rendering pathAdam Jackson1-29/+8
GLES spells this extension as GL_OES_vertex_array_object, but it is functionally equivalent to the GL_ARB version. Mesa has supported both since 9.0, let's go ahead and require it. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-11-06Xephyr: free driverPrivates on FiniGiuseppe Bilotta1-0/+2
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-30Use ARRAY_SIZE all over the treeDaniel Martin1-3/+1
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with the ARRAY_SIZE macro from dix.h when possible. A semantic patch for coccinelle has been used first. Additionally, a few macros have been inlined as they had only one or two users. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-05-11xephyr: Fix regenerationAdam Jackson1-3/+5
I had said: commit c42311a9d7d2e5a67bdb7f4fa32032b4feba59b1 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 24 15:58:54 2017 -0400 kdrive: Remove KdOsFuncs Only the Init slot was used, and Xephyr can just as easily do that initialization directly. And I'd've been right, but I forgot to make that initialization only happen on startup (i.e. when serverGeneration == 1). Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-04meson: Fix kdrive build.Eric Anholt2-2/+0
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-03kdrive: Remove dead slots from KdCardFuncsAdam Jackson5-120/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-03kdrive: Remove KdOsFuncsAdam Jackson7-126/+10
Only the Init slot was used, and Xephyr can just as easily do that initialization directly. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-05-03kdrive: static and dead code cleanupAdam Jackson8-1080/+50
Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-26Add a Meson build system alongside autotools.Eric Anholt3-0/+86
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-10xephyr: Check for host XVideo support before trying to use itAdam Jackson1-0/+5
Otherwise xcb will treat our attempt to send xv requests as a connection error (quite reasonably: we're asking it to emit a request for which there is no defined major opcode), and we'll die quietly the first time we hit KdBlockhandler. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-27dix: Lift DPMS to a screen hookAdam Jackson1-12/+0
Following on from the previous change, this adds a DPMS hook to the ScreenRec and uses that to infer DPMS support. As a result we can drop the dpms stub code from Xext. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-23kdrive: Drop kdrive-config.h.Eric Anholt16-30/+32
It had nothing left in it that was used but wasn't in dix-config.h. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23kdrive: Unifdef KDRIVE_EVDEV.Eric Anholt2-35/+0
ajax deleted the evdev driver in the removal of fbdev and the linux backend. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23Xephyr: Handle source-only pictures in ephyrPrepare/DoneCompositeMichel Dänzer1-2/+4
There is no pixmap associated with source-only pictures. Fixes Xephyr -fakexa crashing on startup. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-17ephyr: Don't clobber bitsPerPixel when using glamorAdam Jackson1-1/+0
This ends up passing 0 as the bpp argument to fb screen setup, which is not really the best plan. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-15Xephyr: Check screen resources creation successOlivier Fourdan2-2/+9
If the screen pixmap or the corresponding texture creation with glamor fails, exit cleanly with an error message instead of segfaulting. Fixes: https://bugzilla.redhat.com/1431633 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2017-03-01kdrive: Remove now-unused linux backendAdam Jackson5-1096/+1
With Xfbdev gone this has no consumers. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01xfbdev: RemoveAdam Jackson7-1162/+1
With the shadow framebuffer overallocation bug fixed (ref below), Xorg + fbdev has tens to hundreds of kilobytes more baseline memory usage than Xfbdev. That's not nothing, but it's little enough that we should focus our efforts on the server that actually gets development attention. https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8 Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-01xfake: RemoveAdam Jackson9-935/+2
We already have Xvfb for a dummy DDX. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2017-01-19kdrive: Remove non-evdev input driversAdam Jackson6-1699/+0
Use evdev. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-10-28ephyr: Leave window unmapped for -glamor-skip-present [v2]Keith Packard1-1/+5
If we're never painting anything in the window, we probably don't need to map it. v2: Drop ephyr_glamor_gles2 from hostx.c Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-10-26ddx: add new call to purge input devices that weren't addedPeter Hutterer1-0/+5
Special case for the systemd-logind case in xfree86: when we're vt-switched away and a device is plugged in, we get a paused fd from logind. Since we can't probe the device or do anything with it, we store that device in the xfree86 and handle it later when we vt-switch back. The device is not added to inputInfo.devices until that time. When the device is removed while still vt-switched away, the the config system never notifies the DDX. It only runs through inputInfo.devices and our device was never added to that. When a device is plugged in, removed, and plugged in again while vt-switched away, we have two entries in the xfree86-specific list that refer to the same device node, both pending for addition later. On VT switch back, the first one (the already removed one) will be added successfully, the second one (the still plugged-in one) fails. Since the fd is correct, the device works until it is removed again. The removed devices' config_info (i.e. the syspath) doesn't match the actual device we addded tough (the input number increases with each plug), it doesn't get removed, the fd remains open and we lose track of the fd count. Plugging the device in again leads to a dead device. Fix this by adding a call to notify the DDX to purge any remainders of devices with the given config_info, that's the only identifiable bit we have at this point. https://bugs.freedesktop.org/show_bug.cgi?id=97928 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-09-28xephyr: Don't crash if the server advertises zero xv adaptorsAdam Jackson1-1/+1
Useless as an XVideo implementation with zero adaptors might be, it's apparently a thing in the wild. Catch this case and bail out of xv init if it happens. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-09-28ephyr: Add a mode for skipping redisplay in glamorEric Anholt2-1/+14
This speeds up headless testing of Xephyr -glamor with softpipe from "a test per minute or so" to "a test every few seconds". Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-07-21Switch poll() users to xserver_poll()Keith Packard3-7/+7
This uses the wrapper in case we need to emulate poll with select as we do on Windows. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2016-07-18Remove readmask from screen block/wakeup handlerKeith Packard3-8/+6
With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2]Keith Packard1-33/+31
This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18kdrive: switch from select(2) to poll(2)Keith Packard6-48/+28
This avoids fd limits Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20ephyr: Process only the last expose or configure available from the serverKeith Packard1-5/+22
Delay expose or configure processing until the event queue is empty so that we don't end up processing a long series of events one at a time. Expose events already have a check waiting for the last in a series, this further improves that by discarding multiple series of events. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20ephyr: Process queued X events before blocking [v2]Keith Packard3-19/+65
If we end up reading all pending X events in the course of other server execution, then our notify FD callback won't get invoked and we won't process them. Fix this by noting that there are queued events in the block handler, setting the poll timeout to zero and queuing a work proc to clear the event queue. v2: use a work proc to clear the event queue rather than doing it in the block handler directly. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20ephyr: Handle window resize when using glamorKeith Packard2-5/+31
Under glamor, we need to re-create the screen pixmap at the new size so that we can ask glamor for the associated texture. Fortunately, we can simply use ephyr_glamor_create_screen_resources to create the new pixmap. Because this is being done after the server has started, we need to walk the window heirarchy and reset any windows pointing at the old pixmap. I could easily be convinced that this TraverseTree should be moved to miSetScreenPixmap. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20ephyr: Don't configure window while responding to configure eventsKeith Packard3-0/+13
This leads to and endless sequence of window resizes. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20dix: Call screen block/wakeup handlers closest to blocking [v3]Keith Packard2-16/+29
The screen block and wakeup handlers are the only ones which provide a well known ordering between the wrapping layers; placing these as close as possible to the server blocking provides a way for the driver to control the flow of execution correctly. Switch the shadow code to run in the screen block handler so that it now occurrs just before the server goes to sleep. Switch glamor to call down to the driver after it has executed its own block handler piece, in case the driver needs to perform additional flushing work after glamor has called glFlush. These changes ensure that the following modules update the screen in the correct order: animated cursors (uses RegisterBlockAndWakeupHandlers dynamically) composite (dynamic wrapping) misprite (dynamic wrapping) shadow (static wrapping) glamor (static wrapping) driver (static wrapping) It looks like there's still a bit of confusion between composite and misprite; if composite updates after misprite, then it's possible you'd exit the block handler chain with the cursor left hidden. To fix that, misprite should be wrapping during ScreenInit time and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) [v3] ephyr: Use screen block handler for flushing changes ephyr needs to make sure it calls glXSwapBuffers after glamor finishes its rendering. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-06-20kdrive: Only enable threaded input if we have input devicesKeith Packard1-1/+2
When there aren't any devices, the input thread is going to be pretty lonely, so don't bother to even start it. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-08dix: Use OsSignal() not signal()Adam Jackson4-5/+0
As the man page for the latter states: The effects of signal() in a multithreaded process are unspecified. We already have an interface to call sigaction() instead, use it. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2016-05-26kdrive: Use threaded inputKeith Packard1-2/+4
Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26kdrive: Don't lock input across read in KdNotifyFdKeith Packard1-2/+0
We won't need these locks with the new threaded input code as it holds the input lock across all of the input device I/O operations. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26Remove SIGIO support for input [v5]Keith Packard2-66/+12
This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>