Commit Graph

11965 Commits

Author SHA1 Message Date
Michal Srb
9bc53d8cb0 dri2: SProcDRI2Connect - send the response.
The swapped implementation of DRI2Connect is always responding with empty
device and driver values. However the response was only prepared and never
sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting
for response when started remotely from machine with different endianity.

Signed-off-by: Michal Srb <msrb@suse.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-05-22 21:19:40 -07:00
Keith Packard
457fc77691 Merge remote-tracking branch 'alanc/master' 2012-05-22 10:32:29 -07:00
Dave Airlie
2e237c838f xf86: reimplement XF86SCRNINFO macro using new functions.
This macro did lookups via privates but we can just use the ScreenToScrn
conversion instead.

This patch drops all in-server uses, we should drop the macro later,
once drivers have been converted to not use it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
8da35202f3 xf86/modes: drop more pScrn->pScreen usages
Just simple conversion to use the lookup function.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
e7a9e30fd2 xaa: convert pScrn->pScreen to use accessor.
This uses a standard conversion function to do the conversion.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
738367ac9b xf86/modes: drop two uses of screenInfo
Just use new macros to access scrn->screen.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
cc4fe613d0 render/exa: use glyph picture accessors
use the glyph picture accessors in the X server, render and EXA code.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
a45e1d6cc6 render: add GetGlyphPicture accessor.
This is a new API to stop the drivers directly looking up the glyph pictures
in a global array. It provides a define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR for
drivers to work in a compat way.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie
41151f88a6 xf86: migrate to using xf86ScreenToScrn wrapper (v2)
migrate to new helper API.

This just wraps all the obvious uses of xf86Screens[pScreen->myNum],
and should be fairly simple to review.

v2: remove commented out lines.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:08 +01:00
Dave Airlie
53932b3803 xf86: add helper functions to convert to from ScrnInfoPtr/ScreenPtr (v2)
These are just simple functions that we should start migrating drivers
to using.

The end goal is to remove xf86Screens and screenInfo from the ABI.

This includes a define XF86_HAS_SCRN_CONV that drivers can ifdef to provide
their own copies. I'll probably post a generic compat.h file for drivers later.

v2: add asserts.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:58:33 +01:00
Dave Airlie
39f73e813f xf86/pci: fix slot claiming counting.
Currently if we claim a slot for a PCI driver, we never let it go properly,
this prevents the fallback probe from reusing the slot, even though it
isn't claimed for that pci slot.

So if you set the modesetting driver to point at a specific kms device,
that isn't a PCI device (i.e. USB dongle), then the modesetting driver
loads, the pci probe tries to bind the config slot to the primary PCI
device, however we then check the kms device bus id to discover it
isn't valid. However we don't remove the claim on the slot. Next the
old probe function is called and there is no slots to claim.

This patch fixes that and converts the pciSlotClaimed boolean into
a counter, and changes the unclaim api to take a device pointer
to remove from the entity.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:58:33 +01:00
Dave Airlie
07dcc3f1a9 config/udev: add pre_init stage to config and udev.
In order to use udev for gpu enumeration, we need to init udev earlier
than input initialisations. This splits the config init stuff so that udev
pre init sets up before output initialisation.

this is just a prepatory patch, doesn't change anything major.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:58:32 +01:00
Dave Airlie
a2a02882ab xfree86: add modesetting driver to fallback list on Linux
Add the modesetting driver to the fallback list on Linux, after vesa
before fbdev.

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:58:32 +01:00
Alan Coopersmith
5a3a98fcb7 Undocument Font Module loading
Code was deleted in commit affec10635

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-05-18 21:34:20 -07:00
Alan Coopersmith
afcb7ba24e Undocument mandatory loadable modules
The code to implement was deleted when BaseModules[] was emptied by
the replacement of the "pcidata" module with libpciaccess calls
in commit 46f55f5dea.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-05-18 21:34:20 -07:00
Alan Coopersmith
c3180a74a4 cvt man page should use Hz, not kHz, for vertical refresh rate
https://bugs.freedesktop.org/show_bug.cgi?id=48311

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-05-18 15:00:47 -07:00
Alan Coopersmith
96e0ab5496 Convert sbusPaletteKey to latest DevPrivate API
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-05-18 15:00:47 -07:00
Keith Packard
ba883a0f34 Merge remote-tracking branch 'jeremyhu/master' 2012-05-17 16:49:19 -07:00
Jeremy Huddleston
acdc4f54ee XQuartz: Avoid a race in initialization of darwinPointer
http://xquartz.macosforge.org/trac/ticket/579

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:32:06 -07:00
Jeremy Huddleston
c495211373 XQuartz: Declare noPseudoramiXExtension for miinitext.c
Regression-from: 6699f54fe0

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:21:23 -07:00
Jeremy Huddleston
f5fc533411 XQuartz: Provide fls implementation for Tiger
Regression-from: 30623d6ff7
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Jeremy Huddleston
e0097ce971 XQuartz: Tiger build fix
http://trac.macports.org/ticket/34364

Regression-from: 662d41acdd

Reported-by: Peter Dyballa <Peter_Dyballa@Freenet.DE>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Jeremy Huddleston
4acbaa3027 XQuartz: Workaround an SDK bug on Leopard/x86_64
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 16:00:05 -07:00
Peter Hutterer
ae1c48ebc8 Xi: fix "discards ''const' qualifier" warnings
extinit.c: In function 'XInputExtensionInit':
extinit.c:1301:29: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]
extinit.c:1303:36: warning: assignment discards 'const' qualifier from
pointer target type [enabled by default]

