Commit Graph

794 Commits

Author SHA1 Message Date
Keith Packard b00951a5c8 Merge branch 'modesetting-origin' into modesetting 2006-12-19 16:22:04 -08:00
Keith Packard 05cd921140 Align textured video dither matrix to window 2006-12-19 16:21:46 -08:00
Eric Anholt c0a0ddc0ce Bug #9382: Save the CRTC's desired mode in the old RandR 1.0 mode set path. 2006-12-19 16:07:14 -08:00
Keith Packard 3c86fdda1d Turn on dithering for 915 textured video 2006-12-19 15:53:07 -08:00
Eric Anholt 293ad158ec Remove 8k framebuffer stride restriction on 965.
Also, clean up the message if the limitation is hit.
2006-12-19 14:35:51 -08:00
Eric Anholt ff1223142a Only erase curMode in i830DisableUnusedFunctions when the CRTC is disabled.
This bug resulted in broken xinerama, among other issues.
2006-12-19 12:49:55 -08:00
Daniel Stone 3b5703c7fa Respect the srcdir. 2006-12-19 09:49:49 -08:00
Eric Anholt d89e211b12 Disable configure-disabled outputs before mode setting.
We're not supposed to turn off pipes/planes/dplls with outputs attached, which
we could have done before this.
2006-12-19 09:46:35 -08:00
Eric Anholt 3fc9feec7b Simplify i830DisableUnusedFunctions() by using the CRTC dpms routines. 2006-12-19 09:42:17 -08:00
Keith Packard 7b8056e3e3 Writing 1 to I2C line means to tristate the bus so others can manipulate it.
We were forcing bus lines to 1 which was breaking DDC for some monitors.
Instead, make the PutBits function just tristate when writing 1 bits.
2006-12-19 01:32:54 -08:00
Eric Anholt eedef7adc5 Add a detect() function for DVO chips, and implement it on sil164. 2006-12-18 15:57:44 -08:00
Eric Anholt 8983845f91 Fix crash in xf86SetScrnInfoModes when pScrn->modes ends up empty. 2006-12-18 15:57:08 -08:00
Eric Anholt fa4642048b Clean up i2c_vid interface, including de-StudlyCapsing and removing dead code.
The old Init() function is removed and the previous Detect() function is now
init().  This leaves us room in the namespace for a detect() like other
outputs have ("is the monitor connected?").  Also, Power() became dpms(),
taking a DPMSMode*.  In general, the mode setting path now matches the intel
internal path, except for the lack of mode_fixup().
2006-12-18 15:39:30 -08:00
Dave Airlie dcb069a1da ch7xxx: add lookup table for name
Don't load if we don't match name
2006-12-19 10:29:56 +11:00
Eric Anholt 0305298405 Limit modes to 165Mhz on CH7009, according to spec. 2006-12-18 14:49:01 -08:00
Eric Anholt 23114fbcca Align the driver to the CH7009[AB] spec.
With this, the driver works at 640x480 and 1280x1024 on my panel.
2006-12-18 14:47:44 -08:00
Eric Anholt 633d718f6f Clean up a bunch of log noise from ch7xxx startup. 2006-12-18 13:59:27 -08:00
Eric Anholt 3167bc6b24 Fix DVO mode valid function to not throw out all modes. 2006-12-18 13:45:55 -08:00
Eric Anholt 4ca92da5b9 Add save/restore to ch7xxx to avoid segfaults on server start. 2006-12-18 13:45:34 -08:00
Eric Anholt 31849edb3b Move the ch7xxx code to the style I've been settling on for output code. 2006-12-18 13:32:21 -08:00
Eric Anholt 2d0ca2202c Bug #8786: Treat pictures with no color data as non-component alpha.
This is an un(der?)-documented part of the render protocol: If the mask is
alpha only, then the component alpha flag is ignored on it.
2006-12-18 10:38:32 -08:00
Keith Packard 6823ca87f3 Follow mode setting order in RestoreHWState.
Add delays after output and CRTC disable. Restore panel fit register before
PLLs are restarted. Move all VGA restore code last. Shuffle various register
writes around and add delays to match PipeSetMode code.
2006-12-16 21:12:47 -08:00
Keith Packard 86558cc622 Prefer earliest CRTC when mapping to outputs.
For some reason, the code was preferring the last possible output when
mapping outputs to crtcs. Use the earlier CRTC instead to make the i830
driver consistent with BIOS usage.
2006-12-16 21:09:31 -08:00
Keith Packard 8e6ab99b31 Not restoring active outputs. Wait for input sync before enabling outputs.
Oops--looks like a typo to me; the code was callint set_target_output
instead of set_active_outputs.

