From b4db97878b038617ba522d49f7963a675a71d5b4 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Fri, 30 Jan 2004 21:47:59 +0000 Subject: [PATCH] fixed CRT monitor detection (both heads) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6436 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/accelerants/nvidia/SetDisplayMode.c | 8 ++++---- src/add-ons/accelerants/nvidia/engine/nv_dac.c | 4 ++-- src/add-ons/accelerants/nvidia/engine/nv_dac2.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/add-ons/accelerants/nvidia/SetDisplayMode.c b/src/add-ons/accelerants/nvidia/SetDisplayMode.c index 6e0a984b61..89ff744aeb 100644 --- a/src/add-ons/accelerants/nvidia/SetDisplayMode.c +++ b/src/add-ons/accelerants/nvidia/SetDisplayMode.c @@ -184,13 +184,13 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set) /*work out where the "right" screen starts*/ startadd_right = startadd + (target.timing.h_display * (colour_depth1 >> 3)); - /* fixme: test... */ - nv_dac_crt_connected(); - nv_dac2_crt_connected(); - /* set the outputs if possible */ if (si->ps.secondary_head) { + /* fixme: test... (do also for singlehead modes!) */ + nv_dac_crt_connected(); + nv_dac2_crt_connected(); + switch (target.flags & DUALHEAD_BITS) { case DUALHEAD_ON: diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac.c b/src/add-ons/accelerants/nvidia/engine/nv_dac.c index 7417835fbc..11019c6928 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac.c @@ -23,8 +23,8 @@ bool nv_dac_crt_connected(void) /* save DAC state */ dac = DACR(TSTCTRL); - /* shut-off DAC */ - DACW(TSTCTRL, (DACR(TSTCTRL) | 0x00010000)); + /* turn on DAC */ + DACW(TSTCTRL, (DACR(TSTCTRL) & 0xfffeffff)); /* select primary head and turn off CRT (and DVI?) outputs */ DACW(OUTPUT, (output & 0x0000feee)); /* wait for signal lines to stabilize */ diff --git a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c index d5038c6301..2a747dcd93 100644 --- a/src/add-ons/accelerants/nvidia/engine/nv_dac2.c +++ b/src/add-ons/accelerants/nvidia/engine/nv_dac2.c @@ -21,14 +21,14 @@ bool nv_dac2_crt_connected() /* save DAC state */ dac = DAC2R(TSTCTRL); - /* shut-off DAC */ - DAC2W(TSTCTRL, (DAC2R(TSTCTRL) | 0x00010000)); + /* turn on DAC2 */ + DAC2W(TSTCTRL, (DAC2R(TSTCTRL) & 0xfffeffff)); /* select primary head and turn off CRT (and DVI?) outputs */ DAC2W(OUTPUT, (output & 0x0000feee)); /* wait for signal lines to stabilize */ snooze(1000); /* re-enable CRT output */ - DAC2W(OUTPUT, (DACR(OUTPUT) | 0x00000001)); + DAC2W(OUTPUT, (DAC2R(OUTPUT) | 0x00000001)); /* setup RGB test signal levels to approx 30% of DAC range and enable them * (NOTE: testsignal function block resides in DAC1 only (!)) */