Commit graph

3697 commits

Author SHA1 Message Date
Peter Hutterer
7f2f71da51 ephyr: if -parent is given, check for a trailing -screen. (#24144)
If -parent is given, don't open up a new window if -screen is given as well.
The commandline option -screen allows to set the depth of the embedded
Xephry instance, even though width and height are autoscaled on -parent.

This patch checks for a -screen parameter after -parent and - if one is
found - delays initializing the screen. The parent window id is stored
temporarily but re-set after a -screen argument.
The following command is thus valid:

Xephyr -parent 1234 -screen 640x480@8 -screen 1024x768

It embeds the first 8-bit screen into window 1234 and opens up a new window
for the second screen. Multiple parent arguments are possible, the screens
are embedded in-order.

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

Tested-by: Vic Lee
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 19be992d9d)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-11 21:21:42 -07:00
Keith Packard
fc31f76b6f Re-fix DGA removal.
Removing DGA ended up breaking any drivers calling into the old
xf86DiDGAInit function as it tried to see if DGA was already enabled
and ended up crashing if the VT wasn't completely initialized. Oops.

Also, if the driver initializes DGA itself, have the DiDGA
initialization overwrite that information as the DiDGA code will call
ReInit on mode detect.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit db98b26ee1)
2009-09-30 22:21:05 -07:00
Keith Packard
507e57381f xfree86/modes: Remove all framebuffer support from DGA
This removes all rendering and mapping code from xf86DiDGA, leaving
just mode setting and raw input device access. The mapping code didn't
have the offset within /dev/mem for the frame buffer and the pixmap
support assumed that the framebuffer was never reallocated.
(cherry picked from 0b7c6c728c)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-22 12:17:09 -07:00
Rémi Cardona
c3d182a479 dix: append "built-ins" to the font path in SetDefaultFontPath
49b93df8a3 made the hard dependency on
a "fixed" font go away but only Xorg could use the built-ins fonts by
default.

With this commit, all DDXs get "built-ins" appended to their FontPath, not
just Xorg.

Tested with Xorg, Xvfb and Xnest.
(cherry picked from commit f56cbe1ef2)

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-22 12:14:56 -07:00
Daniel Stone
9bc4a69040 fbdevhw: Test for graphics:fb%d as well as graphics/fb%d
Apparently the kernel can't decide on an API to expose to userspace, so
let's just try both in the hope that one will work.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Michel Dänzer <michel@daenzer.net>
(cherry picked from commit f4350c66b4)
2009-09-22 12:10:41 -07:00
Michel Dänzer
f5d1da499c dri2: Don't crash if pPriv is NULL.
(cherry picked from commit df597709d7)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-22 12:04:27 -07:00
Keith Packard
76a1839b0a Ensure that rotation updates happen frequently
The smart scheduler is designed to minimize scheduler overhead by
increasing the interval between WaitForSomething calls when a single
client is running. However, the software rotation code depends on
its BlockHandler being invoked for screen updates; the long delays
caused by the smart scheduler optimizations means that screen updates
can be delayed a long time as well.

The change is simple -- prevent the smart scheduler from increasing
the scheduling interval while any screen is using software rotation.
(cherry picked from commit e7dd1efef4)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25 20:12:17 -07:00
Keith Packard
31dc4fe0be Perform rotation redisplay before calling driver block handler (which may flush rendering)
The rotation block handler uses regular driver rendering functions to
repaint the screen, if those functions queue commands in the driver,
it's important that the driver block handler be invoked after the
rotated image is drawn.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1740cda7a3)
2009-08-25 20:12:17 -07:00
Keith Packard
cebc0a7aa7 xf86_reload_cursors: fix cursor position to eliminate jumping after mode set
xf86_reload_cursors restores the cursor to the correct position, but
that must adjust for cursor hot spot and frame before calling down to
the hardware function, otherwise the cursor jumps to the wrong
position until it is repositioned by the user.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4aab05e3b3)
2009-08-25 20:12:17 -07:00
Ben Skeggs
d0875154f4 quirk: use first detailed timing as preferred for PEA prod 9003 (rh#492359)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 048697ccfa)
2009-07-29 15:49:52 -07:00
Dave Airlie
87900645c2 xfree86: move didLock assignment down to where the function pointer is valid.
crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so
it's actually defined before we use it.

Introduced with 6f59a81600.

Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0de58c88ab)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-26 13:56:57 -07:00
Benjamin Defnet
7f95d18397 hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major
This moves code out of each implementation of set_mode_major and back into
the X server. The real feature here is that the transform is now available
in the crtc for use by either xf86CrtcRotate or whatever the driver wants to
do. Without this change, the transform was lost for drivers providing the
set_mode_major interface.

