diff --git a/src/add-ons/accelerants/via/SetDisplayMode.c b/src/add-ons/accelerants/via/SetDisplayMode.c index 135d1998a3..69a6db6967 100644 --- a/src/add-ons/accelerants/via/SetDisplayMode.c +++ b/src/add-ons/accelerants/via/SetDisplayMode.c @@ -51,7 +51,7 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set) uint8 colour_depth1 = 32; // status_t result; uint32 startadd,startadd_right; -// bool display, h, v; + bool display, h, v; // bool crt1, crt2, cross; /* Adjust mode to valid one and fail if invalid */ @@ -81,8 +81,8 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set) interrupt_enable(false); /* find current DPMS state, then turn off screen(s) */ -// head1_dpms_fetch(&display, &h, &v); -// head1_dpms(false, false, false); + head1_dpms_fetch(&display, &h, &v); + head1_dpms(false, false, false); // if (si->ps.secondary_head) head2_dpms(false, false, false); /*where in framebuffer the screen is (should this be dependant on previous MOVEDISPLAY?)*/ @@ -306,7 +306,7 @@ status = B_OK; si->dm = target; /* turn screen one on */ -// head1_dpms(display, h, v); + head1_dpms(display, h, v); /* turn screen two on if a dualhead mode is active */ // if (target.flags & DUALHEAD_BITS) head2_dpms(display,h,v); @@ -447,19 +447,19 @@ status_t SET_DPMS_MODE(uint32 dpms_flags) { switch(dpms_flags) { case B_DPMS_ON: /* H: on, V: on, display on */ -// head1_dpms(true, true, true); + head1_dpms(true, true, true); // if (si->ps.secondary_head) head2_dpms(true, true, true); break; case B_DPMS_STAND_BY: -// head1_dpms(false, false, true); + head1_dpms(false, false, true); // if (si->ps.secondary_head) head2_dpms(false, false, true); break; case B_DPMS_SUSPEND: -// head1_dpms(false, true, false); + head1_dpms(false, true, false); // if (si->ps.secondary_head) head2_dpms(false, true, false); break; case B_DPMS_OFF: /* H: off, V: off, display off */ -// head1_dpms(false, false, false); + head1_dpms(false, false, false); // if (si->ps.secondary_head) head2_dpms(false, false, false); break; default: @@ -473,16 +473,16 @@ status_t SET_DPMS_MODE(uint32 dpms_flags) { switch(dpms_flags) { case B_DPMS_ON: /* H: on, V: on, display on */ -// head1_dpms(true, true, true); + head1_dpms(true, true, true); break; case B_DPMS_STAND_BY: -// head1_dpms(false, false, true); + head1_dpms(false, false, true); break; case B_DPMS_SUSPEND: -// head1_dpms(false, true, false); + head1_dpms(false, true, false); break; case B_DPMS_OFF: /* H: off, V: off, display off */ -// head1_dpms(false, false, false); + head1_dpms(false, false, false); break; default: LOG(8,("SET: Invalid DPMS settings (DH) 0x%08x\n", dpms_flags)); @@ -504,8 +504,7 @@ uint32 DPMS_MODE(void) { bool display, h, v; interrupt_enable(false); -// head1_dpms_fetch(&display, &h, &v); -display = h = v = true; + head1_dpms_fetch(&display, &h, &v); interrupt_enable(true); diff --git a/src/add-ons/accelerants/via/engine/crtc.c b/src/add-ons/accelerants/via/engine/crtc.c index 5e59a90590..a0a5e85046 100644 --- a/src/add-ons/accelerants/via/engine/crtc.c +++ b/src/add-ons/accelerants/via/engine/crtc.c @@ -473,9 +473,6 @@ status_t eng_crtc_dpms(bool display, bool h, bool v) LOG(4,("CRTC: setting DPMS: ")); - /* enable access to primary head */ - set_crtc_owner(0); - /* start synchronous reset: required before turning screen off! */ SEQW(RESET, 0x01); @@ -529,22 +526,22 @@ status_t eng_crtc_dpms(bool display, bool h, bool v) if (h) { - CRTCW(REPAINT1, (CRTCR(REPAINT1) & 0x7f)); + CRTCW(HTIMEXT2, (CRTCR(HTIMEXT2) & 0xef)); LOG(4,("hsync enabled, ")); } else { - CRTCW(REPAINT1, (CRTCR(REPAINT1) | 0x80)); + CRTCW(HTIMEXT2, (CRTCR(HTIMEXT2) | 0x10)); LOG(4,("hsync disabled, ")); } if (v) { - CRTCW(REPAINT1, (CRTCR(REPAINT1) & 0xbf)); + CRTCW(HTIMEXT2, (CRTCR(HTIMEXT2) & 0xdf)); LOG(4,("vsync enabled\n")); } else { - CRTCW(REPAINT1, (CRTCR(REPAINT1) | 0x40)); + CRTCW(HTIMEXT2, (CRTCR(HTIMEXT2) | 0x20)); LOG(4,("vsync disabled\n")); } @@ -553,12 +550,9 @@ status_t eng_crtc_dpms(bool display, bool h, bool v) status_t eng_crtc_dpms_fetch(bool *display, bool *h, bool *v) { - /* enable access to primary head */ - set_crtc_owner(0); - *display = !(SEQR(CLKMODE) & 0x20); - *h = !(CRTCR(REPAINT1) & 0x80); - *v = !(CRTCR(REPAINT1) & 0x40); + *h = !(CRTCR(HTIMEXT2) & 0x10); + *v = !(CRTCR(HTIMEXT2) & 0x20); LOG(4,("CTRC: fetched DPMS state: ")); if (*display) LOG(4,("display on, ")); diff --git a/src/add-ons/accelerants/via/engine/general.c b/src/add-ons/accelerants/via/engine/general.c index 76cf589553..4d046187d0 100644 --- a/src/add-ons/accelerants/via/engine/general.c +++ b/src/add-ons/accelerants/via/engine/general.c @@ -90,7 +90,7 @@ status_t eng_general_powerup() { status_t status; - LOG(1,("POWERUP: Haiku VIA Accelerant 0.04 running.\n")); + LOG(1,("POWERUP: Haiku VIA Accelerant 0.05 running.\n")); /* preset no laptop */ si->ps.laptop = false; @@ -481,8 +481,8 @@ static status_t eng_general_bios_to_powergraphics() } /* turn off both displays and the hardcursors (also disables transfers) */ -// head1_dpms(false, false, false); -// head1_cursor_hide(); + head1_dpms(false, false, false); + head1_cursor_hide(); // if (si->ps.secondary_head) if (0) { @@ -594,7 +594,7 @@ static status_t eng_general_bios_to_powergraphics() eng_agp_setup(); /* turn screen one on */ -// head1_dpms(true, true, true); + head1_dpms(true, true, true); return B_OK; }