Commit Graph

265 Commits

Author SHA1 Message Date
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
Eric Anholt f5e5f8aedd WIP to allow re-probing and validation of modes for new heads at "xrandr" time.
Now, DDC modes always end up being preferred to custom modelines, even if
smaller.  This should probably be fixed by inserting custom modelines into
the probed mode list if they're valid according to the probed parameters of the
monitor.

Too much code is lifted from static functions in xf86Mode.c, and those should be
made unstatic if possible.  Using xf86ValidateModes is also rather hacky, and
I want to break the function down, but this is a first step.
2006-06-23 23:29:55 -07:00
Eric Anholt 89791914d2 Split probed modes out per pipe, and union them into the available modes.
This is the first stage of getting runtime monitor attachment.  The old i830
GTF code is returned to use to provide suitable modelines for xf86ValidateModes
in the LVDS case, even though the LVDS doesn't care about the modeline and just
always programs its fixed values.
2006-06-23 18:21:17 -07:00
Eric Anholt bb48105216 Move FP mode validation next to other mode validation code. 2006-06-22 09:38:27 -07:00
Eric Anholt 66d9a1be30 Detect SDVO display presence at startup and default to displaying to it, too. 2006-06-21 17:11:54 -07:00
Eric Anholt 72e25a7488 Fix SDVO output at low pixel clocks.
I had interpreted the docs as saying that the multiplier setting would further
divide the clock and stuff dummy bytes in.  Instead, we have to set the DPLL at
the higher clock rate, and the pixel multiplier just controls the stuffing of
dummy bytes.  Also, we have to set the multiplier both in the graphics chip and
on the SDVO device on the other side.
2006-06-21 16:04:18 -07:00
Eric Anholt 726443309d Add decoding of SDVO command names for debug output. 2006-06-21 15:38:19 -07:00
Eric Anholt 896ffe78fe Merge branch 'modesetting-origin' into modesetting 2006-06-20 15:10:35 -07:00
Eric Anholt 89c2c4bc40 Add #if 0-ed code I've been using for CRT detection debugging. 2006-06-20 15:10:19 -07:00
Eric Anholt be08661e31 Only default to enabling CRT or LVDS output if they're actually detected.
Still, if we haven't detected any outputs automatically (including CRT through
DDC), default to CRT anyway.
2006-06-20 14:55:21 -07:00
Eric Anholt b454c9601f Add support for CRT detection using DDC.
This method is slower (~5ms), but works on older chipsets.  Also, load-based
detection is disabled, as it can be fooled by other outputs on the pipe being
active, such as LVDS.
2006-06-20 14:32:40 -07:00
Eric Anholt 0b76646666 Add CRT detection function by testing for load, and clean up hotplug version. 2006-06-20 13:57:26 -07:00
Eric Anholt e4584a4f44 Remove dead DisplayInfo option. 2006-06-20 10:39:28 -07:00
Eric Anholt ab60e34dcf Add debugging info for pipe/display plane size. 2006-06-20 10:07:47 -07:00
Keith Packard 52243d407c Merge branch 'modesetting-origin' into modesetting 2006-06-19 13:28:09 -07:00
Keith Packard 2fb375b665 Set vblank interrupt configuration to match pipe configuration
New i915 drm ioctl (in version 1.5) allows the X server to select
which pipe drives vblank interrupts. Use this to drive from the 'preferred'
pipe. Yes, per-window vblanks would be nice in a shared fb environment.
Maybe someday.
2006-06-19 13:24:57 -07:00
Keith Packard b5acc6b3a3 Add backlight control to DPMS logic.
Turn backlight on and off in response to DPMS state changes.
2006-06-19 13:22:17 -07:00
Keith Packard 34f6a8204f Get sDVO output working on mac mini.
Add lots of register debugging to track delta from BIOS settings.
Fix various mode settings to mirror BIOS sDVO values.
Disable analog/lvds output on pipe with sDVO.
Borrow Dave Airlie's I830xf86ValidateDDCModes code.
Fix various sDVO I2C messages to mirror Dave's code.
2006-06-04 00:15:06 -07:00
Eric Anholt c1c46f882f Merge branch 'master' into modesetting
Conflicts:

	man/.gitignore
