Commit Graph

538 Commits

Author SHA1 Message Date
Peter Hutterer
d4dad6f84f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/events.c
	hw/xfree86/common/xf86Xinput.c
2007-04-12 11:11:03 +09:30
Keith Packard
bcf17df69a Disable CRTC when SetSingleMode has no matching mode. Update RandR as well.
xf86SetSingleMode tries to resize all crtcs to match the selected mode. When
a CRTC has no matching mode, it now disables the CRTC (instead of crashing).

Also, poke the RandR extension when xf86SetSingleMode is done so that
appropriate events can be delivered, and so that future RandR queries return
correct information.
(cherry picked from commit dc6c4f6989)
2007-04-10 12:36:45 -07:00
Keith Packard
a39f297ada Don't erase current crtc for outputs on CloseScreen
Erasing this variable causes some outputs (SDVO on intel) to fail
to be correctly reset at server reset time.
(cherry picked from commit 56262a4ee9)
2007-04-02 19:12:44 -07:00
Eric Anholt
11797ffdcc Move modes/ debugging output under Option "ModeDebug" in the Device section. 2007-04-02 18:21:58 -07:00
Peter Hutterer
e8777a91f3 Merge branch 'master' into mpx
Conflicts:

	Xi/closedev.c
	Xi/exevents.c
	Xi/extinit.c
	Xi/listdev.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	include/extinit.h
	mi/mipointer.c
2007-04-02 15:36:26 +09:30
Adam Jackson
5ba4d9eedf Refuse to create tiny modes from EDID detailed timing. 2007-03-28 12:03:19 -04:00
Keith Packard
804080a709 Make pending properties force mode set. And, remove AttachScreen calls.
Yes, two changes in one commit. Sorry 'bout that.

The first change ensures that when pending property values have been
changed, a mode set to the current mode will actually do something, rather
than being identified as a no-op. In addition, the driver no longer needs to
manage the migration of pending to current values, that is handled both
within the xf86 mode setting code (to deal with non-RandR changes) as well
as within the RandR extension itself.

The second change eliminates the two-call Create/AttachScreen stuff that was
done in a failed attempt to create RandR resources before the screen
structures were allocated. Merging these back into the Create function is
cleaner.
(cherry picked from commit 57e87e0d00)

Conflicts:

	randr/randrstr.h
	randr/rrcrtc.c

I think master and server-1.3-branch are more in sync now.
2007-03-24 00:01:47 -07:00
Keith Packard
1f77120775 Ensure that crtc desired values track most recent mode.
desiredX and desiredY were not recorded during xf86InitialConfiguration.
desiredX, desiredY and desiredRotation were not recorded during
xf86SetSingleMode.
(cherry picked from commit 36e5227215)
2007-03-23 23:44:34 -07:00
Keith Packard
7093367c39 Fix Pending property API, adding RRPostPendingProperty.
Pending Properties take effect when the driver says they do, so provide an
API to tell DIX when a property effect is made. Also, allow driver
to reject property values in RRChangeOutputProperty.
(cherry picked from commit 8eb288fbd6)
2007-03-23 01:32:34 -07:00
Keith Packard
510eaa346e Clean up xf86CrtcRec and xf86OutputRec objects at CloseScreen.
Erase pointers to structures which are freed at server reset time.
(cherry picked from commit 492c768065)
2007-03-23 01:30:24 -07:00
Keith Packard
b63e0d2545 Clean up Rotate state on server reset.
The rotation state is stored in the xf86_config structure which is not
re-initialized at server reset time. Clean it up at CloseScreen time.
(cherry picked from commit f8db7665dc)
2007-03-23 01:30:00 -07:00
Peter Hutterer
015d728bcd Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	dix/events.c
	mi/misprite.c
2007-03-19 09:42:56 +10:30
Keith Packard
9d0c3b52f2 Eliminate RRModeRec devPrivate field.
The xf86 mode setting code was mis-using this field to try and store a
pointer to a DisplayModeRec, however, each output has its own copy of every
DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing
at a random DisplayModeRec.

