Commit Graph

9352 Commits

Author SHA1 Message Date
Peter Hutterer
86303a338a dix: add helper functions to duplicate and free InputAttributes.
No special memory handling is used to give drivers the maximum flexibility
with the data. Drivers should be able to call realloc on the product string
if needed and perform similar operations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-25 10:06:11 -07:00
Jamey Sharp
bf78e11839 midispcur: Construct Picture objects lazily in case Render is disabled.
Reverts part of the effects of 518f3b189b,
"mi: don't thrash resources when displaying the software cursor across
screens". The per-screen cache is preserved, and the GCs are still
allocated eagerly, but now it doesn't construct pRootPicture until
somebody attempts to draw an ARGB cursor.

I noticed crashes in Xnest, which doesn't support the RENDER extension,
but I suspect other DDXes that support disabling that extension would
have had issues as well.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
2010-05-25 09:05:37 -07:00
Jamey Sharp
bf9b64eefb xnest: Don't ignore errors from DeviceCursorInitialize.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-25 09:05:22 -07:00
Keith Packard
b11465a6ec Merge remote branch 'vignatti/bus-cleanup-take2' 2010-05-24 22:18:31 -07:00
Jamey Sharp
7c085aebfe xfixes: Remove the invisible cursor sprite, using NullCursor instead.
Oliver McFadden reports that the invisible cursor sprite caused damage
events and thus unnecessary redrawing, so removing it improves
performance when using software cursor sprites, especially on those
devices where you do not want a visible cursor: touchscreen tablets,
embedded devices, etc.

For the xfree86 DDX, if hardware cursors are used, the driver is
required to provide a HideCursor function, which will be called instead
of trying to set a null cursor. I think software cursors are already
safe. The other DDXes also look safe.

As far as I can tell, there's no reason to realize a null cursor. I
think everything that handles null cursors doesn't rely on any setup in
RealizeCursor, and treats them as empty cursors.

Xnest assumes that if a cursor is created, it will be realized before it
is freed, which didn't happen if the invisible cursor was never used in
a server generation. So this fixes a segfault in Xnest as well.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Tested-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-24 22:15:14 -07:00
Tiago Vignatti
0abf065e38 xfree86: move all pci code from auto configurator into a meaningful location
This patch creates the private xf86PciMatchDriver hook, which goes inside pci
code to match the drivers found in the system.

Now there's no direct references to PCI inside xf86AutoConfig.c anymore.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:31:57 +03:00
Tiago Vignatti
0ceac6f64f xfree86: no need to check for the configuration case when matching devices
xf86MatchDevice will never be called in configuration time.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:31:57 +03:00
Tiago Vignatti
b0eef11018 xfree86: organize and group all pci related stuff inside xf86.h
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:31:57 +03:00
Tiago Vignatti
47df5a489e xfree86: remove BUS_ISA type given we don't support anymore
Should go together within commit df14682a.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24 19:31:57 +03:00
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
Keith Packard
2ffffb4daf Merge remote branch 'alanc/docs' 2010-05-23 23:22:08 -07:00
Peter Hutterer
b5e0f6d8f4 xfree86: fix multiple InputAttributes tag matching.
attr->tags is an array of strings (null-terminated). When matching, match
against each string instead of each [i,end] substring in the first tag.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-23 23:20:23 -07:00
Brice Goglin
d5306084b5 Remove obsolete reference to README.DRI in xorg.conf.man
Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-05-23 21:20:29 -07:00
Alan Coopersmith
89dd7d2b6f Remove ancient documentation of IBM RapidAccess keyboard hack
Keyboard setup belongs in drivers, not in a document no one sees
because we don't even install it.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-23 21:17:55 -07:00
Alan Coopersmith
480fcdf033 Remove completely out-of-date README.DRI
The license only allows distribution of verbatim copies, so we can't
update it, even to correct the incorrect address to send updates to.

The Mesa & DRI web pages are much better sources of current information
anyway.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-05-23 21:17:06 -07:00
Alan Coopersmith
1805c74d9b Add RandR 1.2 README.modes doc to EXTRA_DIST
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-05-23 21:16:16 -07: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