Commit c93ebb40 authored by Francisco Jerez's avatar Francisco Jerez Committed by Ben Skeggs

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

Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 1849719e
...@@ -470,6 +470,7 @@ static int ch7006_encoder_init(struct i2c_client *client, ...@@ -470,6 +470,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
priv->hmargin = 50; priv->hmargin = 50;
priv->vmargin = 50; priv->vmargin = 50;
priv->last_dpms = -1; priv->last_dpms = -1;
priv->chip_version = ch7006_read(client, CH7006_VERSION_ID);
if (ch7006_tv_norm) { if (ch7006_tv_norm) {
for (i = 0; i < NUM_TV_NORMS; i++) { for (i = 0; i < NUM_TV_NORMS; i++) {
......
...@@ -316,7 +316,10 @@ void ch7006_setup_power_state(struct drm_encoder *encoder) ...@@ -316,7 +316,10 @@ void ch7006_setup_power_state(struct drm_encoder *encoder)
} }
} else { } 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);
} }
} }
......
...@@ -95,6 +95,7 @@ struct ch7006_priv { ...@@ -95,6 +95,7 @@ struct ch7006_priv {
int flicker; int flicker;
int scale; int scale;
int chip_version;
int last_dpms; int last_dpms;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment