Commit Graph

87 Commits

Author SHA1 Message Date
Chris Wilson dda57f2e28 intel-virtual-output: Fix checking for no change in output modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12 15:56:45 +00:00
Chris Wilson 94e5ca3d5a intel-virtual-output: Always requery modes after OutputNotify
References: https://bugs.freedesktop.org/show_bug.cgi?id=74800
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12 15:13:42 +00:00
Chris Wilson d84940cc9d intel-virtul-output: Double check timestamps
Compare both res->timestamp and res->configTimestamp for changes in
state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-12 14:48:24 +00:00
Chris Wilson 55a933aa29 intel-virtual-output: Tidy some DBG for copying new modes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20 13:29:22 +00:00
Chris Wilson 637e7c2186 intel-virtual-output: Print error events for debugging
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20 12:33:47 +00:00
Chris Wilson 92e9bf82b2 intel-virtual-output: Disable remote display if SetCrtcConfig fails
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-20 12:33:47 +00:00
Chris Wilson 3138d06893 intel-virtual-output: Clone modes onto remote display
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>
2014-01-20 12:03:13 +00:00
Chris Wilson d65b57cd33 intel-virtual-output: Trim remote framebuffer to fit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 12:59:25 +00:00
Chris Wilson dd7c556072 intel-virtual-output: Workaround mutter always using the same timestamp
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-27 12:57:09 +00:00
Kirill Müller 80d1dee70b intel-virtual-output: mute spurious warnings
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72027
2013-11-26 10:52:18 +00:00
Chris Wilson 36ac68bedd intel-virtual-output: Clone remote EDID for virtual outputs
References: https://bugs.freedesktop.org/show_bug.cgi?id=72020
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-26 09:41:42 +00:00
Chris Wilson 63a964d6d0 intel-virtual-output: Correct clip region of rotated outputs in source framebuffer
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-26 08:52:39 +00:00
Chris Wilson 5580df729f intel-virtual-output: Include transforms when computing required fb size
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 16:56:06 +00:00
Chris Wilson 5fa1b0a2c5 intel-virtual-output: Tweak DBG messages for copying rotation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25 16:13:45 +00:00
Zdenek Kabelac d2df10e28f Remove uneeded headers
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-25 10:04:47 +00:00
Zdenek Kabelac 2275ef581e Makefile convert @var@ to $(var)
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-25 09:25:56 +00:00
Chris Wilson 12e974c7bc Revert "intel-virtual-output: Only track the most recent visibility status of the cursor"
This reverts commit abf1a16914.

We need to track visibility over all clones on a display, not just the
last.

