Commit Graph

154 Commits

Author SHA1 Message Date
Eric Anholt 69083a2fc3 Remove BIOS save/restore code, fixing VT switching. Removes some other dead
code, too.
2006-04-06 16:00:42 -07:00
Eric Anholt 2e5d85fb83 Turn off the VGA plane when we're setting our native modes. 2006-04-06 16:00:34 -07:00
Eric Anholt ceb08d28f4 Remove the hacky-looking Set640x480. I'll be removing things it depends on
(setpipe), and I suspect we'll end up with different hacks for resume, anyway.
2006-04-06 16:00:32 -07:00
Eric Anholt 1f0ba458d0 Remove more BIOS stuff, particularly Get/SetDisplayDevices. Now, if there's no
hardcoding in the config file, we default to LFP if we detect it from BIOS, and
LFP or CRT if we can get EDID out of them.
2006-04-06 16:00:24 -07:00
Eric Anholt b20b466aae Remove the now-unused displaySize and pipeDisplaySize. 2006-04-06 16:00:14 -07:00
Eric Anholt d960c3ca15 Remove more BIOS modesetting stuff. 2006-04-06 16:00:12 -07:00
Keith Packard 4e3a482700 autodetect LVDS dither. Fix 16bpp depth selection 2006-04-06 16:00:08 -07:00
Eric Anholt 8d27f8246e Clean up (and I believe fix a couple of bugs in) the divisor selection code. 2006-04-06 16:00:06 -07:00
Eric Anholt e45581cd07 Fill in clock information from VBT table, so that a good clock value gets
requested for choosing divisors.
2006-04-06 16:00:03 -07:00
Eric Anholt 33977d2383 Port code from radeon driver for panel mode validation, which will hopefully get
the right mode chosen on the VAIO.  Untested.
2006-04-06 15:59:51 -07:00
Eric Anholt febdfa967d Remove some VBE DDC code that I believe is OBE. 2006-04-06 15:59:44 -07:00
Eric Anholt f86892c916 Make auto panel fitting work by pulling LVDS timing EDID info out of the static
BIOS table, and always using that.
2006-04-06 15:59:43 -07:00
Eric Anholt f6a3243f40 Add more VBT reading, so we find the panel size. 2006-04-06 15:59:28 -07:00
Eric Anholt 64756e2150 Start interpreting VBT information with the goal of pulling out LVDS timings
for panel fitting.
2006-04-06 15:59:26 -07:00
Eric Anholt c2d554be67 Save/restore a couple of important VGA plane registers, and have vgahw
save/restore everything it knows about.  Also moves the save to just after the
other reg saves, above the VBE save stuff which may have side effects.
2006-04-06 15:59:14 -07:00
Eric Anholt 8411c126ae Update to newer airlied DDC code, and do some cleanups as well. Now tries DDC
on LVDS, though my current LVDS gives no results.
2006-04-06 15:58:59 -07:00
Eric Anholt 6414ad89b9 Add enough of airlied's DDC/I2C work to pull EDID info from my CRT. 2006-04-06 15:58:47 -07:00
Eric Anholt 5215e19af5 Add some register information for VGACNTRL, and do the reg-debug thing on it. 2006-04-06 15:58:45 -07:00
Eric Anholt b77bdc2c15 Move the PFIT enabling before the enabling of the pipe, as the specs say we
should.  This doesn't work yet, as we apparently need to adjust the pipe to
output at the full resolution of the panel, not the displayed image size,
because PFIT controls scaling between the display planes and the pipe.
2006-04-06 15:58:37 -07:00
Eric Anholt de4a9e4a78 Add a couple more bits to panel auto-fitting, though it isn't working yet. 2006-04-06 15:58:24 -07:00
Eric Anholt 02341aa68c Make the reg-snapshot code work, add a couple more registers, and use it on VT
switching to hopefully help point out where we aren't restoring enough.
Currently doesn't reveal anything.
2006-04-06 15:58:20 -07:00
Eric Anholt 2b6fc7ddb0 Add missed save/restore of DSP*SIZE registers. 2006-04-06 15:58:07 -07:00
Eric Anholt 12ce799818 Add some untested debugging code to for helping figure out VT switch issues. 2006-04-06 15:58:00 -07:00
Eric Anholt 585cc5f256 Add more integrated LVDS support code. 2006-04-06 15:57:54 -07:00
Eric Anholt 33c62e8e65 Change the order of reg writes for restore, possibly increasing chances of
success.  Also save and restore ADPA.
2006-04-06 15:57:51 -07:00
Eric Anholt 7f4dc09dca Remove some dead VBE code. 2006-04-06 15:57:41 -07:00
Eric Anholt f3ec8653ab Include config.h, fixing many issues with reading from pI830. 2006-04-06 15:57:29 -07:00
Eric Anholt 84fc3971d7 Turn off panel power before poking pipe B, and turn it back on if we're doing
LVDS.  Also, refuse to do LVDS on pipe A, as the docs say you can't.
2006-04-06 15:57:24 -07:00
Eric Anholt aca0f942f3 Fix prototype for i830DetectCRT. 2006-04-06 15:57:12 -07:00
Eric Anholt df6347139b Use DISPPLANE_32BPP_NO_ALPHA for depth 24, else the empty alpha channel results
in a black display plane.
2006-04-06 15:57:09 -07:00
Eric Anholt 8e819ced83 It appears from the specs that you have to wait for vblank after disabling the
plane, not the pipe.
2006-04-06 15:56:59 -07:00
Eric Anholt ee2410b965 Move display base setting to a separate function and use it from both mode setup
and AdjustFrame.  Rename AdjustFrame to reflect the fact that it doesn't touch
the BIOS.
2006-04-06 15:56:49 -07:00
Eric Anholt 980fb78e75 Correct capitalization of i830SetMode. 2006-04-06 15:56:33 -07:00
Eric Anholt 2b842c7ee3 Start implementing support for setting modes for multiple output devices,
particularly LVDS.  Untested.
2006-04-06 15:56:29 -07:00
Eric Anholt a09d9cf27a Replace I830VESASetMode with simpler i830SetMode, which is all native and
doesn't have BIOS-setup workarounds.  Multihead behavior may be wrong, and it is
all untested.
2006-04-06 15:56:20 -07:00
Eric Anholt 7edb25789b Start making i830SetMode aware of multiple pipes. 2006-04-06 15:56:07 -07:00
Eric Anholt b5915ac77a Clean up a couple of warnings. 2006-04-06 15:56:06 -07:00
Eric Anholt c20e15fbe4 Disable I830VESASetVBEMode on restore, since I've removed that code. Note that
this means that VT switching is broken.  We're fine with that for now, but at
least now we get a bad display rather than X crashing about an undefined symbol.
2006-04-06 15:55:56 -07:00
Eric Anholt 7d37c50369 Re-disable chatty debug code. 2006-04-06 15:55:09 -07:00
Eric Anholt 2538cbeb50 Enable -Wall on GCC, and do a cleanup of existing warnings. 2006-04-06 15:55:05 -07:00
Eric Anholt 7746da3b34 Move LVDS panel power state setting to a separate function, and reduce magic
numbers.
2006-04-06 15:55:01 -07:00
Eric Anholt 142bc4f91a Write the ADPA (CRTC) register on mode setup. Obtained from airlied. 2006-04-06 15:54:51 -07:00
Eric Anholt 6877f532c5 Add untested CRT detection code. 2006-04-06 15:54:43 -07:00
Eric Anholt a085813714 Add adjustments of PLL divisor limits for "Almador". 2006-04-06 15:54:38 -07:00
Eric Anholt 2d4415ff17 Remove the hacked local xf86SetModeCRTC now that xf86SetCrtcForModes is taking
effect on all of our modes.
2006-04-06 15:54:33 -07:00
Eric Anholt 611264ab9b Remove more VBE stuff and start using xf86ValidateModes. Guessed some params to
xf86ValidateModes.
2006-04-06 15:52:52 -07:00
Eric Anholt 9838f63991 Always ErrorF output debugging info when doing BIOS calls, including file/line. 2006-04-06 15:52:40 -07:00
Eric Anholt 767944e378 Replace a few magic numbers with symbolic names. Reviewed by md5. 2006-04-06 15:52:34 -07:00
Eric Anholt 4955cd267e Add untested save/restore code, and starting on not using VBEValidateModes 2006-04-06 15:52:32 -07:00
Eric Anholt 73496b765c Change an if statement to a more obvious but equivalent case statement. 2006-04-06 15:52:27 -07:00