Commit Graph

307 Commits

Author SHA1 Message Date
Keith Packard bdca8697cc Merge branch 'modesetting-origin' into modesetting 2006-09-20 22:46:42 -07:00
Linus Torvals daade50ca2 Add standard C headers to fix build on some systems after xf86_ansic.h removal.
This appears to have been hidden for others by header pollution in X Server
headers.
2006-09-20 12:07:09 -07:00
Keith Packard d9db5ec686 Merge branch 'modesetting-origin' into modesetting 2006-09-19 16:03:04 -07:00
Adam Jackson e3f4caf407 Add model-specific tweaks for some funky 945GM boards.
For the Aopen Mini-PC, ignore the claimed attached 800x600 LVDS panel.
Likewise for the Apple Mac Mini, but done slightly differently since it
shares PCI IDs with the Macbook Pro.
2006-09-15 13:51:18 -04:00
Eric Anholt 2b9c87bbf8 Remove xf86_ansic.h usage. 2006-09-08 11:16:02 -07:00
Keith Packard cbaf3cf74b verbose debug message for panel sync data 2006-08-31 18:25:21 -07:00
Ross Burton 6f0d352b83 Bug #7957: Fix distcheck. 2006-08-24 18:18:41 -07:00
Alan Hourihane 421b415e23 Fix a build problem. 2006-08-08 11:28:42 +01:00
Alan Hourihane 71e3e2d4e3 Fix a problem creating the I2C bus for the SDVOC
interface, due to a name match with SDVOB.

Bus names must be unique.
2006-08-04 20:39:50 +01:00
Adam Jackson e5c572f841 Fix a braino in mode list pruning.
Interpreting the size of the display in centimeters as the size in pixels,
and then clipping the modes list based on that, rarely does what you want.
2006-08-02 20:47:12 -04:00
Keith Packard a6d438ebe3 Disable spread spectrum clock usage.
The spread spectrum clock generator that improves EMI characteristics for
laptop screens lives in an external chip that is programmed over an i2c bus.
Without correct programming, attempts to use this mode for the LVDS can
result in a DC signal being sent to the panel.

Until we find programming information for this external chip, we should
leave this mode disabled.
2006-07-17 14:11:19 -04:00
Eric Anholt c7083a2672 Bug #7404: Only save/restore VGA fonts and not other VGA regs.
This fixes a hang on the i945 during restore.  It appears that saving/restoring
the VGA registers is not important, as we're correctly saving/restoring the
registers we touch within the driver anyway.
2006-07-14 14:28:03 -07:00
Eric Anholt 49b8276056 Add a register restore implementation so we don't crash on LeaveVT.
We shouldn't ever need to save/restore the hi/lo frequency regs, as they're
read-only.
2006-07-14 14:26:16 -07:00
Eric Anholt 6a92a77964 Don't try to probe on more pipes than we really have. 2006-07-14 14:20:41 -07:00
Adam Jackson de470aaf5c In I830xf86SortModes, catch cases where two modes are equal in only one
dimension, by comparing the areas of the modes.  Otherwise, 800x600 would
sort before 1024x600 if it was added later.
2006-07-13 19:10:11 -04:00
Adam Jackson 22843830eb Fix a thinko; would only inject the FP native mode if a mode list was already
found, which is never the case when there's no xorg.conf.
2006-07-13 17:20:17 -04:00
Eric Anholt 05bcbadd13 Avoid NULL dereference if cursor position changes during a mode change. 2006-07-11 14:05:38 -07:00
Eric Anholt b65f18b05a Bug #7443: Respect the user's Modes configuration, and make it more useful.
Now, mode names generated by DDC get names of the form "WIDTHxHEIGHTxREFRESH".
The matching for user Modes lines takes the user Modes as the prefix that
needs to match, rather than an exact string match or "WIDTHxHEIGHT" match.  So
one can, for example, specify "1024x768" to get any old 1024x768, or
1024x768x60 to get one of the modes named 1024x768x60.
2006-07-11 13:30:24 -07:00
Eric Anholt 5a2e04bd1b Fix crash with DDC when there are no user modes to add. 2006-07-11 10:21:51 -07:00
Luká\u0161 Hejtmánek f9499a68da Make gamma settings apply to the cursor as well, and fix clone-mode gamma. 2006-07-11 10:13:18 -07:00
Luká\u0161 Hejtmánek 7068468ac1 Add support for adjusting saturation value of overlay video. 2006-07-11 09:51:26 -07:00
Eric Anholt b912bf5673 Clean up warnings in sil164 module. 2006-07-10 18:35:20 -07:00
Eric Anholt d75490701c Hook up SiI164 mode setting (just a matter of turning the chip on).
Also adds register dumping in case this turns out to not be enough, and fixes
a couple of prototypes.
2006-07-10 18:21:04 -07:00
Eric Anholt 426d26ea44 Fix prototype for SaveRegs. 2006-07-10 18:19:51 -07:00
Eric Anholt 8d7987d002 Move to 4-space indents in sil164. 2006-07-10 17:53:06 -07:00
Eric Anholt f5a01a2ef0 Make DVO code light up my sil164-based DVI output, when already set up by BIOS. 2006-07-10 17:19:19 -07:00
Eric Anholt 23a0ee73bc Fix modelist with a configured monitor to not begin with all unvalidated modes. 2006-07-10 17:16:18 -07:00
Eric Anholt 48ba9273dd Fix validation when the first mode is thrown out, and print hsync in modelines. 2006-07-10 15:01:51 -07:00
Eric Anholt 3924ffb7d7 Merge branch 'dvo-merge' into modesetting
Conflicts:

	src/i830_driver.c