Note that users of this API will want to stop smashing the transformPresent
field, and could also stop setting mode/x/y/rotation for new enough X servers,
but there's no reason to make that change as it will break things when
running against older X servers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 6f59a81600)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-26 13:56:57 -07:00
Matthias Hopf
abc89e2c48 randr: Nuke broken set_origin shortcut
Shortcut is impossible to implement this way, because we don't know for sure
whether the crtc of an output has changed or not.
(cherry picked from commit cadf65a6e1)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-26 13:56:57 -07:00
Alan Coopersmith
396d3a7762 Fix build of drivers with 1.6.2 when not using --install-libxf86config
c859b736d1 removed duplicate entries for
these from the Makefile, but removed a different set than was done in
master branch, causing xf86Parser.h to not be installed, which in turn
breaks the build of drivers like -ati, -intel & -nv that use xf86Modes.h,
which includes xf86Parser.h

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-08 13:36:23 -07:00
Keith Packard
499f9f62e4 dri2: Preserve compatibility with 1.6 DRI2 API/ABI
The old DRI2 buffer allocation API wasn't great, but there's no reason to
make the server stop working with those drivers. This patch has the
X server adapting to the API provided by the driver, using the new API where
available and falling back to the old API as necessary. A warning will be
placed in the log file when the old API is in use.
(cherry picked from commit 2e2c5b216c)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06 13:28:09 -07:00
Arkadiusz Miskiewicz
c859b736d1 xfree86: remove duplicate header entries in Makefile.am
fixes https://bugs.freedesktop.org/show_bug.cgi?id=22547

This bug was fixed in a big clean-up commit in master, which cannot be
backported (see commit b1dac41fb3)

Signed-off-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-06 13:23:29 -07:00
Peter Hutterer
e97cabce4a xfree86: fix SWCursor check in xf86CursorSetCursor.
Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when
the pointer left the screen (in a Xinerama setup).
We must call the sprite rendering function if
- SW cursors are enabled, or
- The current device is not the VCP and not attached to the VCP.

Backported from commit 66089e9129 for
server-1.6-branch by Peter Hutterer

Reported-by: Gordon Yuan <GordonYuan@viatech.com.cn>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-29 14:21:32 -07:00
Julien Cristau
17c5b2caf0 Change default for ExaOptimizeMigration to false
Quoting Michel Dänzer in <1234862541.4823.541.camel@thor>:

  Unfortunately, there are still bugs left in EXA which prevent it from
  working 100% correctly with the option enabled, see

  http://bugs.freedesktop.org/show_bug.cgi?id=16416

  http://bugs.freedesktop.org/show_bug.cgi?id=19940

So disable it for now to avoid corruption.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-29 14:21:00 -07:00
Peter Hutterer
f697b6c582 kdrive: set Activate/Deactivate grab for input devices (#21591)
X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591>
(cherry picked from commit b1b5ec45c1)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-29 14:17:13 -07:00
Jeremy Huddleston
597747c655 Fix a couple off-by-one array boundary checks.
Error: Write outside array bounds at Xext/geext.c:406
        in function 'GEWindowSetMask' [Symbolic analysis]
       In array dereference of cli->nextSib[extension] with index 'extension'
       Array size is 128 elements (of 4 bytes each), index <= 128

Error: Buffer overflow at dix/events.c:592
	in function 'SetMaskForEvent' [Symbolic analysis]
       In array dereference of filters[deviceid] with index 'deviceid'
       Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20

Error: Read buffer overflow at hw/xfree86/loader/loader.c:226
	in function 'LoaderOpen' [Symbolic analysis]
       In array dereference of refCount[new_handle] with index 'new_handle'
       Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256

These bugs were found using the Parfait source code analysis tool.
For more information see http://research.sun.com/projects/parfait

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b680bda34d)
(cherry picked from commit 04c9e80f08)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-29 14:15:17 -07:00
Peter Hutterer
10c06ddeef xfree86: restore default off for DontZap
Zapping is triggered by xkb these days, so note in the man page that it's the
Terminate_Server action. Since it's XKB, personal preferences towards or
against zapping should be achieved through xkb rulesets.
If Terminate_Server is not in the xkb actions, then we can't zap anyway and we
don't need a default of DontZap "on".

