Commit Graph

1671 Commits

Author SHA1 Message Date
Peter Hutterer
df2545b98d xfree86: Sanity check before retrieving the paired device.
Some pointer devices send key events [1], blindly getting the paired device
crashes the server. So let's check if the device is a pointer before we try to
get the paired device.

[1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through
the pointer device, not through the keyboard device.
2008-04-10 08:50:43 +09:30
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Adam Jackson
cc7c045bae Fix PCI config space cycles from int10 emulator.
The top bit of 0xCF8 is an enable bit, not part of the domain.  Sending
cycles to domain 128 instead of domain 0 is rarely the right thing to do.
2008-04-04 12:58:12 -04:00
Kristian Høgsberg
16a8ce7558 Only autoload RECORD if it was enabled. 2008-04-04 10:47:46 -04:00
Dave Airlie
f0915fb3c4 quirk: add quirk for ACER EDID 2008-04-04 09:59:40 +10:00
Kristian Høgsberg
b5a0a865c3 Pick up dri2proto from the standard proto header include path. 2008-04-02 19:21:41 -04:00
Kristian Høgsberg
7c20f65fea Add @XORG_CFLAGS@ to satisfy xf86* includes.
Pointed out by Hasso Tepper.
2008-04-02 19:08:33 -04:00
Xiang, Haihao
b31de6a590 dri2: fix crasher if DRI2Connect fails 2008-04-02 16:29:30 +10:00
Hong Liu
ebc56aca8b Bug #15160: quirk Proview AY765C
prefer first detailed timing
2008-04-02 10:46:03 +08:00
Goneri Le Bouder
9500033b9e xfree86: don't crash in AutoConfig if the primary device is not pci
Only call matchDriverFromFiles() if we found a pci device.
Debian bug#472823 (http://bugs.debian.org/472823).
2008-04-01 20:23:38 +02:00
Kristian Høgsberg
c40e0b51f0 Implement DRI2 direct rendering and update AIGLX to DRI interface changes.
Get rid of glcontextmodes.[ch] from build, rename __GlcontextModes to
__GLXcontext.  Drop all #includes of glcontextmodes.h and glcore.h.
Drop the DRI context modes extension.

Add protocol code to DRI2 module and load DRI2 extension by default.
2008-03-31 16:50:58 -04:00
Adam Jackson
933ffcdf7d Compile fix. 2008-03-28 17:53:55 -04:00
Adam Jackson
9e8451d869 Add E-EDID segment selection. 2008-03-28 17:43:10 -04:00
Adam Jackson
0b4aef4d6d Refactor DDC2 code to allow for proper segmented addressing. 2008-03-28 17:43:01 -04:00
Adam Jackson
88ece11d6c Start E-EDID support in the DDC module.
Since there's no way to safely know how many blocks xf86DoEDID_DDC2 would
return, add a new xf86DoEEDID entrypoint to do that, and implement the
one in terms of the other.
2008-03-28 17:39:23 -04:00
Eamon Walsh
b5f98fcea2 XSELinux: Add xorg.conf option for permissive/enforcing/disabled.
Patch by Joe Nall.

The option goes in the "extmod" subsection.
TODO: Make it easier for extension modules to handle their own options.
2008-03-28 14:14:23 -04:00
Dave Airlie
c747030a49 quirk: fix LPL monitors properly.
no point having a h cm fix when we really want to copy the sizes from the
other place.

RH BZ 435216
2008-03-27 15:19:52 +10:00
Adam Jackson
862ff9ac92 Bug #11510: Fix build without RECORD. 2008-03-24 13:37:42 -04:00
Adam Jackson
87bfd3bd96 Bug #11508: Fix build without XV. 2008-03-24 13:33:38 -04:00
Julien Cristau
4217ba0cf0 xaa: use xf86ReturnOptValBool instead of xf86IsOptionSet
The latter doesn't return the option's value, just whether it's present
in the configuration.
2008-03-22 17:53:45 +01:00
Julien Cristau
6b9d2bb1f7 exa: use xf86ReturnOptValBool instead of xf86IsOptionSet
The latter doesn't give you the option's value, it just tells you if
it's present in the configuration.  So using Option "EXANoComposite" "false"
disabled composite acceleration.
2008-03-22 17:28:48 +01:00
Michel Dänzer
da973e962d Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB
This patch (and not setting HARDWARE_CURSOR_BIT_ORDER_MSBFIRST on big endian
platforms) fixes it for me with the radeon driver and doesn't break intel.

Correct patch this time :)
2008-03-20 09:18:29 -04:00
Alex Deucher
f8c1eb29e2 Revert "Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB"
This reverts commit 2673525796.