Regression from
commit abf1a16914 [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-22 17:40:10 +00:00
Chris Wilson b14228fafb intel-virtual-output: Check for failure to create a clone
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:17:47 +00:00
Chris Wilson 9e6979b67a intel-virtual-output: Fix trivial and unlikely fd leak from bumblebee failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-19 12:13:26 +00:00
Chris Wilson 20e318c292 intel-virtual-output: Manually adjust screen size
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-12 20:18:48 +00:00
Chris Wilson 3e93449b54 intel-virtual-output: Fix format specifiers for Visual DBG
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 13:15:07 +00:00
Chris Wilson 31b5ff5889 intel-virtual-output: Fix cut'n'paste DBG error
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-11 12:56:48 +00:00
Chris Wilson 3e81a9cbd6 intel-virtual-output: Avoid the infinite loop around XPending
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-11 10:49:10 +00:00
Chris Wilson 7b0771180d intel-virtual-output: Do not hide the cursor on the local/source display
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-10 10:35:27 +00:00
Chris Wilson abf1a16914 intel-virtual-output: Only track the most recent visibility status of the cursor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 17:10:09 +00:00
Chris Wilson b46d0d3271 intel-virtual-output: Fix forced synchronisation of clones
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 14:04:32 +00:00
Chris Wilson fa40286e2f intel-virtual-output: Tighten bad_visual() checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 13:53:48 +00:00
Chris Wilson 83c33a1f43 intel-virtual-output: Disable event tracking after a failure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 13:00:11 +00:00
Chris Wilson 8b10c52804 intel-virtual-output: Add DBG for the latest XSync
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:58:06 +00:00
Chris Wilson 969b064f74 intel-virtual-output: Perform an explicit sync
If we fail to track rendering using ShmCompletionEvents and begin to
drop frames, insert an explicit XSync.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:56:06 +00:00
Chris Wilson e0075ccee2 intel-virtual-output: Check for pending events before skipping draw
Make sure we check if the destination display has caught up before
skipping a frame.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:46:58 +00:00
Chris Wilson ea4f99c333 intel-virtual-output: Add some DBG for bad_visual()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-08 12:30:21 +00:00
Chris Wilson be17746549 intel-virtual-overlay: Error out if no X11 SHM header is defined
Make the error explicit rather than dieing later with unknown constants.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-04 08:40:49 +01:00
Chris Wilson dd130d1b06 intel-virtual-overlay: Grab the server around mode manipulations
Prevent other clients from seeing the intermediate states.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23 10:48:52 +01:00
Chris Wilson 011636d25b intel-virtual-output: Hide the remote cursor on initial connection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-20 18:57:11 +01:00
Chris Wilson dcf9b5ae18 intel: Compile fixes for base install of SLED11.sp3
Highlights of that distribution include xorg-xserver-1.6.5, kernel
3.0.76 and gcc-4.3.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18 12:49:41 +01:00
Chris Wilson 0ceba64821 intel-virtual-output: Debug option for forcing full redraws
References: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-08 13:51:14 +01:00
Chris Wilson ccd605c492 intel-virtual-output: Unregister our singleton on a clean shutdown
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-06 00:34:07 +01:00
Chris Wilson 3c5caaf0a9 intel-virtual-output: Only wake up for a change in a visible cursor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-06 00:30:53 +01:00
Chris Wilson 91b1f77da5 intel-virtual-output: Make the flush for recreating Damage explicit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-06 00:23:37 +01:00
Chris Wilson 3979d11677 intel-virtual-output: Just request Damage BBox
As we ourselves only track the BBox of damage on the virtual outputs, we
can ask X to amalgamate the damage events as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 23:28:16 +01:00
Chris Wilson 2263f8f26f intel-virtual-overlay: Reset damage across modesets
Some versions of the Xserver lose Damage tracking across the modeset,
causing a loss of damage notifications and repainting to cease on the
virtual outputs. We can workaround this by reattaching the damage every
time we receive notification that the local Screen configuration
changes.

Reported-and-tested-by: Severin Strobl <fd@severin-strobl.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 22:29:55 +01:00
Chris Wilson 5dea07c31d intel-virtual-output: Reset the damage just prior to reading it back
Slightly more efficient command packing and reduces a damage race
slightly...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 21:25:00 +01:00
Chris Wilson bae4162487 intel-virtual-output: We don't need to enable the timer for reconfigure
The timer will be enabled if a reconfiguration actually takes place and
we mark the damaged region to be redrawn.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 21:23:56 +01:00
Chris Wilson d9a48bd0a3 intel-virtual-output: Just walk the list of clones attached to the display
Rather searching the entire array of all clones, just walk the presorted
list from the display.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 20:52:11 +01:00
Chris Wilson b57dfc5331 intel-virtual-output: Defer reenabling damage events until after we draw
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 19:40:07 +01:00
Chris Wilson 12de799598 intel-virtual-output: Flush the damage received message back to the local display
After processing the Damage notification, we need to send a message back
to the Xserver to clear the pending damage before we will be sent more
events. To make sure that message is sent we need to flush the output,
as we may never flush the output queue otherwise.

Reported-by: Severin Strobl <fd@severin-strobl.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 19:36:13 +01:00
Chris Wilson 1ce52e9331 intel-virtual-output: Track active clones
For the frequent operations, such as moving the cursor or updating
damage, it is more efficient to walk the list of active outputs (as the
discrete GPUs support lots of outputs!)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 18:13:27 +01:00
Chris Wilson f01c5eae2a intel-virtual-output: Reserve space for the '\0' in the sprintf
Even though we don't use the trailing NUL byte for our comparisons,
sprintf will write it, so we need make space for it.

Reported-by: Severin Strobl <fd@severin-strobl.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68987
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-05 17:48:20 +01:00
Chris Wilson efc960b135 intel-virtual-output: Clear send flags when doing XSync
When falling back to using XSync rather than XSendEvent it is imperative
that we remember to clear the flag so that we don't keep on performing
the synchronous RTT every time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-03 01:00:23 +01:00