Commit Graph

2774 Commits

Author SHA1 Message Date
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
Dodji Seketeli
cdadd2ff9b [Xephyr/DRI] correctly route motion events targeted at GL drawable 2008-03-18 14:02:41 +01: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
Donnie Berkholz
aa231f28d5 Xephyr: Build fix: Port across XF86dri.c changes from Mesa. 2008-03-14 18:43:41 -07:00
Donnie Berkholz
a955c3b587 Xephyr: Distribute ephyrdriext.h in tarballs. 2008-03-14 18:43:40 -07: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
Julien Cristau
911f0c1476 Programs in hw/dmx/examples/ want client-side xkb headers. 2008-03-07 23:26:56 +01: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
Adam Jackson
605e6764df Fix Motif menu drawing in Xnest.
See also Red Hat bug #229350, OpenSolaris bug #6366490.
2008-03-03 15:45:17 -05:00
Adam Jackson
3b73d62791 xf86DDCMonitorSet: Honor the DisplaySize from the config file.
We honor sync ranges and pixel clock settings from the config here, no
reason to ignore DisplaySize.
2008-03-03 15:43:22 -05:00
David Nusinow
f7ab2d3821 Add missing file from previous commit. 2008-03-02 18:36:25 -05:00
David Nusinow
b5ce0e1d0b Bug #13860: Ensure that the DRI mode is in octal format. 2008-03-02 17:12:02 -05:00
Matthieu Herrb
c934366424 use UTILS_SYS_LIBS to pass SYS_LIBS to utils/ioports correctly 2008-03-02 19:32:01 +01:00
David Nusinow
2bb9c1f36f bug #10008: Make Xvfb.1 document the correct default depth 2008-03-01 18:45:46 -05:00
George Sapountzis
3d64290547 clean some "unused" warnings 2008-03-01 19:49:24 +02:00
Maarten Maathuis
8af2c39bcc Fix big mistake in commit fd41f46ac6.
- When a mode is deleted, the name pointer is also free()'ed.
- This leaves other modes with an invalid pointer.
2008-03-01 16:54:01 +01:00
Eamon Walsh
ef60632e20 dix: Modify callers of property and selection API to use new interfaces. 2008-02-29 18:01:37 -05:00
Eamon Walsh
34bf308a9e dix: Refactoring of selection code to allow for polyinstantiation.
Introduces dixLookupSelection() API.
Removes NumCurrentSelections from API.
2008-02-29 18:01:37 -05:00
Eamon Walsh
d5715f7bea dix: Refactoring of property code to allow for polyinstantiation.
Introduces dixLookupProperty() API.
2008-02-29 18:01:37 -05:00
Adam Jackson
b7eb92774a EDID 1.4: Print additional CVT support data in the log. 2008-02-29 16:01:15 -05:00
Adam Jackson
31014d88af EDID 1.4: Decode additional CVT support information.
Table 3.28: Display Range Limits & CVT Support Definition
2008-02-29 16:01:15 -05:00
Adam Jackson
d1c48955f8 Fix CVT abuse in DDCModesFromStandardTiming.
CVT is enough different from GTF that it should not be used on monitors
that aren't expecting it.  This brings us closer to what the spec says
the correct behaviour is.
2008-02-29 16:01:15 -05:00
Adam Jackson
26c2e95fa5 Nuke a duplicate SYMFUNC(xf86CVTMode) 2008-02-29 16:01:15 -05:00
Adam Jackson
ca5625b911 Add xf86GTFMode().
This should probably be shared like xf86CVTMode().
2008-02-29 16:01:15 -05:00
Adam Jackson
4cb4817c10 Remove the duplicate copy of xf86cvt.c 2008-02-29 16:01:15 -05:00
Adam Jackson
e65e51a99b Constify the built-in mode tables. 2008-02-29 16:01:14 -05:00
Adam Jackson
6828d8fc2b Clean up DisplayModeRec handling in many places.
Use xf86DuplicateMode() instead of rolling our own, and change
malloc+memset to calloc.
2008-02-29 16:01:14 -05:00
Adam Jackson
85617b56e5 Remove some #if 0 guarding code duplicated in xf86Modes.c 2008-02-29 16:01:14 -05:00
Adam Jackson
fd41f46ac6 Allow xf86DuplicateMode() to work correctly on read-only modes.
Before this it was meaningless to try to mark DisplayModeRec tables
const, since the mode name would be emitted as a pointer to an
anonymous string constant, and therefore would have to be fixed up by
ld.so and so couldn't live in .rodata.  With this change the standard
mode lists can live in .rodata, and modes duplicated from them will
have their names filled in on the fly.
2008-02-29 16:01:14 -05:00
Adam Jackson
8ac19d16a0 Add several comments documenting our EDID failures. 2008-02-29 16:01:14 -05:00
Kristian Høgsberg
13bfa5937d GLX: Adjust to changes in DRI driver interface. 2008-02-29 15:11:13 -05:00
Eamon Walsh
27bcf40cda XACE: Fix instances of DixUnknownAccess at hook callsites. 2008-02-28 16:43:43 -05:00
Tiago Vignatti
aebd9dc252 Oops, there's one more parenthesis. 2008-02-28 01:22:31 -03:00
Dave Airlie
08afc70513 quirks: another LPL panel with the cm/mm wrong 2008-02-28 10:45:41 +10:00
Dodji Seketeli
d74b0327e8 [Xephyr/GL] unbreak the build
Don't touch Xephyr DRI stuff when not compiling in a DRI environment.
2008-02-27 09:48:53 +01:00
Dave Airlie
d12b7b6632 xf86Crtc: add higher level modesetting entry point.
For kernel modesetting work we need a bigger stick to beat the modesetting path
2008-02-27 07:09:14 +10:00
Tiago Vignatti
c46f7b62d2 Fine, we don't need pciInit() anymore. Nuke, nuke, nuke... 2008-02-25 18:14:08 -03:00
Tiago Vignatti
a9050d5424 Jesus, pciInit() was called 32 times in my machine without need!
xf86scanpci() will always call pciInit() before any other function, so
there's no need to guarantee it after.
2008-02-25 18:10:18 -03:00
Tiago Vignatti
81272f7ec9 Some doc clean up:
clean up legacy things in os-support/bus/Pci.c.

    Put InitOutput() comment to its right place.