This patch restores the old meaning of DontZap - disallow zapping altogether,
regardless of XKB's current keymap.
Ideally, this patch should be accompanied by b0f64bdab00db652e in
xkeyboard-config.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 737b49199a)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-29 14:14:52 -07:00
Adam Jackson
7cae08d219 EDID: Fix timing class names to match the spec
(cherry picked from commit 5c1afac5ee)
2009-06-29 11:41:15 -04:00
Adam Jackson
dbac41b624 pci: Dump vendor/devices ids in the printed device list
(cherry picked from commit eb35402d0a)
2009-06-19 12:45:25 -04:00
Jerome Glisse
540d5b87a4 DRI2: update DRI2 private drawable width & height according to X drawable
(cherry picked from commit f250eea2e9)
2009-06-11 22:46:00 -07:00
Ian Romanick
ec9f1ae324 DRI2: Force allocation of real-front buffer for non-windows as well
For redirected rendering we end up with pixmaps (which the app thinks are
windows) that are double buffered.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Pierre Willenbrock <pierre@pirsoft.de>
(cherry picked from commit 0d9d3f3e36)
2009-06-11 22:46:00 -07:00
Ian Romanick
4fad615d68 DRI2: Implement protocol for DRI2GetBuffersWithFormat
This change implements the protocol for DRI2GetBuffersWithFormat, but
the bulk of the differences are the changes to the extension / driver
interface to make this function work.  The old CreateBuffers and
DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer
(both singular).

This allows drivers to allocate buffers for a drawable one at a time.
As a result, 3D drivers can now allocate the (fake) front-buffer for a
window only when it is needed.  Since 3D drivers only ask for the
front-buffer on demand, the real front-buffer is always created.  This
allows CopyRegion impelemenations of SwapBuffers to continue working.
As with previous version of this code, if the client asks for the
front-buffer for a window, we instead give it the fake front-buffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-06-11 22:46:00 -07:00
Ian Romanick
98c3c21735 DRI2: Add interface for drivers to query DRI2 extension version
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 28ddfc88d8)
2009-06-11 22:46:00 -07:00
Ian Romanick
d7277296ed DRI2: Synchronize the contents of the real and fake front-buffers
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 567cf67959)
2009-06-11 22:46:00 -07:00
Ian Romanick
73b786f7e7 DRI2: Do not send the real front buffer of a window to the client
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit f1a995d149)
2009-06-11 22:45:59 -07:00
Ian Romanick
32d250a881 DRI2: Add fake front-buffer to request list for windows
If a front-buffer is requested for a window, add the fake front-buffer
to the list of requested buffers.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit aa2928325f)
2009-06-11 22:45:59 -07:00
Adam Jackson
db61eff891 EDID: Add modes from Established Timings III descriptor to mode pool
EDID 1.4, section 3.10.3.9
(cherry picked from commit 99e22b86c5)
2009-06-11 15:22:00 -04:00
Adam Jackson
ebca49e0fe EDID: Be more cautious about finding vendor blocks.
Many old monitors zero-fill the detailed descriptors, so check for that
to avoid a useless warning like:

(WW) RADEON(0): Unknown vendor-specific block 0
(cherry picked from commit a2c5ee36b2)
2009-06-11 15:21:11 -04:00
Adam Jackson
c643d24cde vfb: Fix depth setup.
Initialize the depth corresponding to the root window before the
pixmap-only depths.  Otherwise you end up with the root window depth in
the depth list twice, which is mildly confusing for clients and
catastrophically confusing for PanoramiXConsolidate().
(cherry picked from commit 45530d1609)
2009-06-11 15:19:47 -04:00
Alan Coopersmith
0fbf6f30f7 Don't leak default font path when appending built-ins
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit 66539cc05d)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 22:56:56 -07:00
Alan Coopersmith
773e4890b3 Don't leak canonical module name and patterns if module is built-in
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 1c101d75d4)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 22:56:28 -07:00
Dave Airlie
7cd596e0dd randr12: looking up these bits if randr isn't initialised is bad.
When xinerama is enabled we don't get randr protocol, but the
driver might still want randr internals
(cherry picked from commit faf7dfa099)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 22:49:55 -07:00
Alan Coopersmith
bc95f29441 Fix byte swapping of XF86VidMode{Get,Set}GammaRamp
Fixes OpenSolaris Bug 8315:
Xorg segfaults when screensaver fades in cross-endian xdmcp session
<http://defect.opensolaris.org/bz/show_bug.cgi?id=8315>

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit 7d0f7518c2)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 22:48:49 -07:00
Jon TURNEY
3f0c73694b Remove references to rgb.txt from files section of Xserver and Xorg man pages
The references to this file in the server code were removed in commit dda10c9066

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit d0dd649035)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 22:47:43 -07:00
Jesse Barnes
fdbb6fd3d3 Don't prepare outputs & crtcs if set_mode_major is present
A driver with this hook will take care of preparing the outputs & crtcs,
so calling the prepare functions will just cause unnecessary flicker.

