diff --git a/src/via_outputs.c b/src/via_outputs.c index e7f2ab7..e4632d7 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -869,16 +869,16 @@ via_dvi_dpms(xf86OutputPtr output, int mode) switch (mode) { case DPMSModeOn: - viaTMDSPower(pScrn, TRUE); + via_vt1632_power(pScrn, TRUE); break; - case DPMSModeStandby: case DPMSModeSuspend: case DPMSModeOff: - viaTMDSPower(pScrn, FALSE); + via_vt1632_power(pScrn, FALSE); + break; + default: break; } - } static void diff --git a/src/via_vt1632.c b/src/via_vt1632.c index 0d6b662..ff3e3e0 100644 --- a/src/via_vt1632.c +++ b/src/via_vt1632.c @@ -65,7 +65,7 @@ via_vt1632_dump_registers(ScrnInfoPtr pScrn, I2CDevPtr pDev) void -via_vt1632_power(xf86OutputPtr output, BOOL on) +via_vt1632_power(xf86OutputPtr output, Bool powerState) { struct ViaVT1632PrivateData * Private = output->driver_private; ScrnInfoPtr pScrn = output->scrn; @@ -73,14 +73,11 @@ via_vt1632_power(xf86OutputPtr output, BOOL on) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered via_vt1632_power.\n")); - if (on == TRUE) { - xf86I2CMaskByte(Private->VT1632I2CDev, 0x08, 0x01, 0x01); - } else { - xf86I2CMaskByte(Private->VT1632I2CDev, 0x08, 0x00, 0x01); - } + xf86I2CMaskByte(Private->VT1632I2CDev, 0x08, powerState ? 0x01 : 0x00, 0x01); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "VT1632A Power: %s\n", + powerState ? "On" : "Off"); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VT1632A: Power %s.\n", - on ? "On" : "Off"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting via_vt1632_power.\n")); } diff --git a/src/via_vt1632.h b/src/via_vt1632.h index 535bf17..fa28dce 100644 --- a/src/via_vt1632.h +++ b/src/via_vt1632.h @@ -42,7 +42,7 @@ struct ViaVT1632PrivateData { CARD8 Register0C; }; -void via_vt1632_power(xf86OutputPtr output, BOOL on); +void via_vt1632_power(xf86OutputPtr output, Bool powerState); void via_vt1632_save(xf86OutputPtr output); void via_vt1632_restore(xf86OutputPtr output); int via_vt1632_mode_valid(xf86OutputPtr output, DisplayModePtr pMode);