property.c: In function 'XIChangeDeviceProperty':
xiproperty.c:757:39: warning: cast discards '__attribute__((const))'
qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-17 08:51:31 +10:00
Peter Hutterer
e42bf98283 Xi: fix "shadows previous local" warnings
exevents.c: In function 'DeepCopyFeedbackClasses':
exevents.c:272:20: warning: declaration of 'classes' shadows a previous
local [-Wshadow]
exevents.c:245:16: warning: shadowed declaration is here [-Wshadow]
(and a few more like this)

exevents.c: In function 'DeliverTouchEmulatedEvent':
exevents.c:1442:27: warning: declaration of 'win' shadows a parameter
[-Wshadow]
exevents.c:1404:55: warning: shadowed declaration is here [-Wshadow]
exevents.c:1475:28: warning: declaration of 'listener' shadows a parameter
[-Wshadow]
exevents.c:1403:62: warning: shadowed declaration is here [-Wshadow]

xiselectev.c: In function 'ProcXISelectEvents':
xiselectev.c:178:34: warning: declaration of 'dummy' shadows a previous
local [-Wshadow]
xiselectev.c:91:18: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-17 08:51:29 +10:00
Peter Hutterer
ca6d25ad2d dix: Move DeviceFocusEvent from Xi into enterleave.c
This is only called from the enterleave implementation, so move it and its
helper functions to there. No functional changes.

Fixes build error introduced in 31174565ec if
building with '-Werror=implicit-function-declaration'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-05-17 08:50:44 +10:00
Peter Hutterer
749a593e49 dix: undo transformation for missing valuators (#49347)
last.valuators contains the transformed valuators of the device. If the
device submits events with x/y missing, we need to get that from
last.valuators and undo the transformation to that axis.

X.Org Bug 49347 <http://bugs.freedesktop.org/show_bug.cgi?id=49347>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Peter Hutterer
03318835a5 include: don't redeclare device events in xkbsrv.h
../../include/xkbsrv.h:308:51: warning: redundant redeclaration of
‘DeviceKeyPress’ [-Wredundant-decls]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Peter Hutterer
43754803c1 test: don't shadow parameter 'len'
protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a
parameter [-Wshadow]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Peter Hutterer
1bafc9f26b test: fix redundant declaration of "BadDevice"
In file included from protocol-common.c:36:0:
protocol-common.h:36:12: warning: redundant redeclaration of ‘BadDevice’
[-Wredundant-decls]
In file included from protocol-common.c:30:0:
../../Xi/exglobals.h:41:12: note: previous declaration of ‘BadDevice’ was
here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Peter Hutterer
47e1d0ea43 test: fix "userdata shadows global declaration" warnings
protocol-xiquerypointer.c:124:72: warning: declaration of
‘userdata’ shadows a global declaration [-Wshadow]

and similar

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Peter Hutterer
e6da635826 test: fix "redundant declaration of devices" warning
In file included from protocol-xiwarppointer.c:41:0:
protocol-common.h:91:23: warning: redundant redeclaration of ‘devices’
[-Wredundant-decls]
protocol-common.h:86:3: note: previous declaration of ‘devices’ was here

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-16 10:59:39 +10:00
Simon Thum
693a31e704 dix: indentation fixes for pointer acceleration
Signed-off-by: Simon Thum <simon.thum@gmx.de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-05-16 10:59:35 +10:00
Michal Suchanek
31174565ec dix: Remove redundant declarations.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:31:00 +01:00
Michal Suchanek
f1cec791d1 xfree86: Add ifdef wrapper to xvmodproc.h
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:29:20 +01:00
Michal Suchanek
d2f71b1394 Xi: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:30 +01:00
Michal Suchanek
a4f87f885a kdrive: Remove redundant declarations.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:26 +01:00
Michal Suchanek
369edd7876 dix: don't duplicate DoFocusEvents declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:21 +01:00
Michal Suchanek
36377fb0e8 dix: Remove redundant declarations.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:17 +01:00
Michal Suchanek
ea9ed83f8f xfree86: don't include xvmodproc.h when not needed
The functions are already declared in xf86xv.h

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:12 +01:00
Michal Suchanek
1927e5ab25 xserver: Remove duplicate declaration in resource.h
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:08 +01:00
Michal Suchanek
1339681e4f miext: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:04 +01:00
Michal Suchanek
6699f54fe0 mi: Remove redundant declarations.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:17:01 +01:00
Michal Suchanek
b4bf90f9fb exa: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:16:57 +01:00
Michal Suchanek
5595e7ce07 randr: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:16:54 +01:00
Michal Suchanek
c59c9dac84 xkb: Remove redundant declarations.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:16:50 +01:00
Michal Suchanek
d0a8346045 xfixes: remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:16:46 +01:00
Keith Packard
3a94b338aa Merge remote-tracking branch 'whot/for-keith' 2012-05-09 21:17:16 -07:00
James Cloos
afc153a5b4
Fix RANDR’s gamma_to_ramp().
In order to generate a 256-entry ramp in [0,65535] which covers the full
range, one must mupliply eight-bit values not by 256 but rather by 257.

Many years back – well before the RANDR extension was written, and
before xorg@fdo – a similar bug fix was made to the DIX for converting
client-supplied eight-bit color values into sixteen-bit values.

Noticed by: Elle Stone and Graeme Gill.

Signed-off-by: James Cloos <cloos@jhcloos.com>
2012-05-08 17:55:10 -04:00
Yaakov Selkowitz
e501c34d49 hw/xwin/glx: Use silent rules
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-05-04 13:13:57 -05:00