aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-08-05 16:57:08 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-08-09 01:16:23 -0400
commitc93ebb4021ff1fdffe78be89a4bd30bc7cbc75e6 (patch)
treec5869fd94b3891c3f75f923d15b9dc2e554c4d68
parent1849719ef86e29def631a473e496507a4e052c06 (diff)
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>
-rw-r--r--drivers/gpu/drm/i2c/ch7006_drv.c1
-rw-r--r--drivers/gpu/drm/i2c/ch7006_mode.c5
-rw-r--r--drivers/gpu/drm/i2c/ch7006_priv.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index 833b35f44a77..08792a740f18 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -470,6 +470,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
470 priv->hmargin = 50; 470 priv->hmargin = 50;
471 priv->vmargin = 50; 471 priv->vmargin = 50;
472 priv->last_dpms = -1; 472 priv->last_dpms = -1;
473 priv->chip_version = ch7006_read(client, CH7006_VERSION_ID);
473 474
474 if (ch7006_tv_norm) { 475 if (ch7006_tv_norm) {
475 for (i = 0; i < NUM_TV_NORMS; i++) { 476 for (i = 0; i < NUM_TV_NORMS; i++) {
diff --git a/drivers/gpu/drm/i2c/ch7006_mode.c b/drivers/gpu/drm/i2c/ch7006_mode.c
index e447dfb63890..c860f24a5afc 100644
--- a/drivers/gpu/drm/i2c/ch7006_mode.c
+++ b/drivers/gpu/drm/i2c/ch7006_mode.c
@@ -316,7 +316,10 @@ void ch7006_setup_power_state(struct drm_encoder *encoder)
316 } 316 }
317 317
318 } else { 318 } else {
319 *power |= bitfs(CH7006_POWER_LEVEL, FULL_POWER_OFF); 319 if (priv->chip_version >= 0x20)
320 *power |= bitfs(CH7006_POWER_LEVEL, FULL_POWER_OFF);
321 else
322 *power |= bitfs(CH7006_POWER_LEVEL, POWER_OFF);
320 } 323 }
321} 324}
322 325
diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h
index 1c6d2e3bd96f..17667b7d57e7 100644
--- a/drivers/gpu/drm/i2c/ch7006_priv.h
+++ b/drivers/gpu/drm/i2c/ch7006_priv.h
@@ -95,6 +95,7 @@ struct ch7006_priv {
95 int flicker; 95 int flicker;
96 int scale; 96 int scale;
97 97
98 int chip_version;
98 int last_dpms; 99 int last_dpms;
99}; 100};
100 101