drm/i2c/ch7006: Don't use POWER_LEVEL_FULL_POWER_OFF on early chip versions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Francisco Jerez 2010-08-05 22:57:08 +02:00 committed by Ben Skeggs
parent 1849719ef8
commit c93ebb4021
3 changed files with 6 additions and 1 deletions

View file

@ -470,6 +470,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
priv->hmargin = 50;
priv->vmargin = 50;
priv->last_dpms = -1;
priv->chip_version = ch7006_read(client, CH7006_VERSION_ID);
if (ch7006_tv_norm) {
for (i = 0; i < NUM_TV_NORMS; i++) {

View file

@ -316,7 +316,10 @@ void ch7006_setup_power_state(struct drm_encoder *encoder)
}
} else {
*power |= bitfs(CH7006_POWER_LEVEL, FULL_POWER_OFF);
if (priv->chip_version >= 0x20)
*power |= bitfs(CH7006_POWER_LEVEL, FULL_POWER_OFF);
else
*power |= bitfs(CH7006_POWER_LEVEL, POWER_OFF);
}
}

View file

@ -95,6 +95,7 @@ struct ch7006_priv {
int flicker;
int scale;
int chip_version;
int last_dpms;
};