Instead of attempting to rectify this, eliminating the devPrivate entirely
turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec
structure and set that to the hardware, converting it on the fly to a
DisplayModeRec as needed.
(cherry picked from commit 3506b9376c)
2007-03-17 23:34:58 -07:00
Keith Packard
2c93083edd Add support for user-defined modelines in RandR.
The RandR protocol spec has several requests in support of user-defined
modes, but the implementation was stubbed out inside the X server. Fill out
the DIX portion and start on the xf86 DDX portion. It might be necessary to
add more code to the DDX to insert the user-defined modes into the output
mode list.
(cherry picked from commit 63cc2a51ef)

Conflicts:

	randr/randrstr.h

Updated code to work in master with recent security API changes.
2007-03-17 23:20:07 -07:00
Keith Packard
3bffb28126 Don't wedge when rotating more than one CRTC.
Rotation block handler was re-registering the rotation damage structure,
creating an infinite loop in the damage code. Track registration of the
damage structure to avoid this.
(cherry picked from commit b14f003b0e)
2007-03-15 19:32:58 -07:00
Keith Packard
9562b6abe1 Allow xf86_reload_cursors during server init.
xf86_reload_cursors is supposed to be called from the crtc mode setting
commit hook; as that happens during server initialization, check for this
case.
(cherry picked from commit 5b77bf2d02)
2007-03-15 19:32:48 -07:00
Keith Packard
ae75019ccf Create driver-independent CRTC-based cursor layer.
This moves most of the cursor management code out of the intel driver and
into the general server code. Of course, the hope is that this code will be
useful for other driver writers as well.

Check out xf86Crtc.h for the usage information, making sure you add the
needed hooks to the crtc funcs structure for your driver.
(cherry picked from commit 4d81c99a46)
2007-03-15 00:02:40 -07:00
Keith Packard
40ae4f246d Remove stale monitor data when output becomes disconnected.
Remove parsed EDID and EDID property from disconnected outputs.
(cherry picked from commit ae9d5aa479)
2007-03-07 20:53:16 -08:00
Keith Packard
72a23d88d7 Add xf86CrtcScreenInit to share initialization across drivers.
xf86CrtcScreenInit performs initialization that needs to happen at
ScreenInit time.
(cherry picked from commit 558a4f5588)
2007-03-06 23:20:59 -08:00
Keith Packard
9b6bb06f13 Allow relative positions to use output names or monitor identifiers.
Previous version used monitor identifiers if present, otherwise output
names. That caused existing working configurations to break when additional
information was added to the configuration file.
(cherry picked from commit 3f5cedf00a)
2007-03-05 23:50:37 -08:00
Keith Packard
bed76caa6c Use EDID data to set screen physical size at server startup.
Screen physical size is set to a random value before the RandR code gets
control, override that and reset it to a value based on the compat_output
physical size (if available). If that output has no physical size, just use
96dpi as the default resolution and set the physical size as appropriate.
(cherry picked from commit 843077f23a)
2007-03-05 23:37:11 -08:00
Keith Packard
47f8361c3a Add xf86SetDesiredModes to apply desired modes to crtcs.
xf86SetDesiredModes applies the desired modes to each crtc (as selected by
xf86InitialConfiguration initially and modified by successful mode settings
afterwards). For crtcs without a desired mode, pScrn->currentMode is used to
select something workable.
(cherry picked from commit bcade98cca)
2007-03-05 22:23:19 -08:00
Keith Packard
33d2cf93fb Move xf86SetSingleMode into X server from intel driver.
This function applies a single mode to the screen (as from RandR 1.1,
XFree86-VidModeExtension or XFree86-DGA) using a policy that selects one
output to reconfigure to the requested mode and then makes all other outputs
fit within that size.
(cherry picked from commit 5a595c1f76)
2007-03-05 20:18:56 -08:00
Dave Airlie
8ba5e8d820 add a standard connector type and name for us as an output property 2007-03-05 13:46:41 +11:00
Dave Airlie
2e31872e05 modes: add commit/prepare hooks 2007-03-05 13:44:21 +11:00
Peter Hutterer
1f0075786f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/getevents.c
	hw/xfree86/ramdac/xf86Cursor.c
	mi/mipointer.c
	xkb/xkbUtils.c
