Commit Graph

9337 Commits

Author SHA1 Message Date
Tiago Vignatti
9d000a5509 xfree86: remove all kind of bus and PCI dependency from the common helper file
Move all PCI procedures from xf86Helper.c to a more meaningful place (namely
xf86pciBus.c). xf86Helper.c is free of PCI code now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:31:50 +03:00
Tiago Vignatti
610009cf39 xfree86: bus: remove useless field from EntityRec
RAC is the champion of remaining trash for sure!

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-24 19:17:04 +03:00
Tiago Vignatti
95889a569f xfree86: bus: delete useless xf86FindPrimaryDevice
This function had a wrong name and was just logging the primary device. No one
cares about it honestly.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:16:02 +03:00
Tiago Vignatti
f686590948 xfree86: bus: remove unused headers
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:10:51 +03:00
Tiago Vignatti
111b1fff1c xfree86: bus: remove unused pci macros
Should be gone in commits 3c03d9f1 and a9d7d659a respectively.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:10:07 +03:00
Dave Airlie
5939e39a64 xf86: allow for no outputs connected at startup operation.
When nothing is connected at startup and we canGrow, allow the server to start with a 1024x768 framebuffer, and when the drivers send hotplug events this will expand to the correct size dynamically.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-23 17:30:09 -07:00
Jamey Sharp
b9f48d60bc Device init: Don't crash when CreateGC fails.
ActivateDevice was ignoring errors from DeviceCursorInitialize, so
cursor-related calls failed later. Jeremy Huddleston saw that crash in
miPointerConstrainCursor, while with Xvfb I saw it in
miSpriteRealizeCursor.

miDCDeviceCleanup frees any non-NULL GCs. miDCDeviceInitialize calls
Cleanup on any failure, but if it failed early then some of the pointers
in the miDCBufferPtr were garbage. Switch from malloc to calloc to
ensure everything's initialized safely first.

With these two fixes, if CreateGC fails then the server gracefully fails
in FatalError instead of segfaulting.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-23 17:28:44 -07:00
Alan Coopersmith
c51534961e xorg-server.pc Requires: xproto >= 7.0.17
Since the headers we export in the SDK use the _X_NORETURN #define
introduced in xproto 7.0.17, drivers built with the SDK will also
need to have at least that version of xproto installed.

