diff options
author | Eric Anholt <eric@anholt.net> | 2007-10-01 12:01:16 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-10-01 13:48:48 -0700 |
commit | 994ee6721d9f1650ad37e21198b86848352b73af (patch) | |
tree | 4ffd97ad6422106cf12b61063ca6be8ac91123e7 /src/ch7017 | |
parent | 0e5574e842eeaac75271ccd50027d3e54c57722d (diff) |
Disable TV/VGA output on the CH7017/7018 devices.
We don't support those outputs on this chip yet, so turn them off if the BIOS
had set them on.
Diffstat (limited to 'src/ch7017')
-rw-r--r-- | src/ch7017/ch7017.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ch7017/ch7017.c b/src/ch7017/ch7017.c index 8e3a6ef4..4c9b4c61 100644 --- a/src/ch7017/ch7017.c +++ b/src/ch7017/ch7017.c @@ -55,6 +55,7 @@ struct ch7017_priv { CARD8 save_lvds_control_2; CARD8 save_outputs_enable; CARD8 save_lvds_power_down; + CARD8 save_power_management; }; static void @@ -224,12 +225,20 @@ ch7017_dpms(I2CDevPtr d, int mode) ch7017_read(priv, CH7017_LVDS_POWER_DOWN, &val); + /* Turn off TV/VGA, and never turn it on since we don't support it. */ + ch7017_write(priv, CH7017_POWER_MANAGEMENT, + CH7017_DAC0_POWER_DOWN | + CH7017_DAC1_POWER_DOWN | + CH7017_DAC2_POWER_DOWN | + CH7017_DAC3_POWER_DOWN | + CH7017_TV_POWER_DOWN_EN); + if (mode == DPMSModeOn) { /* Turn on the LVDS */ ch7017_write(priv, CH7017_LVDS_POWER_DOWN, val & ~CH7017_LVDS_POWER_DOWN_EN); } else { - /* Turn on the LVDS */ + /* Turn off the LVDS */ ch7017_write(priv, CH7017_LVDS_POWER_DOWN, val | CH7017_LVDS_POWER_DOWN_EN); } @@ -273,6 +282,7 @@ ch7017_save(I2CDevPtr d) ch7017_read(priv, CH7017_LVDS_CONTROL_2, &priv->save_lvds_control_2); ch7017_read(priv, CH7017_OUTPUTS_ENABLE, &priv->save_outputs_enable); ch7017_read(priv, CH7017_LVDS_POWER_DOWN, &priv->save_lvds_power_down); + ch7017_read(priv, CH7017_POWER_MANAGEMENT, &priv->save_power_management); } static void @@ -290,6 +300,7 @@ ch7017_restore(I2CDevPtr d) ch7017_write(priv, CH7017_LVDS_CONTROL_2, priv->save_lvds_control_2); ch7017_write(priv, CH7017_OUTPUTS_ENABLE, priv->save_outputs_enable); ch7017_write(priv, CH7017_LVDS_POWER_DOWN, priv->save_lvds_power_down); + ch7017_write(priv, CH7017_POWER_MANAGEMENT, priv->save_power_management); } I830I2CVidOutputRec ch7017_methods = { |