Pushed the wrong patch.
2008-03-20 09:14:41 -04:00
Michel Dänzer
2673525796 Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB
See bug 11796
2008-03-19 19:12:37 -04:00
Jesse Barnes
afd7428690 Cleanup logic in xf86PrepareOutputs
Should have done this in the first place.  Since we're checking for the absence
of the get_crtc callback in the first place, we'll short circuit the later call
and disable the output, so the ugly "continue" block is unnecesary.
2008-03-17 14:55:44 -07:00
Jesse Barnes
ba85caacb5 Make xf86SetDesiredModes aware of current output configuration
By adding a new output callback, ->get_crtc, xf86SetDesiredModes is able to
avoid turning off outputs & CRTCs if the current output<->CRTC mappings are the
same as the desired configuration.  This helps avoid flickering displays at
startup time, which speeds things up a little and looks better.
2008-03-17 14:13:09 -07:00
Jesse Barnes
bee2ddf35f Fail CRTC configuration if !vtSema
Unless we check for vtSema before calling into the CRTC and output callbacks,
we may end up trying to access video memory that no longer exists, leading to a
crash.  So if we don't have vtSema, return FALSE to the caller, indicating that
we didn't do anything.

Fixes #14444.
2008-03-17 08:33:01 -07:00
Matthieu Herrb
db248ffb84 test for the presence of pci_system_init_dev_mem() before calling it.
This avoids creating a dependency on -current libpciaccess for
BSD systems other than OpenBSD (which don't otherwise need it).
2008-03-16 18:46:11 +01:00
Adam Jackson
57d48d94b8 Fix a stray use of ALLOCATE_LOCAL. 2008-03-14 14:46:03 -04:00
Adam Jackson
8248537722 RANDR 1.2: Fix initial mode aspect ratio match in a corner case.
Actually more like in the mainline case, where the ideal mode happens to
be the very first aspect match on the first monitor.  But let's not
split hairs.
2008-03-14 14:24:21 -04:00
Bart Trojanowski
1b9878ffcf Bug #14332: Fix PCI access cycles from x86emu.
The address written to 0xcf8 contains the PCI slot address to send the
config cycle to.  However, we would ignore that and always send the
cycle to the device whose BIOS we were running.  This breaks some
integrated graphics platforms that have explicit knowledge about the
system's host bridge, for example.
2008-03-13 17:42:16 -04:00
Doug Chapman
f7abe05b33 Bug #14091: Fix build (and runtime) on ia64. 2008-03-13 17:40:34 -04:00
Adam Jackson
5d7437c29e RANDR 1.2: Fix the RANDR 1.1 screen size estimation to approach reality.
While the ScreenRec's notion of size in millimeters would get updates,
the RANDR 1.1 notion wouldn't, so your screen would appear to be square
and probably at some ludicrous DPI.
2008-03-13 17:37:12 -04:00
Adam Jackson
61c3f63a75 RANDR 1.2: Don't report a square resolution to RANDR 1.1 clients.
It can't possibly do anything useful, and older versions of Gnome (and
proably others) get very confused by it.  So do the drivers, for that
matter.
2008-03-13 17:34:54 -04:00
Mark Kettenis
06c0372c3a OpenBSD support for libpciaccess.
xserver and libpciaccess both need to open /dev/xf86, which can only
be opened once.  I implemented pci_system_init_dev_mem() like Ian
suggested.  This requires some minor changes to the BSD-specific
os-support code.  Since pci_system_init_dev_mem() is a no-op on
FreeBSD this should be no problem.
2008-03-12 21:45:37 +01:00
Matthias Hopf
2036851125 Return randr interface version in xf86CrtcScreenInit()
Necessary to allow drivers to be run-time backwards compatible when using the
modes/ functions w/o providing their own copy.
2008-03-12 11:37:28 +01:00
Kristian Høgsberg
bc504ffbba DRI2: Add DRI2AuthConnection().
DRI2 uses the same authentication scheme as XF86DRI, so implement this
entry point so DRI2 protocol code can access it.
2008-03-11 00:56:16 -04:00
Adam Jackson
ab9b0b36ac Add the "amd" driver to magic driver selection. 2008-03-10 13:40:00 -04:00
Adam Jackson
0f6aaf636b Bug #14927: Fix the math for xf86NumDefaultModes. 2008-03-10 09:14:20 -04:00
Kristian Høgsberg
acedc03367 DRI2: Return event buffer head index in DRI2CreateDrawable.
And pass it to the DRI driver in AIGLX.
2008-03-09 21:39:19 -04:00
Adam Jackson
3bf7ff7032 Size xf86DefaultModes explicitly.
i.e., don't check for the end of the list by ->name == NULL, since that
won't work now.  Fix the consumers of xf86DefaultModes to use the new
explicit size as well.
2008-03-07 09:25:06 -05:00
Adam Jackson
3fcb6445dc Fix segfault when a monitor exists but has no modes.
Thanks to Zhenyu Wang for finding this.
2008-03-07 08:30:19 -05:00
Aaron Plattner
a8d760f567 Get modes code building with old X servers again.
This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2"
since XORG_VERSION current went backwards at some point.
2008-03-06 14:42:00 -08:00
Jesse Barnes
ca616b902b Allow RandR get output property to call into drivers
In order to report accurate values to users of the RandR property interface,
it's sometimes necessary to ask the driver to update the value (for example
when backlight brightness changes without the server's knowledge, due to hotkey
events or direct sysfs banging).