2008-02-25 17:39:33 -03:00
Tiago Vignatti
7c582dd6de remove lnxPciInit() unused function. 2008-02-25 17:31:37 -03:00
Tiago Vignatti
9727db88d5 No more "-scanpci" given that we already have it in libpciaccess.
(Yeah, lets nuke dead code!)
2008-02-25 17:08:07 -03:00
Tiago Vignatti
f19f7b8e53 Clean some garbage caused when pciaccess was merged:
FindPCIVideoInfo() function isn't need anymore.

    xf86scanpci() is being called only once so we don't need permanent
    (static) variables there.

    restorePciState() is not used for now (until we find why multiple
    cards aren't working).
2008-02-25 17:07:07 -03:00
Adam Jackson
4b50e71bf1 Bug #13736: Fix %bx in VBEGetPixelClock to match spec.
Reported by Yannick Henault.
2008-02-24 20:25:13 -05:00
Jeremy Huddleston
6dc369028d XQuartz: Quit now properly warns the user
(cherry picked from commit ed3d7b3959)
2008-02-23 00:28:41 -08:00
Adam Jackson
e6a4cde16d Use the client-side XKB headers for the config utilities 2008-02-22 18:36:29 -05:00
Adam Jackson
347db49ebe s/via/openchrome/ in the autoconfig logic.
Xorg's via driver is effectively dead anyway.
2008-02-22 16:05:33 -05:00
Adam Jackson
69f7826767 Match Xephyr DRI definitions to the ones in xf86dri.h 2008-02-22 16:04:35 -05:00
Adam Jackson
24bebdded4 fbFillRegionTiled() is now dead code.
Only ever called from the old PaintWindow* screen hooks, but those are
gone now.  As a pleasant side effect, fb loses its #ifdef PANORAMIX.
2008-02-22 15:22:38 -05:00
Adam Jackson
ee21aba6be Fix Xinerama's consolidated visual handling.
Formerly the code claimed it could only handle up to 256 visuals, which
was true.  Also true, but not explicitly stated, was that it could only
handle visuals with VID < 256.  If you have enough screens, and subsystems
that add lots of visuals, you can easily run off the end.  (Made worse
because we allocate visual IDs from the same pool as XIDs.)  If your app
then chooses a visual > 256, then the Xinerama code would throw BadMatch
on CreateColormap and your app wouldn't start.

With this change, PanoramiXVisualTable is gone.  Other subsystems that
were using it as a translation table between each screen's visuals now
use a PanoramiXTranslateVisual() helper.
2008-02-22 15:19:54 -05:00
Dodji Seketeli
c14fd2a5cb [Xephyr/GL] properly route expose event on GL drawables
When an expose event happens on an host GL window paired with an
internal drawable, route that expose event to the clients listening
to the expose event on the internal drawable.
2008-02-21 15:33:02 +01:00
Dodji Seketeli
437c78ef9f [Xephyr/GL] don't crash when the host returns a NULL server string 2008-02-21 15:29:27 +01:00
Peter Hutterer
67a78e84a8 Revert "xfree86: plug a memory leak in xf86LoadModules."
This reverts commit 3abce3ea2b and
6cbaf15e61.

The memory returned to xf86LoadModule was allocated in doLoadModule, which
calls the respective module's PreInit. As it turns out, input and output
drivers store a pointer to the module elswhere, so freeing it in
xf86LoadModule is a bad idea.

For further reference: hw/xfree86/common/xf86Helper.c
    Input drivers: xf86InputDriverList[blah]->module = module;
    Output drivers: xf86DriverList[blah]->module = module;

Unloading the module would not look pretty then.
2008-02-19 21:31:50 +10:30
Jeremy Huddleston
5f5ec5db35 XQuartz: unsetenv("DISPLAY") before startx if X11.app can't connect to it.
Also fix casting to silence warning.
(cherry picked from commit a5cbf78471)
2008-02-19 00:01:42 -08:00
Peter Hutterer
74628d6397 dix: change GetEventList to return length of list and set parameter in place.
Changing DDXs to use new prototype too.
2008-02-19 16:53:15 +10:30
Peter Hutterer
6cbaf15e61 xfree86: guard against NULL-pointer dereferences in xf86LoadModules.
Should have been part of 3abce3ea2b, but I
forgot to git-update-index before I committed.

Thanks to Bill Crawford for pointing it out.
2008-02-19 12:05:13 +10:30
Peter Hutterer
3fe64d8d27 Move input event list initialisation and storage from DDX to DIX.
Rather than letting the DDX allocate the events, allocate them once in the DIX
and just pass it around when needed.

DDX should call GetEventList() to obtain this list and then pass it into
Get{Pointer|Keyboard}Events.
2008-02-18 18:46:01 +10:30
Arjan van de Ven
3abce3ea2b xfree86: plug a memory leak in xf86LoadModules.
LoadModule() returns the only reference to a fresh piece of memory (a
ModuleDescPtr). Sadly, xf86LoadModules dropped the return value on the floor
leaking memory for each module it loaded.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-18 18:14:40 +10:30
Arjan van de Ven
6dc71f6b2c xfree86: plug memory leak in InitPathList.
All the failure paths were very diligent in freeing the "fullpath" temporary
string, but the success case was not. All the content only got strdup()d, so
it's not live memory anymore.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-18 18:14:33 +10:30
Arjan van de Ven
1bec6ad897 xfree86: plug memory leak in xf86LogInit()
xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then
effectively strdup it, but lf is never freed again.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-18 18:14:20 +10:30
Daniel Stone
68bd7ac193 XKB: Move headers into the server tree
We need to start breaking the XKB API to enforce sanity, so drag whichever
headers we need to do so into the server tree, as the client API is set in
stone, being part of Xlib.
2008-02-17 22:52:07 +02:00
Maarten Maathuis
a48cc88ea2 Fix rotation for multi-monitor situation.
- The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
- Fix bug #13787.
2008-02-17 18:47:28 +01:00
Jeremy Huddleston
b95059c207 Added Xquartz.plist to EXTRA_DIST
(cherry picked from commit 70f9495e0c)
2008-02-16 02:57:23 -08:00
Jeremy Huddleston
d103820bb8 Fixed unescaped newline in EXTRA_DIST
(cherry picked from commit 567c172c4d)
2008-02-16 01:01:33 -08:00
Jeremy Huddleston
a7d936c4ac XQuartz: Fixed EXTRA_DIST to include localization
(cherry picked from commit 1b338c2a93)
2008-02-16 01:01:29 -08:00
Kristian Høgsberg
0ffb6a3ad0 GLX: Implement support for TTM BO based TFP when available. 2008-02-14 22:20:56 -05:00
Kristian Høgsberg
879515b139 Add GLX provider for DRI2. 2008-02-14 19:53:49 -05:00
Kristian Høgsberg
b71dc54352 Add DRI2 module. 2008-02-14 19:53:49 -05:00
Adam Jackson
3e0353c785 Bah, macros are hard. 2008-02-15 06:42:48 +11:00
Maarten Maathuis
c38feeb149 Fix typo in commit b8b7cdf6df. 2008-02-14 18:52:47 +01:00
Adam Jackson
b8b7cdf6df Silence useless debug spew from XFree86-Misc extension. 2008-02-15 01:31:46 +11:00
Adam Jackson
ba69904148 Simplify dlloader a bit more. 2008-02-14 08:52:43 +11:00
Adam Jackson
f750ce53ac Remove some braindamage from ModuleDesc.
Yay dead code elimination.
2008-02-14 08:22:57 +11:00
Adam Jackson
e91ff09568 Friends don't let friends call xf86AddModuleInfo.
That code only existed to leak memory.  It can go now, thanks.
2008-02-14 08:21:44 +11:00
Adam Jackson
0bdd20a045 Eradicate the VTInit code.
"This option should rarely be used."  Never sounds like a better idea.
2008-02-14 07:52:46 +11:00
Adam Jackson
24089b0624 Don't bother warning people about the keyboard driver rename, just do it. 2008-02-14 07:52:33 +11:00