Commit graph

4875 commits

Author SHA1 Message Date
Tiago Vignatti
90955857b2 xfree86: loader: fix memory leaks in LoaderListDirs
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04 17:37:34 +03:00
Tiago Vignatti
1cb73083e5 xfree86: fix bad free configInputDevices
introduced in 93ca526892.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:14:42 +03:00
Tiago Vignatti
c2f117fc0d xfree86: fix memory leak in xf86LoadModules
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:08:21 +03:00
Tiago Vignatti
385e366c15 xfree86: fix memory leaks in configLayout
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:08:13 +03:00
Tiago Vignatti
5f2b91309e xfree86: fix memory leak in xf86ConfigFbEntity
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:08:13 +03:00
Tiago Vignatti
518109e200 xfree86: dri2: fix memory leak and free resources properly
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:08:13 +03:00
Tiago Vignatti
66c86ca867 xorg: remove unused pointer values all over the server
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-04-04 17:08:13 +03:00
Erkki Seppälä
db9321b330 xfree86/modes: Fixed memory leak in xf86InitialConfiguration
There were two memory leaks in the function: one was the lack of free
for "enabled", the other was the full lack of releasing anything when
configuration was too small. The first issue was fixed by adding the
missing free, the other was addressed by replacing the duplicate
memory releasing sequences with one that is gotoed into.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit d3adf2d935)
2011-03-14 15:34:04 -07:00
Adam Jackson
8ffaef2ebd vbe: Fix malloc size bug
v2: Slightly more obvious sizing math.

==14882== Invalid write of size 2
==14882==    at 0x6750267: VBEGetVBEInfo (vbe.c:400)
==14882==    by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882==    by 0x471895: InitOutput (xf86Init.c:519)
==14882==    by 0x422778: main (main.c:205)
==14882==  Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd
==14882==    at 0x4A0640D: malloc (vg_replace_malloc.c:236)
==14882==    by 0x675024B: VBEGetVBEInfo (vbe.c:398)
==14882==    by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882==    by 0x471895: InitOutput (xf86Init.c:519)
==14882==    by 0x422778: main (main.c:205)

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d8caa78200)
2011-03-09 15:56:48 -08:00
Evan Broder
8a18d18bb3 xfree86/modes: Be sure to only use new EDID for physical output dimensions
The EDID processing regards physical dimensions of 0mm x 0mm as
invalid. Previously the old values for height and width would be
preserved if none of the physical dimension specifications in the new
EDID were considered valid.

This will come up in particular if first a monitor is connected to an
output, and then a projector is connected. Since projectors generally
report physical dimensions of 0mm x 0mm, this would result in the
projector claiming to have the physical dimensions of the monitor.

Signed-off-by: Evan Broder <ebroder@mokafive.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 12b0f7df2c)
2011-03-04 13:44:35 -08:00
Adam Jackson
11bf10e22c xfree86: If the driver found modes on an output, don't add more
Inferring modes from sync ranges is only valid if the monitor says it's
valid.  If the monitor says it's valid, then we'll have already added
those modes during EDID block parse.  If it doesn't, then we should
believe it.

If there's no EDID for an output, but sync ranges from the config, we'll
still add default modes as normal.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit dc498b433f)
2011-03-04 13:05:34 -08:00
Jeremy Huddleston
8dd85e585a XQuartz: pbproxy: Protect against possible collision between Cocoa and X11 Cursor types
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 69a9171dbb)
2011-03-03 18:16:08 -08:00
Jeremy Huddleston
f71436014c XQuartz: Don't use deprecated CoreGraphics API on SL and Lion
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 0343aed1f0)
2011-03-03 18:16:08 -08:00
Jeremy Huddleston
a10323c74a XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configs
We now support using RandR to set the resolution of the primary display (and
place a shielding window on other displays) in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 8cf3348e90)
2011-03-03 18:16:07 -08:00
Jeremy Huddleston
3be0b136fa XQuartz: RandR: Provide an alert box when entering a RandR mode for the first time.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 968652983f)
2011-03-03 18:16:07 -08:00
Jeremy Huddleston
ceaa2f438d XQuartz: RandR: Capture the display when switching modes with RandR
This will prevent native windows from resizing as we change resolutions.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 13578b852b)
2011-03-03 18:16:07 -08:00
Jeremy Huddleston
0e253a9c86 XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit b17fc99cb9)
2011-02-24 20:07:07 -08:00
Jeremy Huddleston
3412f4799c XQuartz: Add LSApplicationCategoryType key to Info.plist
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 59850630fe)
2011-02-24 20:06:57 -08:00
Jeremy Huddleston
79a367d6e3 XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 8c1f75a1d4)
2011-01-30 17:06:56 -08:00
Jeremy Huddleston
3396d237a5 XQuartz: Use the default signal handler
This allows better interaction with CrashTracer

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit effaf9459c)
2011-01-30 17:06:52 -08:00
Jeremy Huddleston
e7871a9512 XQuartz: Call RRScreenSizeNotify after handling externally-generated XP_EVENT_DISPLAY_CHANGED
We get an XP_EVENT_DISPLAY_CHANGED event when our display configuration is
changed.  If this change was caused by hotplugging a monitor or Mac Display
Preferences changes by the user, we need to call RRScreenSizeNotify in order
to ensure new connections get the correct screen size.

