diff options
Diffstat (limited to 'drivers/gpu/drm/i915/dvo_ns2501.c')
-rw-r--r-- | drivers/gpu/drm/i915/dvo_ns2501.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/dvo_ns2501.c b/drivers/gpu/drm/i915/dvo_ns2501.c index 6bd383dfbb09..c4d9f2f395e6 100644 --- a/drivers/gpu/drm/i915/dvo_ns2501.c +++ b/drivers/gpu/drm/i915/dvo_ns2501.c | |||
@@ -493,19 +493,19 @@ static void ns2501_mode_set(struct intel_dvo_device *dvo, | |||
493 | } | 493 | } |
494 | 494 | ||
495 | /* set the NS2501 power state */ | 495 | /* set the NS2501 power state */ |
496 | static void ns2501_dpms(struct intel_dvo_device *dvo, int mode) | 496 | static void ns2501_dpms(struct intel_dvo_device *dvo, bool enable) |
497 | { | 497 | { |
498 | bool ok; | 498 | bool ok; |
499 | bool restore = false; | 499 | bool restore = false; |
500 | struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); | 500 | struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv); |
501 | unsigned char ch; | 501 | unsigned char ch; |
502 | 502 | ||
503 | DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %d\n", | 503 | DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to %i\n", |
504 | __FUNCTION__, mode); | 504 | __FUNCTION__, enable); |
505 | 505 | ||
506 | ch = ns->reg_8_shadow; | 506 | ch = ns->reg_8_shadow; |
507 | 507 | ||
508 | if (mode == DRM_MODE_DPMS_ON) | 508 | if (enable) |
509 | ch |= NS2501_8_PD; | 509 | ch |= NS2501_8_PD; |
510 | else | 510 | else |
511 | ch &= ~NS2501_8_PD; | 511 | ch &= ~NS2501_8_PD; |
@@ -519,12 +519,10 @@ static void ns2501_dpms(struct intel_dvo_device *dvo, int mode) | |||
519 | ok &= ns2501_writeb(dvo, NS2501_REG8, ch); | 519 | ok &= ns2501_writeb(dvo, NS2501_REG8, ch); |
520 | ok &= | 520 | ok &= |
521 | ns2501_writeb(dvo, 0x34, | 521 | ns2501_writeb(dvo, 0x34, |
522 | (mode == | 522 | enable ? 0x03 : 0x00); |
523 | DRM_MODE_DPMS_ON) ? (0x03) : (0x00)); | ||
524 | ok &= | 523 | ok &= |
525 | ns2501_writeb(dvo, 0x35, | 524 | ns2501_writeb(dvo, 0x35, |
526 | (mode == | 525 | enable ? 0xff : 0x00); |
527 | DRM_MODE_DPMS_ON) ? (0xff) : (0x00)); | ||
528 | if (!ok) { | 526 | if (!ok) { |
529 | if (restore) | 527 | if (restore) |
530 | restore_dvo(dvo); | 528 | restore_dvo(dvo); |