2006-05-22 10:42:24 -07:00
Lukáš Hejtmanek 1e2da2450d Replace VBE call to do DPMS with native code, and fix screensaver in clone mode. 2006-05-22 10:37:33 -07:00
Dave Airlie 1bc2a8f7a2 fixup I830SDVOGetActiveInputs to use return values not args 2006-05-18 16:58:22 +10:00
Dave Airlie fbba4312e7 add sdvo capability reading support
This reads the SDVO cap bits and uses them to figure out the input/output
to save/restore
2006-05-12 18:44:27 +10:00
Keith Packard f2967a2f5f Video overlay gamma bounds checking must be done bytewise.
Also, pend bound computations to register writes to allow
updates to individual values that are 'out of spec' so
the client can update multiple values.
(cherry picked from 190f9ad060 commit)
2006-05-09 13:57:23 -07:00
Keith Packard 190f9ad060 Video overlay gamma bounds checking must be done bytewise.
Also, pend bound computations to register writes to allow
updates to individual values that are 'out of spec' so
the client can update multiple values.
2006-05-09 13:51:25 -07:00
Eric Anholt fb10966e9f Use xf86int10Addr() when calculating an address to read the video BIOS from, out
of int10's copy.  Fixes a crash on FreeBSD.
2006-05-04 18:53:11 -07:00
Eric Anholt a66f2c01f7 Stop doing the BIOS memory size tweaking now that we don't ask the BIOS about
what modes are available.
2006-05-01 12:35:21 -07:00
Matthieu Herrb 99b0e53244 Fix non-dri build. 2006-05-01 10:47:09 +02:00
Matthieu Herrb 86f0119f47 Fix non-dri build. 2006-05-01 10:41:10 +02:00
Eric Anholt a555e28e5a Correct some SDVO-related register definitions. 2006-04-24 16:55:44 -07:00
Eric Anholt cc70e6b789 Save/restore the output's SDVO reg. Note that we might be programming the other
SDVO reg instead of the one assigned to the output.  When trying to fix that, I
ended up getting no output at all.
2006-04-24 16:49:48 -07:00
Eric Anholt b498d2b1d1 Start trying to save/restore SDVO state on VT switches. 2006-04-24 15:42:46 -07:00
Eric Anholt 56c1f8b0de Clean up some argument passing, and remove extra SetTarget{In,Out}Puts that had
no effect.  Note that we are currently trying to program both outputs of any
SDVO device the same way.
2006-04-24 14:10:20 -07:00
Eric Anholt 9ba5319b36 Only write out as many arguments as the commands need, and fix up the numbers in
some cases.  Pretty-print the return status.
2006-04-24 13:55:05 -07:00
Eric Anholt d32514aee4 Start trying to implement DDC over SDVO. It's slightly tricky because the
control bus will reset from DDC mode to internal-registers mode after every
Stop afer a Start on the DDC bus.  The xf86 DDC code causes multiple Start/Stops
in one probe.  So, we create a wrapper bus that does the control bus switch at
every Start.  It's not working yet on my hardware, but I'm pretty sure this is
the right way to go.
2006-04-24 12:21:45 -07:00
Eric Anholt effab21c3d Set displayWidth to a sufficient value for the modes we come up with for LVDS.
Reported by:	Lukáš Hejtmánek
2006-04-24 11:42:24 -07:00
Eric Anholt bcb441225d Simplify the i2c code by using the GetBits/PutBits interface rather than
reimplementing it.
2006-04-24 10:54:45 -07:00
Eric Anholt 47bd905943 Merge branch 'lukas-resume' 2006-04-24 10:36:24 -07:00
Alan Hourihane 1dbb19059f fix bug 6365 2006-04-20 10:43:19 +01:00
Dave Airlie 729c373121 move sdvo output setting
we have to set the sdvo register a lot earlier in order for them to sync
properly otherwise my monitor doesn't sync unfortunately, also
disable the sdvo while tweaking the PLLs.

This also comments out a setting that seems to break my system here for
Eric to look at later.
2006-04-20 13:34:55 +10:00
Dave Airlie 0ba7b13fb4 fix type 0 instead of O 2006-04-20 12:29:06 +10:00
Dave Airlie 2991d81a3b correct height parameter in sdvo packet 2006-04-20 12:27:47 +10:00
Dave Airlie b5f099e03a cleanup sDVO for device on C only
This destroys the i2c device properly if the device isn't detected,
and allows sDVO to work on GM chipsets, and doesn't initialise
the i2c bus twice for sDVO.
2006-04-20 09:50:36 +10:00
Eric Anholt 2909802de6 Clean up SDVO initialization, include config.h, and make it check the right
slave address on the first device as well.  This gets me to the point of
bringing up some modes on my device.
2006-04-19 16:29:06 -07:00