http://xquartz.macosforge.org/trac/ticket/460

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 418bb57a39)
2011-01-30 17:06:43 -08:00
Jeremy Huddleston
824ebda72a XQuartz: Bump version string to 2.6.1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 6f52b10b9e)
2011-01-30 17:06:34 -08:00
Jeremy Huddleston
c11f9bfc08 XQuartz: Update copyright dates in bundle's plist
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-01-07 17:21:33 -08:00
Zhao Yakui
3d12e6d25a edid: Fix incorrect timings for VIC61
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 86ca434a1a)
2011-01-06 15:16:58 -05:00
Adam Jackson
9213c2525a x86emu: Fix more mis-decoding of the data prefix
cc2c73ddcb4370a7c3ad439cda4da825156c26c9's three-cent titanium tax
doesn't go too far enough.  Fix the rest of the call and jmp
instructions to handle the data prefix correctly.

Reference: Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 2A: Instruction Set Reference, A-M

http://www.intel.com/Assets/PDF/manual/253666.pdf

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit bb18f27715)
2011-01-06 15:16:52 -05:00
Ville Syrjälä
aec278eb65 xfree86/modes: Take rotation into account when checking mode size
Assume that a mode can be used in either landscape or portrait
orientation. I suppose the correct thing to do would be to
collect all the supported rotations from the CRTCs that can be used
with a specific output, but that information doesn't seem to be
readily available when these checks are done. So just assume that
either orientation is fine.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 2e781457d4)
2011-01-06 15:15:24 -05:00
Ville Syrjälä
005b465048 dri2: Don't page flip when the window size doesn't match the pixmap size
If the drawable size doesn't match the pixmap size page flipping should
not be allowed.

If the window is larger than the pixmap, page flipping might need to
reposition the CRTC somewhere in the middle of the pixmap. I didn't
spot any code that would handle that at least in the intel driver.

Also the root pixmap could then move to some negative screen
coordinates. Not sure if all bits of code could handle that. Perhaps
when composite is enabled screen_x/y would make it work, but without
composite there's no way that it would work AFAICS.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
(cherry picked from commit 0ce25fd790)
2011-01-06 15:15:17 -05:00
Jörn Horstmann
d819ff1cb5 Add EDID quirk for HP Compaq nc8430.
Like some other LPL panels, this one reports the vertical size in cm rather
than mm.
Patch taken from Launchpad bug #380009 <https://launchpad.net/bugs/380009>

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

Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4b88c7be8d)
2010-12-21 10:51:19 -08:00
Jeremy Huddleston
e1e37ef7eb XQuartz GL: Add $(GL_CFLAGS) to CFLAGS
This fixes a build failure I found on tinderbox.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit f641e4b34a)
2010-12-14 17:55:19 -08:00
Jeremy Huddleston
f7d60dae09 XQuartz: Just NSBeep() for XBell()
The CoreAudio path uses deprecated API and has reported crashes that
aren't worth fixing (4e8bf12b13 fixed
one and introduced another).  NSBeep() does the job just fine.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 883039e07b)
2010-12-13 12:10:02 -08:00
Jeremy Huddleston
47d474ee8f XQuartz: RandR: Fix mode changing for multi-monitor configurations.
This just fixes the regression whereby we couldn't switch between the legacy
fullscreen mode and rootless on multi-monitor configurations.  This was
happening because ref wasn't being set in these cases (since we don't ever
actually change CG modes), so we failed a CFEqual.  Setting the references
fixes this regression and places us one step closer to more mode RandR
mode switching in multi-monitor configurations.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 714b68d9e5)
2010-12-03 21:56:26 -08:00
Jeremy Huddleston
4c3aaef3ff XQuartz: Cleanup some compiler warnings
Mark __crashreporter_info__ as __attribute__((__used__))

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 14f00449eb)
2010-12-03 21:56:20 -08:00
Jeremy Huddleston
438dd53e4b XQuartz: Disable the Mac OS X screensaver when in full screen mode
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit ca431371a2)
2010-12-03 21:56:06 -08:00
Peter Hutterer
444e180ad1 xfree86: add missing linebreak in error message.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net>
(cherry picked from commit b31df0439f)
2010-12-02 15:47:46 -08:00
Aaron Plattner
7eaf84d2d1 xfree86: Fix rotation of 2-color non-interleaved cursor images
When RandR 1.2's transformation code is enabled, it rotates the cursor
image so that it appears upright on a rotated screen.  This code
completely mangles 2-color cursors on hardware where the the mask and
source images are not interleaved due to two problems:

1. stride is calculated as (width / 4) rather than (width / 8), so the
   expression (y * stride) skips two lines instead of one for every
   time y is incremented.
2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't
   specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags.

