summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2019-09-19tools: Get rid of -Wno-sign-compareVille Syrjälä
Fix the sign comparison warnings by changing some types, and using a few casts. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2018-02-06meson: Add meson build systemVille Syrjälä
Allow building the driver with meson. Could probably use plenty of cleanups, but at least it gives me a working driver. And I think I managed to make it build everything that autotools builds. Quite a few compiler warnings were suppressed as well. Might want to look at those at some point. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-02-10tools/backlight_helper: #include "config.h"Mike Gilbert
The file uses defines from config.h but never actually includes it. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-11-30tools/intel-virtual-output: Check for pending events before blockingChris Wilson
If the xlib/xcb library has pulled events from the fd, then a poll on that fd will block until new events arrive. If none do, we fail to process the currently waiting events in a timely fashion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25tools/cursor: Print an ASCII representation as wellChris Wilson
Show the ASCII outline of the cursor as well as the image stored in the PNG. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-08intel-virtual-output: Virtual heads are numbered from index 1Chris Wilson
When checking for VIRTUAL support on the xserver, it helps to check for the right name. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-06intel-virtual-output: Print more helpful error when run on the wrong serverChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-04tools/intel-virtual-output: Propagate screen blankingChris Wilson
When attaching to a target display, disable the builtin screen blanking (equivalent to xset -d :8 s off, or setting Option "BlankTime" "0" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "0" in the target xorg.conf). Then listen to the ScreenSaver notify events on the host and forward the activations/resets to the targets. This should then keep all the screen blanking in sync. Reported-by: Raffael Herzog <herzog@raffael.ch> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93562 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-03tools/intel-virtual-output: Respond to expose events on target displaysChris Wilson
If the destination screen is exposed (for example screensavers), we need to redraw. So enable the ExposeEvent on the target and synthesize damage to any clones on that display in order to trigger a redraw. Reported-by: Raffael Herzog <herzog@raffael.ch> References: https://bugs.freedesktop.org/show_bug.cgi?id=93562 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-21tools/cursor: Error on malloc failureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-03intel-virtual-output: Fix cloning fixed mode outputsChris Wilson
When using a fixed mode, e.g. a Display without RandR support like Xnest, we have to remember to hook up the connection during recofiguration of VIRTUAL outputs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-16intel-virtual-output: Record the cursor shape in the DBG logChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-16intel-virtual-output: Only store cursor image on reference displayChris Wilson
We only need a single copy of the cursor image, from which we can create all the cloned cursors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-21tools/dri3info: Include compilation instructions for standalone buildingChris Wilson
Let the read know how to compile dri3info without having to compile the whole of xf86-video-intel Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-09tools/intel-virtual-output: Update DBG comment to include DRI3 transportChris Wilson
The Pixmap may either be being used for DRI3 or SHM transport. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01configure: Make tools/PROGRAMS agnostic to tools presenceChris Wilson
In order to make tools indivdiually selectable for compiling, we don't want to override earlier tools - so use '+=' rather than a plain '=' when adding each tool to the set of PROGRAMS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-01tools/dri3info: Query refresh rate on Primary monitorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-25Use AC_HEADER_MAJOR to find how to include major()Chris Wilson
We need to include <sys/mkdev.h> on Solaris. Reported-by: Richard Palo <richard@netbsd.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89763 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06tools/cursor: Inlcude stdlib for malloc declarationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-04tools: Add simple tool to retrieve the current cursor from XChris Wilson
Slightly more funky would be to poke around in the CRTC, but that should require master. As it stands this should help verify that what X is supplying to the driver matches user expectations Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-25tools/intel-virtual-output: Use xcb_dri3_idChris Wilson
xcb exports the extension structs for querying whether they exist and sharing the results. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-16tools/intel-virtual-output: Check for DRI3 more carefullyChris Wilson
Using xcb, we cannot simply call xcb_dri3_query_version() without it terminating the connection if DRI3 is not enabled on the target display. Oops. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89172 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-10tools/dri3info: Match fd against render nodesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-10tools/dri3info: Query the kernel driver nameChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-09tools: Add rudimentary dri3infoChris Wilson
A simple tool just to check if the target Xserver offers dri3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17intel-virtual-output: Do not attempt to tidy up the local display if it failsChris Wilson
Just fix the segfault dereferencing the primary display if we bail during its setup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17intel-virtual-output: Add version number to verbose outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-12intel-virtual-output: Initialise width/height for a disabled outputChris Wilson
virtual.c:1081:6: warning: variable 'width' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (clone->dst.mode.id == 0) { ^~~~~~~~~~~~~~~~~~~~~~~ virtual.c:1092:6: note: uninitialized use occurs here if (width == clone->width && height == clone->height) ^~~~~ virtual.c:1081:2: note: remove the 'if' if its condition is always false if (clone->dst.mode.id == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virtual.c:1079:11: note: initialize the variable 'width' to silence this warning int width, height; Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-27intel-virtual-output: Use snprintf() for simplicityChris Wilson
Third one-line patch to fix copying from the tainted user argument into the socket's path buffer. This time, give in and just use snprintf() as it guarrantees that it will not write more than 'n' characters and that the last is a NUL byte. Suggested-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-26intel-virtual-output: Fix invocation of strncpy()Chris Wilson
Somebody (me) confused it with snprintf() and put the string length in the wrong location. Also note that strncpy() does not NUL terminate long strings. Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-26intel-virtual-output: Sanity check length on user supplied socket pathChris Wilson
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Suggested-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-18configure: Double check xinerama's headersChris Wilson
Having the pkgconfig present doesn't always necessarily imply the headers are installed correctly - just fail over gracefully for xinerama and intel-virtual-output Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17backlight: Prevent dereference of potential NULL argvChris Wilson
Adam Sampson spotted that "It's possible (but not very sensible) to exec a program with an empty argument list, so argv[0] is not necessarily a valid pointer. For example: $ cat exec0.c int main(int argc, char *argv[]) { char *empty[1] = { NULL }; execvp(argv[1], empty); perror("execvp"); return 1; } $ ./exec0 /usr/libexec/xf86-video-intel-backlight-helper Usage: (null) <iface> " He sensibly suggested that we hardcode the program name to avoid the NULL dereference. Being the paranoid type, we should also be careful not to write to any file descriptors outside of our control (i.e. stderr), so disable the messages unless we are debugging. Reported-by: Adam Sampson Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-04backlight: Fix security issues in handling of the interface path name.Matthieu Herrb
- don't allow '/' in the interface name to avoid escaping the /sys hierarchy - check snprintf() return value for overflow. Problems reported by Adam Sampson. Thanks. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-06-30intel-virtual-output: Remove one redundant cleanup on errorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29intel-virtual-output: Cleanup singleton on failureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-29intel-virtual-output: Convert debugging messages to verbosityChris Wilson
Original patch by main.haarp: "A verbose switch is quite useful for debugging, it shouldn't require editing and recompilation to gain more useful output. I added it." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80664 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25intel: Fix weblinks (again)Chris Wilson
Julien pointed out that I fail at checking links. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25intel: Fix weblinksChris Wilson
Matti reported a few outdated links to intellinuxgraphics.org, now superseded by 01.org. Reported-by: Matti Hämäläinen <ccr@tnsp.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13intel-virtual-output: Compile fixesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13intel-virtual-output: Disable outputs on remote displays upon shutdownChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=79994 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13intel-virtual-output: Initialise image after cloneChris Wilson
As the image inherits its width/height from the clone, we need to set those first on the clone. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79994 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13intel-virtual-output: Only call XShmDetach on a valid SHM segmentChris Wilson
Saves a couple of extraneous XErrors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13intel-virtual-output: Check for an error creating the DRI3 fdChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79994 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02intel-virtual-output: Add DRI3 xfer pathChris Wilson
Just as proof-of-principle. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-22intel-virtual-output: Probe after claiming virtual outputChris Wilson
Rerun a detection cycle after claiming the virtual output so that it is hidden again. References: https://bugs.freedesktop.org/show_bug.cgi?id=78293 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-16intel-virtual-output: Mark the source SHMPixmap as writeableChris Wilson
This is fortunately a no-op, as it gets initialized to zero already (that is the pixmap is writeable). However, we may as well do the right thing... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14intel-virtual-output: Make it possible to disable building via configureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-07intel-virtual-output: Disable remote CRTC using the remote Display!Chris Wilson
Reported-by: Kirill Müller <mail@kirill-mueller.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78293 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-06intel-virtual-output: Grab the server whilst cleanging up the local outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>