2006-07-10 12:12:38 -07:00
Eric Anholt f76f94a743 Supply proper NULL-terminated symbol lists to avoid crashing. 2006-07-10 12:04:09 -07:00
Eric Anholt 5a8f6a486d Improve output bus setup to include LVDS setup for pre-i915. 2006-07-08 15:26:19 -07:00
Eric Anholt df333cc9a8 Initial add of DVO support code. Probes my sil164.
This is a mostly-untested merge of airlied's work.  The I2C modules are intended
to be moved into the core server or a separate driver module when they're
functional and we're happy with the API.
2006-07-07 13:41:33 -07:00
Eric Anholt e1064f52b0 Don't try to probe modes on an SDVO device with NULL sdvo_drv. 2006-07-05 16:00:03 -07:00
Eric Anholt ffa6ecc18b More fixes to "choose closest mode for the pipe" code to select correct refresh. 2006-07-05 14:41:08 -07:00
Eric Anholt dfd7fef457 Bug #7375: Don't double-free the current XF86 mode after a randr reprobe. 2006-07-03 12:01:57 -07:00
Eric Anholt 5d07ebdf4f Only override display size with the XFree86 mode's for actual panel scaling. 2006-07-03 11:59:21 -07:00
Eric Anholt 48f27ac621 Replace i830InjectModes with i830DuplicateModes usage.
The remaining functionality of DuplicateModes was OBE, and the name was bad.
2006-06-28 15:07:01 +02:00
Eric Anholt ce5bd108c5 Validate and insert user and VESA standard modes for DDC or configured fallback.
This isn't really tested because I lack a good CRT to test against currently.
2006-06-28 14:21:49 +02:00
Eric Anholt 367f69f8e7 Replace xf86ValidateModes usage with a set of custom validators and pruning.
This moves us to maintaining MonPtrs per pipe instead of using the EDID
structure "xf86MonPtr", which is closer to what we want to be looking at when
doing validation.  The new validation isn't enough yet -- particularly, we
aren't importing and validating the custom modelines to the pipes when
applicable, but this will be easier than (for example) trying to make flat
panel modes pass xf86ValidateModes through various gross hacks.

Hotplug turn-on/off also happens at SwitchMode time now, instead of at randr
probe time.
2006-06-28 13:10:02 +02:00
Eric Anholt 9fbd3d8f4b If the panel power registers are all zeroes on Mobile parts, disable LVDS.
This is the case on the Mac mini, which is an i945GM but has no LVDS attached.
Powering on with the power timing registers zeroed would probably be a bad idea,
even if there was a panel attached.
2006-06-27 23:31:40 +02:00
Eric Anholt 56f7aedd0a Fix randr current mode reporting and mode loss/mis-configuration on re-randr. 2006-06-27 00:37:56 +02:00
Eric Anholt 7104b915da Clean up warnings. 2006-06-26 15:11:13 +02:00
Eric Anholt 21dc3edfc4 Merge branch 'master' into modesetting
Conflicts:

	src/i830.h
2006-06-26 15:06:42 +02:00
Eric Anholt 5111b88348 Turn on extra warning flags for GCC, and clean up the resulting fallout. 2006-06-26 14:53:10 +02:00
Eric Anholt f113e9002c Fix the plane/pipe disabling and turn off missing outputs when no longer DDCed. 2006-06-26 12:54:30 +02:00
Eric Anholt 0e5cda3796 Fix FP scaling by using the desired mode to get at the real [HV]Display. 2006-06-26 10:30:46 +02:00
Eric Anholt 51d14f803a Add a function to turn off unused outputs, DPLLs, planes, and pipes. 2006-06-26 10:21:23 +02:00
Eric Anholt d2c18d8d79 Fix DDC probing after last (untested) commit. 2006-06-26 10:15:11 +02:00
Eric Anholt 6d1d105d68 Unset pipe current mode on EnterVT, so we reprogram the mode for sure. 2006-06-26 10:14:27 +02:00
Eric Anholt 52e8231a19 Major cleanup of mode reprobing:
- Don't mess with pScrn->monitor->Modes, and instead make our own availModes.
- Don't re-program the pipe with the same values (no flicker at xrandr)
- Move a bunch of stuff that should be exposed through the public API (probably)
  to i830_xf86Modes.c
- Use a table with established modes plus GTF to come up with modes from EDID,
  instead of trying to walk and find one in pScrn->monitor->Modes.  I think
  this is correct.
- Reset clone state if we've detected new pipes, which should turn on the
  cursor.
2006-06-26 07:46:28 +02:00