I considered exporting the version from configure.ac, but decided not
to since the minimum required to build the X server may not always
be the same as the minimum required to build drivers (for instance,
if the X server used a new #define in its .c files or internal headers,
but didn't export it in any of the SDK headers).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-22 20:12:41 -07:00
Jamey Sharp
e90f20eed3 Declare functions that unconditionally call FatalError as _X_NORETURN.
For AtomError, this should fix a clang warning; in the other cases it's
just good documentation.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-22 01:00:04 -07:00
Adam Jackson
9d31d5b639 vfb: Remove dead variable and header file
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-21 12:49:46 -07:00
Jamey Sharp
d8cbcbc01d doPolyText: forget about FontChange's XID after looking up pFont.
As of e2929db7b7, doPolyText uses pFont
consistently rather than looking it up again from the saved XID.

clang noticed that "oldfid = fid" could run when fid hadn't been
initialized yet.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-21 12:48:16 -07:00
Aaron Zang
989db930d7 Solaris: Use VT_SET_CONSUSER ioctl to set Console User rights profile
When Xorg is started on display :0, this ioctl is called to grant the
user the rights traditionally associated with /dev/console (before VT
support was added), such as access to local peripheral devices.

Also adds a Solaris-specific -C flag to force starting on /dev/console
instead of /dev/vt*, allowing programs like xterm -C to access the
console device.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-21 09:45:42 -07:00
Alan Coopersmith
98553e52a1 vbe.h: Use __attribute__((packed)) on Sun cc 5.9 & later as well as gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-21 09:45:06 -07:00
Alan Coopersmith
7b09335a46 Xserver(1) man page updates
- Note that -br is now default.
- Move -bs after -br for alphabetical ordering.
- Remove -config option that's been hidden in "ignore" section,
  since ajax removed the -config code a couple years back.
- Add -nocursor option.
- Add xinput & xrandr to list of runtime server control programs
- Replace XDarwin with Xquartz in list of Xservers

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-21 09:44:26 -07:00
Peter Hutterer
cf4f3d0518 dix: remove obsolete comment.from EnableDevice.
The code this comment was referring to was removed in
8b5086250a "Eliminate bogus event resizing."

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 22:44:36 -07:00
Jamey Sharp
5754e66044 Replace screen->rgf scratch GC flags with a bit in each GC.
This eliminates a poorly-named, poorly-documented field from the
ScreenRec, using a previously-unused flag bit in each GC instead.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 14:36:29 -07:00
Keith Packard
5a7275d78a Find windows GL wrapper files in $(srcdir) instead of .
This fixes 'make distcheck' for me.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-05-20 14:35:14 -07:00
Keith Packard
1197a87b56 winpriv.h was moved from hw/xwin to hw/xwin/glx in November
hw/xwin/Makefile.am was referencing this instead of hw/xwin/glx/Makefile.am

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-05-20 14:34:53 -07:00
Alan Coopersmith
1cad520f3f XFree86 Design doc: Convert LinuxDoc ``quotes'' to DocBook <quote> tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-20 11:31:40 -07:00
Alan Coopersmith
8367913be3 XFree86 Design doc: Explain this version covers the current Xorg release
Update the title & preface to explain that while this was originally
the XFree86 4.0 design, we've changed a lot since forking.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-20 11:31:24 -07:00
Alan Coopersmith
78fe4be4c4 Show Xserver release/version date in DIX & DDX docs
Uses a fake absolute path to the entity definition files so that
the xmlto --searchpath will work for finding the actual path

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-20 11:31:13 -07:00
Alan Coopersmith
2bdc73bcf4 Move Xserver-spec.xml from xorg-docs to doc/xml
Allows keeping it in sync with the sources it documents, and to be
released with them

Requires the previous patch to convert the Xserver tree from
LinuxDoc to DocBook for SGML/XML documents.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-20 11:30:44 -07:00
Alan Coopersmith
fc6ebe1e1d Convert LinuxDoc documents to DocBook/XML
Only the markup/formatting is changed - the contents should still
be wildly out of date for now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-20 11:29:52 -07:00
Simon Farnsworth
ebd745ced8 Add documentation for the new DefaultModes option
This patch adds documentation for the DefaultModes monitor option
added in the previous patch.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 09:16:12 -07:00
Simon Farnsworth
cfc6291488 Add configuration option to disable default modes on an output
Setting 'Option "DefaultModes" "No"' in an output will guarantee that
X will omit the default modes, just picking up modes from the
configuration file and modes provided by the output.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 09:15:41 -07:00
Michel Dänzer
a1c2bdb6ab EXA: Wrap Glyphs even without Composite acceleration.
In order to avoid migration ping-pong when accumulating glyphs in a mask
picture.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 07:48:51 -07:00
Tiago Vignatti
00581d4a42 configure: force new xproto version dependency
commit bca85e2e12 introduced it.

Use the version that includes _X_NORETURN

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-19 22:54:23 -07:00
Keith Packard
103507af0c Merge remote branch 'vignatti/bus-cleanup' 2010-05-19 22:27:53 -07:00
Keith Packard
8bd8d81dc4 Merge remote branch 'vignatti/animcursor-state-fix' 2010-05-19 22:27:20 -07:00
Peter Hutterer
c620a1c0a4 xfree86: fix typo in optionTypeToSting.
Because we don't want anyone to get hurt.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-19 22:22:54 -07:00
Keith Packard
8b6c1809c0 Merge remote branch 'jamey/for-keith' 2010-05-19 12:58:02 -07:00
Jamey Sharp
c38552d115 Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:48 -07:00
Jamey Sharp
e291c56182 Return an appropriately-typed error from dixLookupResourceByType.
Rather than always returning BadValue, associate an error status like
BadWindow with a resource type like RT_WINDOW, and return the
appropriate one for the requested type.

This patch only touches the core protocol resource types. Others still
return BadValue and need to be mapped appropriately.

dixLookupResourceByType can now return BadImplementation, if the caller
asked for a resource type that has not been allocated in the server.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:48 -07:00
Jamey Sharp
90e612dcbe Use WriteEventsToClient rather than TryClientEvents where possible.
If filter is NoEventMask (aka CantBeFiltered), grab is null, and the
first event is not in the set of "critical events", then TryClientEvents
simply calls WriteEventsToClient. In that case, it returns 0 for fake or
dead clients, and 1 otherwise. Inline for this special case.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
8033fb6c97 Set event sequence number in WriteEventsToClient instead of at callers.
TryClientEvents already did this; this commit just moves the assignment
one level down so that no event source has to worry about sequence
numbers.

...No event source, that is, except XKB, which inexplicably calls
WriteToClient directly for several events.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
4b9600a416 Make WriteEventsToClient/WriteToClient no-op on fake or dead clients.
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.

For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.

hw/xquartz/xpr/appledri.c has an interesting case: While its check for
"client == NULL" appears redundant with the test in WriteEventsToClient,
it dereferences client to get the sequence number.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
ee9cd2df4a xv: TryClientEvents already checks client and sets sequenceNumber.
So don't bother doing those steps again.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
e1e7deefb5 mi/misprite.c: Delete unused private lookups.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-19 10:00:51 -07:00
Jamey Sharp
936b09f2a3 Replace miSpriteCursorFuncRec with direct calls to midispcur.c.
Nobody wraps the mi software-cursor sprite rendering implementations.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-19 10:00:49 -07:00
Tiago Vignatti
66d5ecc5fd render: set anim cursor state for pointer enabled devices only
The structure containing the state of animated cursor was amended within
SpriteInfoRec, removing all previously privates logic to keep such state.

API change: It was removed MAXDEVICES dependency \o/

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-19 18:37:01 +03:00
Tiago Vignatti
99fcf655bd xfree86: remove PCI dependency from InitOutput
All functions that touch PCI and BUS were moved to their own files, organizing
the mess inside the InitOutput. Now, inside InitOutput, mostly accesses to
buses are coordinated by the new xf86BusConfig.

Two PCI probe functions just changed the name and a procedure to receive the
isolate devices parameters was created also, named xf86PciIsolateDevice.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:41 +03:00
Tiago Vignatti
0dd299864a xfree86: remove xf86EnableAccess
It's RAC remnant. This was substituted by xf86VGAarbiter{Lock, Unlock}
mechanism.

It's an API break, but the few drivers using it were covered already with
macros to avoid problems.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:35 +03:00
Tiago Vignatti
f28515b5f7 xfree86: bus: remove SetSIGIOForState and simplify the code
Also removed some dumb debug messages.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:29 +03:00
Tiago Vignatti
211ca67e4d xfree86: bus: fb drivers might want to use vga arbitration either
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:24 +03:00
Tiago Vignatti
2464eb7d56 xfree86: bus: simplify entity related hooks
Remove some out dated commentaries either.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:15 +03:00
Tiago Vignatti
971768e688 xfree86: bus: enable declaration of sparc function as its code usage
The code in xf86sbusBus.c seems too OS-specific to be usable on OpenBSD.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:10 +03:00
Tiago Vignatti
a70ec0d136 xfree86: bus: rework xf86PostProbe logic and remove useless log info
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:34:03 +03:00
Tiago Vignatti
2f7d630a1e xfree86: bus: reuse already assigned variable when fb driver claimed
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:33:57 +03:00
Tiago Vignatti
964f29bb80 xfree86: bus: fix Enter/Leave accesses behaviour
Okay, seems we're not using extensively such hooks in fact. But fix the
expected behaviour at least.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:33:44 +03:00
Tiago Vignatti
b37462b4da xfree86: remove unused xf86AccessInit()
The function was only initializing the boolean xf86ResAccessEnter, which
couldn't get any other value in the life of the server.

The only possible, though suspicious, code was in xf86AccessLeave(), which
could be triggered if AbortDDX is called before xf86AccessInit(). Even so,
such change is safety because no driver would have configured any entity leave
procedure at this point.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 18:33:37 +03:00