Fix this bug report:
,----< from http://bugzilla.freedesktop.org/show_bug.cgi?id=20504 >
| Using the Visual StaticGray (8 bit depth) is missing one gray level.
| The gray level of index zero and index one are the same and all
| other levels are shifted by one. The max level (255) cannot be used.
`----
Signed-off-by: James Cloos <cloos@jhcloos.com>
We'll now only mention the E-EDID segment register if the device is
actually E-EDID-capable. While we're here, check for DDC/CI and
standard EEPROM support too.
There is a separate panning region check, but that doesn't work under
transformation, so just pre-clip the mouse coordinates when computing the
panning offsets. This leaves the case where panning constants are changing
unresolved.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 .
As this can't work without new EXA_PREPARE_AUX* indices, this requires a major
version bump, so we can also drop the UploadToScratch driver hook and
ExaOffscreenSwap*(). So this also fixes
http://bugs.freedesktop.org/show_bug.cgi?id=20213 .
Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers
which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to
make them build again in the #error message.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
GLX_EXT_texture_from_pixmap was broken since commit
a26c77ff43 ('glx: fix retval checks when failures
occur for drawable creation.')
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
DeleteInputDeviceRequest function doesn't handle "virtual" devices well.
TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such
kind of devices.
Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice &
RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c
so everything works fine (now I see that DeleteInputDeviceRequest in
Xi/stubs.c should call RemoveDevice function, shouldn't it? :) )
Situation is quite different when you use libvnc.so module. It uses same
schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus
device is created correctly. When server is terminated it calls
DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each
device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from
Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices
don't have real input driver.
X.Org Bug 20087 <http://bugs.freedesktop.org/show_bug.cgi?id=20087>
[This isn't really a fix (libVNC should behave correctly) but not crashing the
server sounds like an improvement.]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
With the API change, we can now purge the XI conversion from POE.
Note: this commit breaks DGA even more.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Note that this breaks DGA. Life is tough.
EnqueueEvent is a somewhat half-baked solution, we immediately drop back into
XI and store them. But it should in theory work.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Don't let the dcce be random data.
Extensions section was added in X11R6.8.0 and documented in the release notes:
http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3
but never made it into the man page.
Also fix a bonus typo.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Was only used to provide a list of input devices that XF86-Misc could use,
now that XF86-Misc is gone, was parsed and logged, then completely ignored.
(Depends on previous patch that introduces OBSOLETE_TOKEN in parser to
make obsolete keywords like InputDevices & RgbPath be non-fatal errors.)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Xorg shouldn't refuse to run just because the user has an xorg.conf that
had the previously-used RgbPath keyword in it.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
When the crtc transformation changes, the entire crtc must be repainted.
This was being done by clearing the shadow and then painting the rectangle
containing the screen image; the clear being required as the screen image
may not fill the crtc. When changing the transform rapidly, this leads to
flashing. Eliminate the clear by painting the entire crtc instead of just
the screen rectangle.
Signed-off-by: Keith Packard <keithp@keithp.com>
a9d7d659.. (PCI: Remove pciBusAddrToHostAddr and associated nonsense)
removes pciBusAddrToHostAddr(), but not its prototype, resulting in:
./.libs/libxorg.a(sdksyms.o):(.data.rel+0xe64): undefined reference to
`pciBusAddrToHostAddr'
Signed-off-by: Chris Ball <cjb@laptop.org>
This was all a glorified no-op. We rely on pciaccess to create device
maps anyway, so we should have no reason to care about what the host
address is.
Acked-by: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
All you get for standard timing descriptors is horizontal size in
multiples of 8 pixels (which means you can't say 1366) and height in
terms of aspect ratio (which means you can't say 768). You'd like to
just fuzzy-match this by walking the DMT list for sufficiently close
modes, but you can't because DMT is useless and only defines a 1360x768
mode, because it's _also_ specified in terms of character cells despite
providing pixel exact timings. Neither can you use CVT or GTF to
generate the timings, because they _also_ believe that modes have to be
a multiple of 8 pixels.
You'd also hope you could find a timing definition for this in CEA, but
you can't because CEA only defines transmission formats that actually
exist. So there's 480p, 720p, and 1080p, but no 768p. And why would
there be, after all, the encoded signal is never 768p so obviously no
one would ever make a display in that format.
So instead, make a CVT mode since that's likely to be handled well by
just about everything, smash the horizontal active down by 2, and shift
the sync pulse by 1. Underscanning the hard way.
Pass the suicide.
Otherwise drivers have to refuse interlace twice: once in the output
config, and once in ->valid_mode() to catch output and config modes.
If you can't do interlaced modes, asking nicely for it in the config
isn't going to suddenly make it work.
By making the "Unable to open config file" header a warning, it was
not appearing with the filename when a config file was specified and
not found. Now we make it an error message again, but only issue
the error if a filename was specified - if none was specified, then
we don't even issue a warning, just the "Using autoconfig" info message.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
With trying to match depths so that you didn't end up with a depth 24
fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth
24 X visual, which angered other applications. But in fixing that, the
pickFBconfigs code for "minimal" also could end up breaking GLX visuals if
the same FBconfig was chosen for more than one X visual.
We have no reason to not expose as many visuals as possible, but the old
"all" mode didn't match any existing X visuals to GLX visuals, so normal
GL apps didn't work at all.
Instead, replace it with a simple combination of the two modes: Create GLX
visuals by picking unique FBconfigs with as many features as possible for
each X visual in order. Then, for all remaining FBconfigs that are
appropriate for display, add a corresponding X and GLX visual.
This gets all applications (even ones that aren't smart enough to do FBconfigs)
get all the options to get the visual configuration they want. The only
potential downside is that the composite ARGB visual is unique and gets a
nearly full-featured GLX visual (except that the root visual might have taken
the tastiest FBconfig), which means that a dumb compositing manager could
waste resources. Write compositing managers using FBconfigs instead, please.
This patch gets the shadow scanout buffer repainted on panning area changes.
It does not, however, track the mouse correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
When the shadow scanout buffer can be re-used, the underlying framebuffer
area must be damaged so that the scanout will be repainted. This patch
delays the addition of that damaged area until after the transform in the
crtc has been updated, otherwise the old transform would have been used and
the wrong area repainted.
Signed-off-by: Keith Packard <keithp@keithp.com>
generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used
Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86IsOptionSet is rarely the right function to use for boolean options because
it returns TRUE whenever the option is present, even if its value is "no",
"off", "0", etc.
This avoids 32-bit access which might affect other registers. The linux code
uses gcc flags to get this to happen, but this seems like more of a sure thing.
Drivers not using the new hw/xfree86/modes code would crash in DRI due to
that code trying to monitor CRTC changes.
Signed-off-by: Keith Packard <keithp@keithp.com>
We report the EDID values in RandR, and we let people configure whatever
they like for the screen in xorg.conf. Reporting the EDID values in the core
means applications get inconsistent font sizes in the default configuration.
Signed-off-by: Keith Packard <keithp@keithp.com>
In the X log, upon module load, it prints a line similar to the following.
> (II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so
The attached patch removes the extra / before the module name.
Code already exists in hw/xfree86/loader/loadmod.c:InitPathList to add a
trailing slash if needed, removing the one added by sprintf is harmless.
Signed-off-by: James Cloos <cloos@jhcloos.com>
Otherwise, for example, when hacking config/*.c, it is required to
run make clean on that directory, to ensure the proper libconfig.a
will be linked in the generated Xorg binary.
Instead of always keeping two copies of the keymap, only generate the
core keymap from the XKB keymap when we really need to, and use the XKB
keymap as the canonical keymap.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We already have state fully stored within XKB, so instead of duplicating it,
just generate the values to send to clients when required.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
XkbInitKeyboardDeviceStruct is now the only valid keyboard
initialisation: all the details are hidden behind here. This now makes
it impossible to supply a core keymap at startup.
If dev->key is valid, dev->key->xkbInfo->desc is also valid.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
If we can't enable a device, bail out of NewInputDeviceRequest rather than
blithely continuing. Also, be more verbose when initialization failed. Also,
be more verbose when initialization failed. Also, be more verbose when
initialization failed. Also, be more verbose when initialization failed.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There were a few spots left in the source that were using the
--with-mesa-source defined headers or the now removed $(top_srcdir)/GL
directory. These aren't needed anymore as all the necessary source for
GLX is in $(top_srcdir)/glx.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Using GL for the PKG_CHECK_MODULES identifier multiple times means only
the first call will actually be used. Later calls will be skipped due to
GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a
different identifier and DMX to just reusing GL_CFLAGS.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
The previous check for AEI on left us with the possibility that AEI is forced
off in the config, but devices are added through evdev nonetheless. A keyboard
added this way can CTRL+C the server. Even when we use kbd, we can set the
mode to RAW, so it's safer alround to to so.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Previously it is possible that creating rotation data, then cleaning
up and creating again so that pScreen->BlockHandler and
xf86_config->BlockHandler all point to xf86RotateBlockHandler.
See bug #19343.
There are several other direct calls to free, check
% egrep '\<free\(' `find . -name \*.c`
but they are free'ing memory from explicit malloc calls.
This one was not intended, and corrected, so that it would
both, follow the conventions everywhere (and work on some
libc that doesn't like free(0)), and make it easier to use
malloc wrappers.
The builtin-fonts configure option was removed, as it at best should
have been a runtime option. Instead, now it always register all "font
path element" backends, and adds built-ins fonts at the end of the
default font path.
This should be a more reasonable solution, to "correct" the most
common Xorg FAQ (could not open default font 'fixed'), and also don't
break by default applications that use only the standard/historical
X Font rendering.
cvt doesn't correctly parse 'cvt -vr 1920 1080'. This patch doesn't fix
that, but it does at least generate an error message now.
Signed-off-by: Keith Packard <keithp@keithp.com>
All symbols in installed sdk headers should be explicitly tagged
as exported symbols. Otherwise, to ensure it is not a mistake, one
could write it as something like:
extern /* NOEXPORT */ type name ...;
but the proper procedure really should be to use a non sdk header
(or a "noinst_" one).
This patch also removes prototypes to some functions that existed
only temporarily.
Add a ClipNotify helper that lets the driver know about changes in the
clipping of an Xv backing drawable.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Devices are only activated once - right after they've been added to the
server. If a device failes activation, it's dead. There's no reason to
continue. Return the error code from ActivateDevice() without setting up
sprite information or even sending a event to the client.
Then - in the DDX - just remove the device again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Since it is already parsing cpp output, create a dependency file
in the same process. This will cause sdksyms.c to be regenerated
whenever a sdk header is modified.
This also uses the gmake 'sinclude' directive (don't fail if
included file doesn't exist). This should not cause any problems
given that gmake only constructs are used in several other Makefiles.
- Example: mode 1280x1024, panned area 1281x1024
panned_area.x2 = 1281
mode.width = 1280
If you substract 1280 from 1281, then that leaves you with one.
Which is the one pixel that you need to move to actually see the last pixel collumn.
Substracting 1 from this will consistently prevent you from seeing the right and bottom edge.
- Pass $(CPP) & $(AWK) settings from configure to sdksyms.sh
- Only reset sdk variable (tracks if header is part of sdk) if
a filename is included on the cpp # <line-no> <filename> line,
since Sun compilers omit filename when it is unchanged from
previous line.
Restoring it unconditionally means we restore to whatever tty_mode has as
default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw
mode if allowEmptyInput is off.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Ubuntu uses mawk by default, but it doesn't understand posix character
classes (which are locale dependent, and this patch uses only valid C
identifiers).
Also make sure awk runs with LC_ALL=C to match the regex patterns.
- Add active field to crtc.
- Set gamma (only) whenever a crtc becomes active.
- Check for xf86_config being NULL.
- Increase crtc abi to 3.
- A few other fixes.
- The Gamma values from the monitor section are now used during initial config.
- The old colormap system is disabled when gamma set hook is available.
- Gamma values are now persistent for the lifetime of the xserver.
- This requires no driver changes and should be driver ABI compatible.
When a driver uses a crtc during device detection, the scrn has not yet been
configured and virtualX/virtualY are still zero. This caused the X server
to try and allocate a shadow frame buffer, which couldn't work.
Detect this by checking for zero virtualX/virtualY values.
Signed-off-by: Keith Packard <keithp@keithp.com>
pScreen->width/height are not initialized when doing initial mode setting,
which makes this function incorrectly fail. Using scrn->virtualX should work
in all cases though.
Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset
for output probing, long before the screen array is initialized; that was
caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen
could find the right values.
Signed-off-by: Keith Packard <keithp@keithp.com>
The shadow frame buffer and other data used for rotation need to be freed
when the crtc is disabled, not just when rotation is disabled.
Signed-off-by: Keith Packard <keithp@keithp.com>
A grep on xorg/* revealed there's no consumer of this define.
Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.
Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
If the basename of header file processed by cpp matches $top_srcdir,
check for extern symbols in the output, and add to the xorg_symbols
vector.
Possibly a better solution then using this script would be to somehow
tell the linker to not drop any symbols from the binary being generated.
Thanks to David Miller for noticing a make problem with sdksyms.c
not being regenerated when sdksyms.sh is updated. This is not yet the
best solution; automake generates dependency for sdksyms.o, but the
build really should also regenerate sdksyms.c when sdksyms.o needs to
be regenerated.
Export the symbols in miext/cw/cw.h. These symbols are in libxaa, and
at least the nvidia driver uses them. Maybe cw.h should be installed
in the sdk.
The awk script was incorrectly referencing the struct name, and
not the struct variable.
Also added some comments to sdksyms.sh, for the reason it generates
the "symbol table" and add a message to the generated file, telling
is was automatically generated.
Traditional posix awk doesn't know about \W and whilst we check that
awk exists in configure.ac we don't check which awk we are using.
This corrects symbol generation for posix only awk.
The kbd driver may send events during device initialisation, and these events
need the EQ set up already.
X.Org Bug 18890 <http://bugs.freedesktop.org/show_bug.cgi?id=18890>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
As suggested by Julien Cristau
This is an follow-up to
commit 9c5dd7337f
Author: Peter Hutterer <peter.hutterer@redhat.com>
Date: Wed Dec 3 14:24:25 2008 +1000
Let the DDX decide on the XkbRulesDefaults.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Acked-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
drv and idev are only set for SDs, but are only dereferenced for SDs too, so
initializing them to NULL is safe.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
These are private symbols, but used by the X Server.
The newly exported symbols were not added to the sdk headers.
Optionally, libxf86config could be compiled without hidden symbols
when being installed.
Thanks to Maarten Maathuis for noticing the problem.
It is declared as
<hash>ifdef HAVE_ACPI
Bool xf86acpiDisableFlag = FALSE;
<hash>endif
in hw/xfree86/common/xf86Globals.c
but not protected by the ifdef in the sdk header xf86Priv.h, what
caused a build failure in the tinderbox, due to the address of the
symbol being taken (to ensure it is available) in sdksyms.c.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.
The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.
This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
If not taking the symbol addresses, linkage will break badly, as not
all symbols will be present, and it also requires changing library order,
and/or making some changes like the "libosandcommon".
This table should be modified to be generated automatically, as
it is required to "fool" the compiler/loader into adding all required
symbols to the X Server.
Those tables were once used to decide what symbols are visible to
modules, but they were outdated. The only real usage was that, since
it was taking the address of symbols, linkage should fail if the
symbols were not available.
Now the proper way to make symbols available to modules should
be to use the _X_EXPORT macro, or not compile with hidden symbols,
so that all symbols would be available.
All symbols in the tables were revised to ensure they are exported,
and only symbols that were not exported are ClientSleepUntil() and
DuplicateModule(), that were not in the sdk for quite some time
already, and should not have any users outside of the X Server
(and/or builtin modules).
The attribute should be set on header files to make it easier to
manage what symbols are available to modules.
_X_EXPORT should be used in sources only for special cases, like
symbols that must be visible by non video/input driver/modules but
should not be "advertised" in the sdk.