Previously, we watched for the BIOS to have changed the layout, and repaired
the resulting configuration. Now, we request that the BIOS make no changes,
but leave a note in a register for when the key has been pressed. When we
notice this, we reprobe monitors and turn on/off the things we find.
This is a temporary solution until we can get the hotkey hooked up as an
input key to external applications to control the change using RandR 1.2. It
is also untested as neither of my laptops do anything with the hotkey.
However, this code does result in many fewer BIOS calls.
Lots of names included BIOS for no apparent reason; as we try to eliminate
BIOS calls from the driver, these only serve to confuse us.
(cherry picked from 8e5d280d94ad3d3ba3c75871c17abec9da62ed34 commit)
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.
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.
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.
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.
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.
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.
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.