BIOS loops waiting for the SDVO input to sync before enabling outputs, this
makes sense to me.
2006-12-16 21:06:36 -08:00
Keith Packard bffd611b0a Follow BIOS order in writing DPLL/DPLL_MD registers.
965 BIOS writes DPLL and then DPLL_MD.
945 BIOS writes DPLL twice.
2006-12-16 21:03:15 -08:00
Keith Packard 9b1a1b170b reorder restore writes for 965 VGA 2006-12-16 16:53:49 -08:00
Keith Packard 60411bc4d0 Follow BIOS PLL write protocol (disable,enable,enable).
This gets VGA output and text restore working, but SDVO is still not working.
2006-12-14 18:36:44 -08:00
Keith Packard 082519f34b Turn pll/pipe/plane on in crtc_set_mode
Instead of delaying pll/pipe/plane enables to the dpms function, turn them
on right away in the crtc_set_mode function. To avoid rewriting these
registers in the subsequent dpms function, check each register written there
to see if the enable bit is already on and don't rewrite.
2006-12-14 16:51:48 -08:00
Keith Packard 55e7a32096 Respect Virtual in xorg.conf
Instead of growing virtual to fit our desired sizes, if it is set in the
config file, use the value as the virtual size and make the default
configuration fit within that size (if possible).
2006-12-14 16:50:26 -08:00
Keith Packard d4142abc68 Set frame buffer size ranges in xf86_config.
Initialization and default configuration code needs to know the range of
legitimate sizes for the frame buffer.
2006-12-14 13:49:08 -08:00
Keith Packard 2b5a5542ad Change TV modes from Preferred to Driver.
This avoids having the artificial TV mode size drive overall screen size.
2006-12-14 13:43:50 -08:00
Keith Packard 3fe802453a Move xf86CrtcConfig to ScrnInfo private.
Pull xf86CrtcConfig out of the driver private structure and allocate a
ScrnInfo private index for it. Also, make the arrays of outputs and crtcs
dynamic instead of fixed.
2006-12-13 13:15:14 -08:00
Keith Packard 0f6addc8a6 Merge branch 'modesetting-origin' into modesetting 2006-12-13 12:10:31 -08:00
Keith Packard 001e272437 Auto-detect working TV output by checking TV regs functionality.
We can't figure out which chips are supposed to have TV out, so instead we
prod the TV_DAC register to see if it will hold the value written to it, if
not, we assume the chip doesn't have TV out.
2006-12-13 12:08:58 -08:00
Eric Anholt 3fa5b39983 Add magic double-write of the dpll register to fix mac mini cold boot. 2006-12-13 12:04:33 -08:00
Eric Anholt e27372e85a Add some caution with PCI write posting and DPLL delays to i830_crtc_dpms.
While it doesn't specifically help/hurt my test case, we've seen enough
mysterious behavior that caution is probably warranted.
2006-12-13 12:04:33 -08:00
Keith Packard df0a5a25aa Rename outputs to TMDS-1/TMDS-2, LVDS, TV and VGA.
These names are reasonably short and describe the connector rather than the
target media, but we don't appear to have any way to determine what is on
the other end of the wire. More importantly, they're all unique now.
2006-12-13 11:38:18 -08:00
Keith Packard 4cdcaac26b Write dpll_md register while updating dpll as that appears to be required.
SDVO multiplier on 965 is in the dpll_md register; for some reason, that
needs to be written along with the dpll value or the multiplier doesn't get
set correctly.
2006-12-12 23:26:00 -08:00
Keith Packard 9dd1520421 Merge branch 'modesetting-origin' into modesetting 2006-12-12 22:52:59 -08:00
Keith Packard d57a258153 Elide duplicate modes in pScrn->monitor.
xf86DDCMonitorSet dumps all of the DDC-discovered modes
into the monitor mode list without checking to see if they
are already present. This provides an ever-changing list of
modes for outputs which have no DDC and which simply duplicate the monitor
mode list.
2006-12-12 22:48:21 -08:00
Eric Anholt 63bf48481d Correct typo in mac mini hack, and return modes when the hack is unnecessary. 2006-12-12 22:42:41 -08:00
Eric Anholt 41444183b5 Replace custom, partially broken DPMS implementation with a generic one. 2006-12-12 18:08:57 -08:00
Eric Anholt 7ed1b05922 Fix mac mini SDVO output: write the SDVO[BC] enabled register state twice. 2006-12-12 16:03:52 -08:00
Eric Anholt 9776f6c68b Flush the plane changes in i830_crtc_dpms()
Otherwise, the changes may not have taken effect.
2006-12-12 16:02:47 -08:00
Eric Anholt 54823ac39c Move the SDVO sync detection to after we've turned the port on. 2006-12-12 14:55:10 -08:00
Eric Anholt ec45d72743 Extend the error state reporting to cover ESR and decode PGTBL_ERR for 945. 2006-12-12 14:55:10 -08:00
Eric Anholt 838af10b85 Move PrintErrorState and CheckInheritedErrors code to i830_debug.c. 2006-12-12 14:55:10 -08:00
Eric Anholt 668ae6ce3c Set the SDVO port to on before sending the SDVO output on command. 2006-12-12 14:55:10 -08:00
Eric Anholt 91a538bead More debugging output for SDVO. 2006-12-12 14:55:10 -08:00
Eric Anholt ce54538b90 Add a hack for DDC on my Mac Mini. 2006-12-12 14:55:10 -08:00