Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The code in drmmode_set_cursor does not properly handle the case where
drmModeSetCursor2 returns any other error than EINVAL and silently fails to set
a cursor.
So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable
the cursor2 usage on EINVAL.
References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
We don't even need to simulate button clicks; it's done automatically.
This also fixes scrolling in Qt5 apps.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
If a device does not have any valuators, it makes no sense to set the
device transformation. Return a BadMatch error to let the caller know
that they're trying something stupid.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The refactoring in commit efc1035ca958f2c9d266338a308518a0834b1773
removed the actual update of currentTime.
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
This adds tiling support to the server modesetting driver,
it retrieves the tile info from the kernel and translates
it into the server format and exposes the property.
v2.1: fix resetting tile property (Chris)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This is ported from the same code in the ati and intel drivers,
It uses the same option name as nvidia and the other DDXes to
disable tearing down outputs as it is hard to avoid racing with clients.
v2: address two issues with DeleteUnusedDP12 enabled, reported
by Daniel Martin,
a) check we have a mode_output before destroying it
b) only delete *unused* displays (thanks Aaron for clarifying)
so we check if the output has a crtc and if it does we don't
delete it.
v3: drop the option to delete unused displays, just encode
behaviour into the randr spec.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
There is no need to cache the mode resources and with dynamic
connectors for mst support we don't want to. So first clean that
up before adding dynamic connector support.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This creates an automatic monitor for a tiled monitor at startup.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This puts the tiles of the monitor in the right place at
X server startup.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Change the X server default to do right-of placement
at startup. This gives an option to allow drivers to
override this placement, which has been used for server
drivers where both heads are not in the same physical
place.
Been in Fedora for a few years, but for tiled monitors
we really want something along these lines.
This is an ABI break.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This allows us to skip the screen section, the first
Device section will get assigned to the screen,
any remaining ones will get assigned to the GPUDevice
sections for the screen.
v2: fix the skipping unsuitable screen logic (Aaron)
v3: fix segfault if not conf file (me, 5s after sending v2)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This allows gpu devices to be specified in xorg.conf Screen sections.
Section "Device"
Driver "intel"
Identifier "intel0"
Option "AccelMethod" "uxa"
EndSection
Section "Device"
Driver "modesetting"
Identifier "usb0"
EndSection
Section "Screen"
Identifier "screen"
Device "intel0"
GPUDevice "usb0"
EndSection
This should allow for easier tweaking of driver options which
currently mess up the GPU device discovery process.
v2: add error handling for more than 4 devices, (Emil)
fixup CONF_ defines to consistency
add MAX_GPUDEVICES define
(yes there is two defines, this is consistent
with everywhere else).
remove braces around slp (Mark Kettenis)
man page fixups (Aaron)
v2.1: fixup whitespace (Aaron)
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
xorg/xserver/os/utils.c: In function ‘Win32TempDir’:
xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition]
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid
type clashes caused by the unwrapped windows.h that includes.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
|
|
Link xwinclip with -lpthread to fix build for MinGW
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
|
|
Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup()
xserver/os/xdmcp.c: In function ‘get_addr_by_name’:
xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration]
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Left behind when commit 5c12399b6c3a8d moved the xorg_bus_* settings
elsewhere.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
|
|
Needed when using a compiler that defaults to 64-bit output when
configure is checking for $host_cpu.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
v2: fixup whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
v2: remove now useless parentheses
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
v2: fixup whitespace
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
|
|
v2: remove now useless parentheses
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
v2: remove now useless parentheses
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
v2: remove now useless parentheses
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
v2: Remove extra 's' from comment
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Uses reallocarray to perform integer overflow detection when allocating
an array, using NULL as the previous pointer to force a new allocation.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Wrapper for realloc() that checks for overflow when multiplying
arguments together, so we don't have to add overflow checks to
every single call. For documentation on usage, see:
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Matt Turner <mattst88@gmail.com>
|
|
The xnfcalloc() macro took two arguments but simply multiplied them
together without checking for overflow and defeating any overflow
checking that calloc() might have done. Let's not do that.
The original XNFcalloc() function is left for now to preserve driver
ABI, but is marked as deprecated so it can be removed in a future round
of ABI break/cleanup.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
It's going to multiply anyway, so if we have non-constant values, might
as well let it do the multiplication instead of adding another multiply,
and good versions of calloc will check for & avoid overflow in the process.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Functions were removed in commit cad9b053d52f62432
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Modern Solaris releases provide this functionality in the OS via the
xsvc driver. Since the move to libpciaccess, nothing in Xorg uses
this aperture driver any more.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
At the moment, the X server uses a non-default timeout for D-Bus
messages to systemd-logind. The only timeouts normally used with
D-Bus are:
1) Infinite
2) Default
Anything else is just as arbitrary as Default, and so rarely makes
sense to use instead of Default.
Put another way, there's little reason to be fault tolerant against
a local root running daemon (logind), that in some configurations, the
X server already depends on for proper functionality.
This commit changes systemd-logind to just use the default timeouts.
Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
It's possible to receive a message reply in the message filter if a
previous message call timed out locally before the reply arrived.
The message_filter function only handles signals, at the moment, and
does not properly handle message replies.
This commit changes the message_filter function to filter out all
non-signal messages, including spurious message replies.
Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The mi filled arc code estimates that a filled arc will produce no
more spans than the arc is tall. This is true for most arcs except
for pie-slice arcs strictly between 180 and 360 degrees where the missing
portion of the arc faces up or down such that we get two spans on some
scanlines.
For those, we need to reserve room for another height/2 spans. This
patch just does it for all partial pie-sliced arcs to make the test
easier to understand; it's just over-allocating a bit of memory, so
that's safe.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Non serverfd input devices will never get a systemd-logind dbus resume signal,
causing them to never get re-enabled.
This commit changes xf86VTEnter() to enable them immediately, fixing this.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
xf86platformProbeDev creates GPU screens for any platform devices that were not
matched by a GDev in the loop above, but only if there was at least one device.
This means that it's impossible to configure a device as a GPU screen if there
is only one platform device that matches that driver.
Instead, create a GPU screen (if possible) for any platform device that was not
claimed by the GDev loop.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If a PCI entity is found, xf86_check_platform_slot performs a device ID check
against the xf86_platform_device passed in. However, it just returns
immediately without checking the rest of the entities first. This leads to this
situation happening:
1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI
2. The intel driver creates entity 1 for its platform device, opening
/dev/dri/card0
3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device,
which calls doPlatformProbe, which calls xf86_check_platform_slot.
4. xf86_check_platform_slot compares the Intel platform device against the
NVIDIA PCI entity. Since they don't have the same device ID, it returns
TRUE.
5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity
for the Intel one.
Fix this by only returning FALSE if the PCI ID matches, and continuing the loop
otherwise. In the scenario above, this allows it to continue on to find the
Intel platform device that matches the second entity.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
|
|
Fix XQuartz build since commit e036cbfc "Make PseudoramiXExtensionInit()
prototype more generally available"
Add #include "nonsdk_extinit.h" to xprScreen.c
Add #include "nonsdk_extinit.h" to miinitext.c under INXQUARTZ to provide
declarations used under INXQUARTZ
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This replaces the CRTC-based Xinerama implementation with one which
uses Monitors instead, allowing clients to manipulate the Xinerama
configuration through the RandR Monitor list.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Store the user-defined monitors in the RandR screen private.
Generate a list of monitors from both the user-defined ones and from
any outputs not mentioned in one of the user-defined monitors. This list
covers both the outputs in the main screen as well as any slaves.
v1.1: airlied: fix up primary skipping bug,
fix wrong height initialiser
add get_active flag from updated protocol.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|