This patch wires up the core server code with a new xf86CrtcFuncs callback,
get_property, to allow for this.

The new code is available under the RANDR_13_INTERFACE define, which in turn
depends on the RANDR_12_INTERFACE code.
2008-03-06 13:50:58 -08:00
Adam Jackson
34b69e3bc0 Fix distcheck.
(cherry picked from commit 2a47accff8)
2008-03-05 23:57:15 -05:00
Adam Jackson
27e7dacbf7 Make xf86InitialConfiguration slightly smarter.
Old heuristic was to find the first monitor that expressed a preference,
then attempt to get all other monitors to agree.  This doesn't work
particularly well when the two sets of modes don't precisely intersect,
you get overlapping-but-not-identical output geometry and things go wrong.

New heuristic is:
- Exact user preference, if given
- Exact output preference, if the same for all outputs
- Best (largest) mode of modes common to all outputs:
  - with the same aspect ratio as all outputs (may be NULL)
  - with 4:3 aspect ratio
- Then the old heuristic to try to get something lit

Note that it is simply not doable to have a reliable initial output guess if
you insist on trying to clone all outputs together.  It's far too easy to
end up with displays that simply don't have modes in common.  We need to
switch to right-of placement someday, once we're not limited to CRTC size
limits and we have working multi-GPU in RANDR.
2008-03-04 11:38:34 -05:00
Adam Jackson
95df04b744 Remove all mention of the vga driver from the config logic. 2008-03-04 10:59:24 -05:00
Peter Hutterer
4f2cd0ed96 Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.

Conflicts:

	Xi/opendev.c
	dix/devices.c
	dix/dixfonts.c
	dix/getevents.c
	dix/resource.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	mi/mipointer.c
	xkb/ddxBeep.c
	xkb/ddxCtrls.c
	xkb/ddxKeyClick.c
	xkb/ddxList.c
	xkb/ddxLoad.c
	xkb/xkb.c
	xkb/xkbAccessX.c
	xkb/xkbEvents.c
	xkb/xkbInit.c
	xkb/xkbPrKeyEv.c
	xkb/xkbUtils.c
2008-03-04 18:11:10 +10:30
James Cloos
613852ce6a Fix some documentation typos 2008-03-03 16:11:05 -05:00
Adam Jackson
708f07753f RANDR 1.2: Inherit PreferredMode from the global configuration, if any.
If you don't do this, then Modes "800x600" in the Display subsection will
be dutifully ignored and the driver will start at whatever resolution it
feels like.
2008-03-03 15:49:48 -05:00