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>
The motivation for getting this is chrome remote desktop that runs under
Xvfb and wants to use RANDR to adjust screen size according to the
remote desktop client screen size. Apparently there are other use cases
as well, the bug mentions gnome-settings-daemon testing.
[ajax: massaged commit message]
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26391
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Lambros Lambrou <lambroslambrou@google.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Siim Põder <siim@p6drad-teel.net>
Also change the dot font setting back to the default of Helvetica as
doxygen no longer ships FreeSans.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.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 handler with a NotifyFd callback instead.
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>
Eliminates polling every 20ms for device input.
v2: rename ephyrPoll to ephyrXcbNotify and fix the API so it can be
used directly for SetNotifyFd. Thanks to Daniel Martin
<consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Cc: Daniel Martin <consume.noise@gmail.com>
This switches the kdrive code to use FD notification for input
devices, rather than the block and wakeup handlers.
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>
When unplugging an output, it's still listed in xrandr and the size
of the root window still includes the removed output.
The RR output should be destroyed when its Wayland counterpart is
destroyed and the screen dimensions must be updated in both the done
and the destroy handlers.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92914
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
In Wayland, a client (in this case XWayland) should set the cursor
surface when it receives pointer focus. Not doing this will leave the
curser at whatever it was previously.
When running on XWayland, the X server will not be the entity that
controls what actual pointer cursor is displayed, and it wont be notified
about the pointer cursor changes done by the Wayland compositor. This
causes X11 clients running via XWayland to end up with incorrect pointer
cursors because the X server believes that, if the cursor was previously
set to the cursor C, if we receive Wayland pointer focus over window W
which also has the pointer cursor C, we do not need to update it. This
will cause us to end up with the wrong cursor if cursor C was not the
same one that was already set by the Wayland compositor.
This patch works around this by, when receiving pointer focus, getting
the private mipointer struct changing the "current sprite" pointer to
an invalid cursor in order to trigger the update path next time a cursor
is displayed by dix.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Otherwise the server may try to draw onto the root window when closing
down, but when running rootless the root window has no storage thus
causing a memory corruption.
Thanks to Adam Jackson <ajax@redhat.com> for helping tracking this down!
Reviewed-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93045
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Tested-by: Marek Chalupa <mchqwerty@gmail.com>
check return values of RR.*Create calls
v2. do not bail out if we don't have any output
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
don't leak memory when realizing window fails
v2. take care of all memory allocation and return values,
not just one leak
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.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>
The number of FDs has been decremented already, therefore the
number contained the index of the top one that is to me moved down.
This problem was introduced by:
commit 1110b71e36
Author: Chris Clayton <chris2553@googlemail.com>
kdrive: fix build error on gcc 4.8 for out-of-bounds array access
The reason for the warning was likely a confused compiler.
Hoping to reduce the confusion by moving the decrement behind the end
if the copy loop.
Signed-off-by: Egbert Eich <eich@suse.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This was added in:
commit 4301479508
Author: Olivier Fourdan <ofourdan@redhat.com>
Date: Mon Jan 5 16:44:22 2015 +0100
Synchronize capslock in Xnest and Xephyr
Which is fine if you're building both, but if you don't happen to have
xcb-util-keysyms' headers installed Xnest will configure as enabled but
fail to build.
Fortunately <X11/X.h> has a corresponding #define, so use that instead.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
wl_keyboard::enter is the equivalent of FocusIn + KeymapNotify: it
notifies us that the surface/window has now received the focus, and
provides us a set of keys which are currently down.
We should use these keys to update the current state, but not to send
any events to clients.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If a pixmap isn't getting exported as a dmabuf, then we don't need to
make an EGLImage/GBM bo for it. This should reduce normal pixmap
allocation overhead, and also lets the driver choose non-scanout
formats which may be much higher performance.
On Raspberry Pi, where scanout isn't usable as a texture source, this
improves x11perf -copypixwin100 from about 4300/sec to 5780/sec under
xcompmgr -a, because we no longer need to upload our x11perf window to
a tiled temporary in order to render it to the screen.
v2: Just use pixmap->usage_hint instead of a new field. Drop the
changes that started storing gbm_bos in the pixmap priv due to
lifetime issues.
v3: Fix a missing gbm_bo_destroy() on the pixmap-from-fd success path.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
One less layering violation (EGL should call glamor, if anything, not
the other way around).
v2: Move glamor.c's DestroyPixmap wrapping up above the
glamor_egl_screen_init() call, since glamor.c's DestroyPixmap
needs to be the bottom of the stack (it calls fb directly and
doesn't wrap). Caught by Michel.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.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>