Bug introduced by 9dca441670
xfree86: add a hook to replace the new console handler.
console_handler was not being set, making the server eat up CPU spinning
in WaitForSomething selecting consoleFd over and over again, every time
trying to unregister drain_console without success due to
console_handler being NULL.
Let's just fix the unregistration in xf86SetConsoleHandler() and use that.
But wait, there could be a catch: If some driver replaced the handler using
xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister
that one. I don't understand Xorg well enough to know whether this poses a
problem (could mess up driver deinit somehow or something like that). As it is,
xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which
handler is currently registered).
I had been using it for two days on my machine that previously hit 100% CPU
several times a day. That has now gone away without any new problems appearing.
Signed-off-by: Tomas Trnka <tomastrnka@gmx.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
It was such an eyesore once rendered in html.
Now it looks like other authors.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
Such version information is already written in the appropriate location
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
Driver may change screen pixmaps after page flipping that would then
make damage lose track of the root pixmap.
Using root window for shadow damages fixes the problem because
SetWindowPixmap is implemented in shadow code.
Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
When the driver can handle the crtc transform in hardware, it sets
crtc->driverIsPerformingTransform, which turns off both the shadow
layer and the cursor's position-transforming code. However, some
drivers actually do require the cursor position to still be
transformed in these cases. Move the cursor position transform into a
helper function that can be called by such drivers.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
If a driver can use hardware to handle the crtc transform, then
there's no need for the server's shadow layer to do it. Add a crtc
flag that lets the driver indicate that it is handling the transform.
If it's set, consider the transformed size of the screen but don't
actually enable the shadow layer. Also stop adjusting the cursor
image and position.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Use $(SHELL) to run it. Someone may want to build out of a source tree
in a filesystem with the noexec mount flag set.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This does not really handle hotplug (it's handled inside the kernel,
by the 'mux' devices), but uses the wscons console driver
configuration to figure out the keyboard layout and the list of
pointing devices found by the kernel.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
OpenBSD and NetBSD does not support syscons
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Since OsInit closes stdin before the xfree86 DDX opens the
console, fstat on stdin will always fail, so it's safe to delete
code that attempts it.
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Return errors instead of silently ignoring them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This widens almost all of the float-using code in ptrveloc.[ch] to
doubles, other than values coming from properties which are specified to
be floats by the property API.
Bumps input API to v14 as this changes the AccelScheme signature, as
used by xf86-input-synaptics.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
The xorg.conf manual uses the following convention in most of its
sections:
bold = text to be copied literally to the config file,
italic = a symbolic name to be substituted by a true value.
Some configuration keywords seem to have been changed into generic
options. Prepending Option to the manual entry swapped the
bold-italic logic. This patch restores the convention in the monitor
section and consists of
-.BI "Option " "\*qPreferredMode\*q " \*qstring\*q
+.BI "Option \*qPreferredMode\*q \*q" name \*q
modifications.
Plus a few minor changes (Modes → Mode) and a typo fix.
Signed-off-by: Servaas Vandenberghe
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Recent changes to the server change the default absolute input device
behaviour on zaphods to span the whole desktop too. Since these setups
usually use an xorg.conf, allow the transformation matrix to be specified in
the config as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
In all cases, the pointer was simply type-cast anyway. Let's get some
compile-time type safety going, how about that.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Squashed in:
xfree86: Move definition of xf86OptionPtr into separate header file
The pile of spaghettis that is the xfree86 include dependencies make it
rather hard to have a single typedef somewhere that's not interfering with
everything else or drags in a whole bunch of other includes.
Move the xf86OptionRec and GenericListRec declarations into a separate
header.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Swapping the wrong size was never caught because swap{l,s} are macros.
It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.
v2: dmx.c fixes from Keith.
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
DDX can now implement validation for swap_limit changes to prevent
configurations that are not support in driver.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
CC: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This allows ddx to set swap_limit if there is more than one back
buffer for drawable. Setting swap_limit has to also check if change
affects a client that is blocked.
This can be used to implement N-buffering in driver with minimal
logic in allocation and selecting next back.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
ReuseBufferNotify hook is called whenever old buffer is reused in DRI2
code.
Driver can use this hook to rewrite the buffer name if hardware requires
shared buffers. Shared buffer might be some hardware limited resources like
framebuffer that is preallocated in boot.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Dear,
A patch I posted on xorg-devel was reviewed and is ready for
inclusion in xserver. Would you be willing to apply the patch so that
it finds its way into the master branch ?
Thank you, Servaas Vandenberghe.
http://lists.x.org/archives/xorg-devel/2011-August/024769.htmlhttp://lists.x.org/archives/xorg-devel/2011-August/024777.html
This patch adds printing of the DisplayMode type bits to
xf86PrintModeline(). It helps to trace the modeline origin and to
understand the initial configured modeline.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Servaas Vandenberghe
Signed-off-by: Keith Packard <keithp@keithp.com>
The video driver ABI was bumped to 11.0 in commit
0de7cec907 because of a change to the
size of ATOM in commit 51f353d0a0. This
also affects extension modules, so the extension ABI version should
have been bumped too.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Fortunately, the massive decrease in the cost of whitespace in the past
decade has allowed us to be much more generous with it, and much more
consistent in its application, even for code like this that clearly no
one has ever tried to read.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Use new per-screen privates API instead.
Commit by Jamey Sharp and Josh Triplett.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Stop duplicating in each os-support variant before it gets replicated
even further.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Throughout the xserver git history, the generic portion of the int10
module has always used other methods for reading the video BIOS. For
some time now it's been purely libpciaccess based. This commented-out
use of xf86ReadBIOS is entirely superfluous.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Gaetan Nadon wrote:
Alan Coopersmith wrote:
"I think we recently dropped PC98 support from the X server, so I'd
be okay with dropping the documentation now".
Let's make them be right, shall we?
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Patch produced with:
unifdef -UNO_INLINE -B
This change isn't relevant to the similar code in
hw/xfree86/common/compiler.h, because x86emu is expected to someday move
out of xserver entirely and so should not depend on any xserver headers.
Also, some platforms apparently do have NO_INLINE versions of
compiler.h.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>