summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2014-05-05intel-virtual-output: Copy existing CRTC informationChris Wilson1-0/+9
If we fail to disable the remote output during initialisation, copy the current configuration in order to try and keep the bookkeeping in order. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-05intel-virtual-output: Try disabling Panning after disabling CRTCChris Wilson1-4/+33
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-05intel-virtual-output: Mark ShmPixmap destinations as writeableChris Wilson1-1/+1
In order to prevent a subsequent BadAccess when we try to use it as a ShmPixmap, we need to mark the segment as writeable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> References: https://bugs.freedesktop.org/show_bug.cgi?id=78293
2014-05-05intel-virtual-output: Check for errors whilst creating ShmPixmapsChris Wilson1-0/+10
Creating a ShmPixmap may cause an asynchronous BadAccess error, so wrap the construction with XSync and check for an error before proceeding. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> References: https://bugs.freedesktop.org/show_bug.cgi?id=78293
2014-05-05intel-virtual-output: Record shm/randr/xinerama queries in DBG logChris Wilson1-0/+17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-05intel-virtual-output: Check error state when disabling CRTCChris Wilson1-15/+19
Only mark an output as disabled if we do successfully disable it. This will require a little more work to make sure that such errors are cleanly propagated back to the host... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-09intel-virtual-output: Fix damage boundsChris Wilson1-8/+10
Sigh. A serious mixup of integer promotion rules and wraparound caused the damage computation for small regions to be completely bogus. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07intel-virtual-output: Fixup DBG messagesChris Wilson1-2/+2
Use the right variables and it may even compile. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-27intel-virtual-output: Add DBG option to force 16 bit transfersChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-25intel-virtual-output: Fix damage iteration over active listChris Wilson1-1/+1
When iterating over the active list to mark the current damage, we need to chase the ->active pointer rather than ->next or else we walk the wrong list from the wrong starting point. Reported-by: Kirill Müller <mail@kirill-mueller.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76271 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-25intel-virtual-output: Add a little more DBG around damaging clonesChris Wilson1-4/+12
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-25intel-virtual-output: Do not detach with DBG enabledChris Wilson1-1/+1
Since DBG is sent to stdout, we only see it if we do not daemonize (which closes stdout). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Minor DBG fixesChris Wilson1-1/+1
Improve the summary after failing to detect MIT-SHM, and fix a DBG Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Iterate over remote outputs in the same order as listedChris Wilson1-0/+18
If we walk the output lists in the same order as they are listed by RandR, we are more likely to hit favourable priority sorting. E.g. the user is likely to setup the outputs in the same order as listed, meaning fewer CRTC transitions etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Disable panning before setting mode on CRTCChris Wilson1-4/+4
For whatever reason, presumably to do with the switch between CRTCs, we need to disable the panning before setting the mode in order for our desired CRTC position to take effect. Reported-by: Jeff Katz <bugzilla@kraln.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76146 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Mode names are freed with ScreenResourcesChris Wilson1-6/+11
So we have to be careful not to continue to reference the strings after they may be freed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Include extra debug information for modesetsChris Wilson1-1/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-14intel-virtual-output: Disable remote CRTCs at startupChris Wilson1-20/+27
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-18intel-virtual-output: Discard unwanted events from the mouse recorderChris Wilson1-1/+2
X always sends MappingNotify events (there is no way for the client to ignore them). In particular, MappingNotify would be sent after a VT switch, and this would knock out our ability to track the cursor.. Reported-by: Raul Dias <raul@dias.com.br> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75115 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-17backlight-helper: Simplify reading the level from stdinHans de Goede1-22/+7
Since the helper is a standalone app, the usual xserver rules of not using stdio because of signal handling don't apply. And since the helper does run with elevated rights, it is important to keep the code KISS so that it can be audited easily. This commit replaces the hard to read "raw" read loop with a much simpler loop using fgets, improving readability of the code. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-02-15Backlight helper build fixesJan Alexander Steffens (heftig)2-6/+5
Don't hardcode $(prefix)/libexec Fix install hook when DESTDIR is set Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75028
2014-02-15intel: Add a helper for setting backlight without root rightsChris Wilson4-4/+98
Once the xserver stops running as root on kms capabable systems, we will need some other way to access the backlight. The approach taken in this patch moves most of the heavy lifting to a helper that runs with root privileges and pipes our requested brightness into the sysfs backlight interface. Where required, we use pkexec to launch the helper with the elevated privilege. v2: Amalgamate much more of the duplicate code. Keep the daemon and pipe alive for the lifetime of the backlight interface. Provide an alternative for systems without PolicyKit. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [v1] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12intel-virtual-output: Do not resize the screen whilst all outputs are offChris Wilson1-7/+25
If all the outputs are off, we try to resize the screen to 1x1, which is typically illegal. So, just keep the existing screen and xfer buffer for next time it is enabled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12intel-virtual-output: Force an output probe on initial connection to remote ↵Chris Wilson1-1/+2
display Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12intel-virtual-output: Fix checking for no change in output modesChris Wilson1-3/+17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12intel-virtual-output: Always requery modes after OutputNotifyChris Wilson1-5/+4
References: https://bugs.freedesktop.org/show_bug.cgi?id=74800 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12intel-virtul-output: Double check timestampsChris Wilson1-5/+13
Compare both res->timestamp and res->configTimestamp for changes in state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20intel-virtual-output: Tidy some DBG for copying new modesChris Wilson1-4/+8
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20intel-virtual-output: Print error events for debuggingChris Wilson1-0/+6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20intel-virtual-output: Disable remote display if SetCrtcConfig failsChris Wilson1-0/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20intel-virtual-output: Clone modes onto remote displayChris Wilson1-5/+25
If the user adds a mode to the VIRTUAL display and then attempts to use it, add that mode to the remote display. Reported-by: Christoph Bessei <admin@schwarzwald-falke.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73816 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27intel-virtual-output: Trim remote framebuffer to fitChris Wilson1-1/+3
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27intel-virtual-output: Workaround mutter always using the same timestampChris Wilson1-1/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-26intel-virtual-output: mute spurious warningsKirill Müller1-1/+8
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72027
2013-11-26intel-virtual-output: Clone remote EDID for virtual outputsChris Wilson1-0/+18
References: https://bugs.freedesktop.org/show_bug.cgi?id=72020 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-26intel-virtual-output: Correct clip region of rotated outputs in source ↵Chris Wilson1-37/+44
framebuffer Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25intel-virtual-output: Include transforms when computing required fb sizeChris Wilson1-3/+32
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25intel-virtual-output: Tweak DBG messages for copying rotationChris Wilson1-4/+5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Remove uneeded headersZdenek Kabelac1-1/+0
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25Makefile convert @var@ to $(var)Zdenek Kabelac1-2/+2
Avoid using @var@ since this could not be easily overwritten through 'make var=xxx' option which is normally available. For Makefile.am users should avoid using @var@. Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-22Revert "intel-virtual-output: Only track the most recent visibility status ↵Chris Wilson1-2/+5
of the cursor" This reverts commit abf1a16914d993cc150005879375d4bb17fdccf3. We need to track visibility over all clones on a display, not just the last. Regression from commit abf1a16914d993cc150005879375d4bb17fdccf3 [2.99.906] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Nov 8 17:09:35 2013 +0000 intel-virtual-output: Only track the most recent visibility status of the curso Reported-by: Kirill Müller <mail@kirill-mueller.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71838 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19intel-virtual-output: Check for failure to create a cloneChris Wilson1-4/+14
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19intel-virtual-output: Fix trivial and unlikely fd leak from bumblebee failureChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-12intel-virtual-output: Manually adjust screen sizeChris Wilson1-22/+117
When we modify the outputs and end up with a different screen size, we need to actually tell the display to resize with an explicit XRRSetScreenSize. Reported-by: Jethro Beekman <freedesktop-bugs@jbeekman.nl> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71441 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11intel-virtual-output: Fix format specifiers for Visual DBGChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11intel-virtual-output: Fix cut'n'paste DBG errorChris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11intel-virtual-output: Avoid the infinite loop around XPendingChris Wilson1-3/+1
XPending() reports if there are any events pending and does not perform any dequeuing itself - ergo for a remote display while (XPending()) ; becomes an infinite loop should there be an event pending. References: https://bugs.freedesktop.org/show_bug.cgi?id=71345 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-10intel-virtual-output: Do not hide the cursor on the local/source displayChris Wilson1-4/+8
Whilst we want to take over and hide the cursor on the remote displays, on the source we need to not interfere with the host. Reported-by: Jethro Beekman <freedesktop-bugs@jbeekman.nl> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71439 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08intel-virtual-output: Only track the most recent visibility status of the cursorChris Wilson1-5/+2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08intel-virtual-output: Fix forced synchronisation of clonesChris Wilson1-12/+27
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>