Fixes bug #21077
(cherry picked from commit 94648bb797)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:35:03 -07:00
Julien Cristau
eac2b3658a Bug#21324: Add quirk for Iiyama Vision Master 450
Reported-by: Jeremy Henty <onepoint@starurchin.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 0dfb97f15f)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:34:12 -07:00
Tormod Volden
b3c42e6450 xfree86: edid quirk for Philips LCD LP154W01-TLAJ
This panel reports its vertical size in cm.

X.Org bug#21000 <http://bugs.freedesktop.org/show_bug.cgi?id=21000>

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit b1dab580bd)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:34:00 -07:00
Ander Conselvan de Oliveira
0df12a3f01 xfree86: Remove device from inputInfo.devices if ActivateDevice failed.
After the call to xf86ActivateDevice, the new device will be added to
inputInfo.devices. However, if the subsequent call to ActivateDevice
fails, the correponding InputInfoRec for the device is deleted but an
entry still remains in inputInfo.devices. This might lead to a server
crash later on (on InitAndStartDevices for instance) when the device
control proc would be called for an invalid device.
(cherry picked from commit efa31092d6)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:31:41 -07:00
Ian Romanick
199bb36715 DRI2: Send the version the code actually supports
This prevents building an older server with a new dri2proto.h from
resulting in a DRI2 extension module that lies about the version it
supports.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 44227ef1b7)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08 12:23:27 -07:00
Adam Jackson
667865b9eb randr: Fix thinko in xf86TargetPreferred
The only-one-output case would only work right if that also happened to
be the zeroth output.  Oops.
(cherry picked from commit 8a6ed44a8b)
2009-03-20 16:58:06 -07:00
Jeremy Huddleston
10e0603fb9 XQuartz: Re-enable support for capslock
(cherry picked from commit 4901b8147e)
2009-02-25 11:35:19 -08:00
Michel Dänzer
e96921ca95 DRI1: Make DRICreateDrawable return TRUE for pixmaps.
GLX_EXT_texture_from_pixmap was broken since commit
a26c77ff43 ('glx: fix retval checks when failures
occur for drawable creation.')

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
(cherry picked from commit ef320bdd5e)
2009-02-25 11:34:48 -08:00
Alan Coopersmith
584f46b81c Add Extensions section to xorg.conf man page
Extensions section was added in X11R6.8.0 and documented in the release notes:
   http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3
but never made it into the man page.

Also fix a bonus typo.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
(cherry picked from commit ab61033700)
2009-02-25 11:34:29 -08:00
Keith Packard
ae7991b16d Pre-clip panning coordinates to keep crtc within panning region
There is a separate panning region check, but that doesn't work under
transformation, so just pre-clip the mouse coordinates when computing the
panning offsets. This leaves the case where panning constants are changing
unresolved.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry pick from commit c090f5514d)
2009-02-25 11:27:15 -08:00
Keith Packard
9a59e7f304 xf86CrtcShadowClear is unused.
Remove this now that clearing is done by repainting with appropriate extend
modes.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 60a4f1368785d26a49a3ef6df829723ca154c154)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-19 20:55:53 -08:00
Keith Packard
369d7b22a9 Make panning+transform be correctly driven by mouse
Figuring out how to adjust the crtc origin to keep the mouse pointer within
the crtc is a bit of a trick

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 63810aca31b962c93be4796883bde6ccb653e3a9)

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-19 20:55:25 -08:00