Fixes build errors of:
present.c: In function 'ms_do_pageflip':
present.c:410:17: error: 'drmmode_bo' has no member named 'gbm'
new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front);
^
present.c:412:22: error: 'drmmode_bo' has no member named 'gbm'
if (!new_front_bo.gbm) {
^
present.c: In function 'ms_present_check_flip':
present.c:536:36: error: 'drmmode_bo' has no member named 'gbm'
if (drmmode_crtc->rotate_bo.gbm)
^
Introduced by commit 13c7d53d
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
No real change, but if the driver is broken and doesn't provide a PreInit
function, then we don't need to worry about logind.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
InputClass sections use various MatchFoo directives to decide which device to
apply to. This usually works fine for specific snippets but has drawbacks for
snippets that apply more generally to a multitude of devices.
This patch adds a NoMatchFoo directive to negate a match, thus allowing
snippets that only apply if a given condition is not set. Specifically, this
allows for more flexible fallback driver matching, it is now possible to use a
snippet that says "assign driver foo, but only if driver bar wasn't already
assigned to it". For example:
Section "InputClass"
Identifier "libinput for tablets"
MatchIsTablet "true"
NoMatchDriver "wacom"
Driver "libinput"
EndSection
The above only assigns libinput to tablet devices if wacom isn't already
assigned to this device, making it possible to select a specific driver by
installing/uninstalling it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Since non-seat0 X servers no longer touch VTs, I believe these settings
are unnecessary.
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
(Sorry for double posting)
I repost this patch because I havn't got any replies from maintainers
since I posted the initial patch back in March.
Some instructions are not emulated correctly by x86emu when they
are prefixed by the 0x66 opcode.
I've identified problems in the emulation of these intructions: ret,
enter, leave, iret and some forms of call.
Most of the time, the problem is that these instructions should push or
pop 32-bit values to/from the stack, instead of 16bit, when they are
prefixed by the 0x66 special opcode.
The SeaBIOS project aims to produce a complete legacy BIOS
implementation as well as a VGA option ROM, entirely written in C and
using the GCC compiler.
In 16bit code produced by the GCC compiler, the 0x66 prefix is used
almost everywhere. This patch is necessary to allow the SeaBIOS VGA
option ROM to function with Xorg when using the vesa driver.
SeaBIOS currently use postprocessing on the ROM assembly output to
replace the affected instruction with alternative unaffected instructions.
This is obviously not very elegant, and this fix in x86emu would be
more appropriate.
v2: - Decrement BP instead of EBP in accordance with the Intel Manual
- Assign EIP instead of IP when poping the return address from the
stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret
- When poping EFLAGS from the stack in iret in 32-bit operand size
mode, apply some mask to preserve Read-only flags.
v3: - Rebase
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
This moves the code from the platform case into
a common function, and calls that from the
other two.
v2: Emil convinced me we don't need to lookup pEnt
here, so let's not bother.
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This isn't used anywhere, so no point storing it until we need it.
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Xorg.wrap includes code guarded with WITH_LIBDRM for detecting KMS drivers.
Unfortunately it is never activated since code missed to include file
which defines WITH_LIBDRM.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92894
Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Remove code in xf86Wakeup for dealing with device and other input and
switch to using the new NotifyFd interface.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Replace the block/wakeup handlers with a NotifyFd callback.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Globally replace #ifdef and #if defined usage of 'sun' with '__sun'
such that strict ISO compiler modes such as -ansi or -std=c99 can be used.
Signed-off-by: Richard PALO <richard@NetBSD.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
DestroyPixmap handles that just fine. This also lets us drop our use
of the manual image destruction function (Note that the radeon driver
still uses it in a similar fashion, though).
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Michael Stapelberg <stapelberg@google.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
out-of-tree driver. Within the tree, we can rely on:
xf86Crtc.h:#define XF86_CRTC_VERSION 6
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
We calloc() output_ids. Let's free() it, too.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This fixes a bug where running the card out of PPLL's when hotplugging
another monitor would result in all of the displays going blank and
failing to work properly until X was restarted or the user switched to
another VT.
[Michel Dänzer: Pass errno instead of -ret to strerror()]
[Daniel Martin: Add \n to log message]
Picked from xf86-video-ati
7186a87 Handle failures in setting a CRTC to a DRM mode properly
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
As the code says, this is "far from complete". So far, in fact, that
it's been basically untouched for twenty years (XFree86 3.1!). As far
as I can tell it was never enabled in any XFree86 build, and certainly
has never been enabled since Xorg 7.0.
Also, K&R.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
These settings affect clients, not server, so belong there, next to
the information about how to set $DISPLAY.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Fixes DRI2 client driver name mapping for newer AMD GPUs with the
modesetting driver, allowing the DRI2 extension to initialize.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This matches the GCCUSESGAS path from the old monolith build (where that
macro was actually set), and fixes the build on modern OSX.
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
At startup the server wasn't adding devices, but nothing
was blocking hotplug devices by the look of it.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91388
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
FatalError ends up calling xf86CloseConsole itself, so calling FatalError
from within xf86CloseConsole is not a good idea.
Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success
(or failure).
This makes switch_to match the other error checking done in xf86CloseConsole
which all logs warnings and continues.
Add checking of the return value in xf86OpenConsole and call
FatalError there when switch_to fails, to preserve the error-handling
behavior of xf86OpenConsole.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
hurd does not have any PATH_MAX limitation. misc.h provides a default value
which is fine here.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
When the server is privileged, we shouldn't be passing the user's
environment directly.
Clearing the environment is recommended by the libdbus maintainers, see
https://bugs.freedesktop.org/show_bug.cgi?id=52202
v2: rename envp to empty_envp (Jeremy)
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849
Signed-off-by: Julien Cristau <jcristau@debian.org>
Check for integer overflow before using stuff->count in a multiplication,
to avoid compiler optimizing out due to undefined behaviour, but only
after we've checked to make sure stuff->count is in the range of the
request we're parsing.
Reported-by: jes@posteo.de
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Atom’ [-Werror=format=]
xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘Atom’ [-Werror=format=]
Atom is unfortunately unsigned long or unsigned int depending on the
architecture, so a cast is required.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Now since the installable libxf86config is gone, rename
libxf86config_internal to libxf86config.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
The library used by the Xserver to read and parse the configuration file
could be built so that it culd be installed as a separate lib and used
by external programs.
Apparently there has not been any interest in this for quite a while as
this library has been broken for a long time now in the sense that it
was calling functions provided by the Xserver which were not implemented
for the external library.
Since this library is useless as it is anyway when built let's drop
support for it.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
The correct refresh rate for this mode is 75, not 85.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Some ioctls may not be supported by the kernel however their failure
is non-fatal to the driver. Unfortunately we only know once we try
to execute the ioctl however the sematics of the fbdev driver API
doesn't allow upper layers to disable the call.
Instead of changing the fbdevHW driver API just disable the call to
this ioctl on the module level when detecting such a case.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Egbert Eich <eich@freedesktop.org>
The only drivers I can find that used this are the r128 and radeon DRI
drivers. r128 is dead and the radeon driver wasn't including Xorg's
compiler.h and still worked.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
When xf86RandR12Key is not set we will not get to the places where
these tests are done as the functions in question are not called.
In most cases we would have crashed before these checks anyway.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
The X server frequently deals with SIGIO and SIGALRM interruptions.
If process execution is inside certain blocking system calls
when these signals arrive, e.g. with the kernel blocked on
a contended semaphore, the system calls will be interrupted.
Some system calls are automatically restartable (the kernel re-executes
them with the same parameters once the signal handler returns) but
only if the signal handler allows it.
Set SA_RESTART on the signal handlers to enable this convenient
behaviour.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
A user on a nouveau-driven card ran into a problem where DVI-D-1 and
DVI-I-1 were aliasing. The simplest fix is to provide the full connector
names. While we're at it, rename the output names to match what is in
the kernel, and start counting the connectors from 1 rather than 0. The
only deviation is HDMI vs HDMI-A, which kept its original name.
This will break backwards compatibility with existing xorg.conf's that
reference output names, but the alternative is to create a separate
counting system, further disconnecting from the kernel names.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
<termio.h> is obsolete. Using <termios.h> instead fixes building with
musl libc.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Felix Janda <felix.janda@posteo.de>
some X manuals use then escape sequence \/ when they want to render
a slash. That's bad because \/ is not a slash but an italic
correction, never producing any output, having no effect at all in
terminal output, and only changing spacing in a minor way in typeset
output.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=] ^
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=]
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>