To fix this, refactor the code to pass the whole xf86CursorInfoPtr
through to cursor_bitpos and compute the correct stride there based on
the flags.  If none of the SOURCE_MASK_INTERLEAVE flags are set, use
the total cursor size to move the 'image' variable into the mask part
of the image before computing the desired byte pointer.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Cyril Brulebois <kibi@debian.org>
(cherry picked from commit ffcbfa0063)
2010-12-02 14:55:29 -08:00
Cyril Brulebois
e720e0874e Fix screen number checks.
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 279ef1ffd7)
2010-12-02 12:17:01 -08:00
Julien Cristau
e2960ce14e DGA: fix screen number check
screenInfo.numScreens is not a valid screen number, they go from 0 to
numScreens - 1.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 8684543021)
2010-12-02 12:17:00 -08:00
Bill Nottingham
3b7becd98a xfree86: store the screen's gamma information on init.
This fixes a gamma issue on vt switch observed with KDM. VT switching away
and back would result in a black screen. Avoid this by storing the current
gamma information on init.

https://bugzilla.redhat.com/show_bug.cgi?id=533217

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 566d09a5cd)
2010-12-02 12:17:00 -08:00
Adam Jackson
602ad98684 xfree86: apply gamma settings on EnterVT.
When entering the VT, re-apply the saved gamma settings for each screen.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c050aa2f5f)
2010-12-02 12:17:00 -08:00
Jeremy Huddleston
65f2ab20b2 XQuartz: Localization Updates
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 97b9bb1e2c)
2010-11-26 12:17:21 -05:00
Jeremy Huddleston
3603a64564 XQuartz: Remove existing localization files on install to avoid conflicts
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit f9fbafa1a0)
2010-11-26 12:17:15 -05:00
Jeremy Huddleston
d49f0c1737 XQuartz dri: Don't check CoreGraphics version
The version check is hackish, and I highly doubt anyone using this code is on
a version of OS X that predates this support (10.2 has support for it).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 6eed13ad59)
2010-11-26 12:17:00 -05:00
Adam Jackson
2da9b72835 edid: Fix the HDTV sync pulse adjustment
Simple typo, should have been adjusting the horizontal timings
consistently since we're not trying to mangle vertical at all.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Patrick E. Kane <pekane52@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b2f9ce201c)
2010-11-23 13:32:15 -05:00
Luc Verhaegen
a4452133ff x86emu: fix jump_near_IMM to handle DATA: flag correctly.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348

Before (data flag ignored -> broken):
66                  DATA:
e944f1              JMP       1ff6

After (fixed):
66                  DATA:
e944f1ffff          JMP       00001ff8

This subtle difference in the length of decoded instruction meant
that the VBE call jumped to the routine setting AX=0x14F (VBE Failed)
instead of the routine that set AX=0x4F (VBE success).

The ability to run the same code in vm86 significantly aided the
debugging of this issue. Those X.org developers who would like to drop
vm86 better take special care towards _all_ vesa bugs, as those will
expose further issues.

Patch applies easily to even xserver 1.4.2.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Tested-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit cc2c73ddcb)
2010-11-23 13:08:29 -05:00
Samuel Thibault
06ca34fe01 Do not trap access to timer and keyboard
Disable timer/keyboard trapping on GNU/Hurd for now

Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these
ports, and the int10 wrapper is not emulating them.

It's effectively what happens in the Linux variant too, as iopl() is used there,
making the ioperm() meaningless.

Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a6c64d9645)
2010-11-23 13:08:21 -05:00
Pauli Nieminen
32004e8d6e DRI2: Avoid call to NULL pointer
DDX driver may implement schedule swap without GetMSC. In that case we
can't call GetMSC in DRI2SwapBuffers.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
CC: Keith Packard <keithp@keithp.com>
CC: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 383dfe23f1)
2010-11-23 13:08:13 -05:00
Olivier Fourdan
9770500983 modes: improve aspect ratio match for classic drivers
After we infer the aspect ratio for the screen, we pick the largest
mode matching that aspect ratio from the best mode pool available.
We then clamp virtual size to that mode, and run the resulting mode
list through the driver's ValidMode hook.  In doing so we might filter
away our initial guess.  If this happens we shrink the default mode
to the next largest mode from _any_ mode pool.  This is usually wrong,
and we should instead pick the next aspect-matched mode from the best
available mode pool (as always, user then driver then default).

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 7bb653bedc)
2010-11-23 13:06:36 -05:00
Jeremy Huddleston
201273a2b9 XQuartz: Don't use bashism in uninstall-hook
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-15 10:57:43 -08:00
Adam Jackson
814413faef ddc: Don't probe for DDC/CI or EEPROM
For whatever reason, some (broken) monitors will crash if you do this.
We're not actually using this information for anything, so let's just
not do it.

Originally reported as http://bugzilla.redhat.com/620333

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit d2064fbb68)
2010-11-14 02:15:29 -08:00
Jeremy Huddleston
42a3747f0f XQuartz: Fix make distcheck
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-11-13 16:04:32 -08:00