Commit Graph

1801 Commits

Author SHA1 Message Date
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 b85f268051 Fix remaining warning. 2006-06-26 16:26:58 +02:00
Eric Anholt 6a3f89f4b6 Merge branch 'master' into exa
Conflicts:

	src/i830.h
2006-06-26 16:25:58 +02:00
Eric Anholt 3cdc53797b Fix build with new EXA headers. 2006-06-26 16:23:55 +02:00
Eric Anholt e7723a4e57 Merge branch 'origin' 2006-06-26 16:04:33 +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
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
Alan Coopersmith dae9cb7712 Provide definitions of __FUNCTION__ for non-gcc compilers 2006-06-22 15:07:16 -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
Alan Hourihane 5a1b68993f Fix build without DRI 2006-06-21 08:41:16 +01:00
Matthieu Herrb 16b310823b Fix build without DRI 2006-06-21 00:12:27 +02: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 8a6edba332 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.
(cherry picked from 2fb375b665 commit)
2006-06-19 13:47:28 -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
Wang Zhenyu d7e5d996aa Merge branch 'master' into exa 2006-06-20 01:22:53 +08:00
Alan Hourihane a73ab7f0e6 additions for rotation fixes 2006-06-19 11:35:42 +01:00
Alan Hourihane 1fe3dd38eb Set some invarient state, cures some problems with
rotation at startup.

This mimicks the 3D drivers setup.
2006-06-19 11:27:28 +01:00
Eric Anholt 89a5a0024a Fix crash with EXA during randr, when XAA structures were being accessed. EXA
shouldn't have any issues with there also being pixmaps in framebuffer while
rotation is active.
2006-06-18 00:32:17 -07:00
Eric Anholt f2ab3aa319 Fix DRI in EXA mode: Don't attempt to use XAA symbols (use the driver's internal
ones for EXA support when available).  Also, add an abstraction of XAA/EXA
MarkSync and WaitSync functionality so we don't need to sprinkle the ifdefs all
over, and correctly use them.
2006-06-18 00:32:01 -07:00
Alan Hourihane 3592b432b4 fix 8bpp & 16bpp rotation modes for i8xx
series chips
2006-06-13 21:42:53 +01:00
Alan Hourihane a50610b771 Use 800x600 mode to double check 2006-06-12 13:53:20 +01:00
Alan Hourihane f02268b209 Don't rely on register check to find out
if we're resuming - it's not reliable.

But then, neither is the BIOS, but it's
the best we can hope for until Eric's work
is complete.

Try setting another mode to cater for some
broken BIOS' too.
2006-06-12 12:16:58 +01:00
Alan Hourihane 672c3d18db Only mark rotation flags after initial screen setup.
Fixes bug #7053
2006-06-12 10:02:06 +01:00