2007-03-05 12:37:17 +10:30
Keith Packard
06b01186f6 Remove debugging ErrorF from rotation code.
(cherry picked from commit e6af7569f2)
2007-03-04 17:35:04 -08:00
Keith Packard
c14507b683 Handle non-zero origin rotated crtc. Damage crtc area on re-rotate.
Box transformation from source to dest area was broken, leaving the wrong
areas painted when the crtc origin was non-zero.

When rotating from left to right, the pixmap doesn't get reallocated, and so
no damage was left in the pixmap from xf86RotatePrepare. Separately damage
the whole crtc area when this occurs to repaint the area.
(cherry picked from commit 2a50ca2160)
2007-03-04 17:34:54 -08:00
Aaron Plattner
ea1a72946d Add a canGrow argument to xf86InitialConfiguration.
canGrow indicates to the DDX that the driver can enlarge the desktop via the
xf86_config->funcs->resize hook.  If so, xf86InitialConfiguration will set
virtual[XY] to match the configuration it chooses and will leave the crtc config
size ranges alone.  If FALSE, it will bloat the screen to fit the largest probed
mode and also set the crtc config max size to limit the desktop to the initial
virtual[XY] size.
2007-03-02 12:06:54 -08:00
Aaron Plattner
04d15da95d Add a screen resize hook to xf86CrtcConfigRec.
This hook is called when the DDX needs to resize the screen.  The driver is
responsible for changing virtualX and virtualY, along with any other related
screen properties (devPrivate.ptr, devKind, displayWidth, etc.).

Use the size range from the crtc config instead of randrp->virtual[XY] when
reporting the min and max screen sizes to the DDX.
2007-03-02 12:06:54 -08:00
Keith Packard
5631a67f64 Don't set subpixel order during startup; the screen won't be ready.
in xf86CrtcSetMode, scrn->pScreen will be NULL during server startup time,
so don't try to set the subpixel order. subpixel order will be set in the
randr initialization anyways.
(cherry picked from commit 5f6f8616d8)
2007-02-17 17:40:35 -08:00
Keith Packard
096965ec9c Ensure drivers can use new modes header files.
New modes header files required a few minor changes to be used by external
drivers, the most notable of which is the publication of the config file
parser header files.
2007-02-17 15:16:44 -08:00
Keith Packard
55797dd252 Respect rotation in initial screen size computation. 2007-02-17 15:16:34 -08:00
Keith Packard
e4507825bf Enable startup-time rotation; change rotation pixmap creation API.
Add monitor "Rotate" option taking one of "normal", "left", "inverted" or
"right". However, because initial mode selection is made before the screen
is completely initialized, we cannot create the shadow pixmap object at this
point. Pend the shadow pixmap creation until the block handler.

Note that this code is not completely functional yet.
2007-02-17 15:16:20 -08:00
Keith Packard
f350909d16 Kludge around duplicate code added in hw/xfree86/modes.
Code added in hw/xfree86/modes came from the server-1.3-branch.
Portions of this code had previously been integrated into xf86Mode.c
and edid_modes.c.

To preserve hw/xfree86/modes as much as possible, the duplicate code from
the other files has been disabled; a more careful review would figure out
where that code actually belonged.
2007-02-15 21:50:48 -08:00
Keith Packard
258beebc77 Report correct RandR 1.0 sizeID. Report correct subpixel order.
RandR 1.0 sizeID must be computed the same way every time, so when reporting
it in the ScreenChangeNotify event, just construct the usual 1.0 data block
and use that.

subpixel geometry information can be computed by looking at the connected
outputs and finding any with subpixel geometry and using one of those for
the global screen subpixel geometry. This might be improved by reporting
None if more than one screen has information and they conflict.
2007-02-15 20:37:44 -08:00
Keith Packard
ef6b1235fd Allow new modes code to build inside drivers as well as server.
Use config.h for driver builds where xorg-config.h isn't available.
2007-02-15 20:37:19 -08:00
Keith Packard
d4eb4d0650 Merge crtc/output-based mode selection code.
This code comes from the intel driver, so there's no history in this tree.

As the crtc/output-based mode selection code uses ddc, the ddc and i2c
modules have been merged into the server. Attempts to load them are safely
ignored now.
2007-02-15 20:36:20 -08:00