diff --git a/src/add-ons/accelerants/matrox/InitAccelerant.c b/src/add-ons/accelerants/matrox/InitAccelerant.c index 8cce08a7d2..faa4938f5e 100644 --- a/src/add-ons/accelerants/matrox/InitAccelerant.c +++ b/src/add-ons/accelerants/matrox/InitAccelerant.c @@ -4,7 +4,7 @@ Other authors: Mark Watson, - Rudolf Cornelissen 10/2002-1/2004. + Rudolf Cornelissen 10/2002-2/2004. */ #define MODULE_BIT 0x00800000 @@ -114,7 +114,7 @@ status_t INIT_ACCELERANT(int the_fd) { if (result != B_OK) goto error0; // LOG now available: !NULL si - /* signal CRTC2 DPMS on G450/G550 which connector to program (before powerup) */ + /* assume G450/G550 signals are connected straight through (before powerup) */ si->crossed_conns = false; /* call the device specific init code */ diff --git a/src/add-ons/accelerants/matrox/SetDisplayMode.c b/src/add-ons/accelerants/matrox/SetDisplayMode.c index c8525c5462..3e13bdb466 100644 --- a/src/add-ons/accelerants/matrox/SetDisplayMode.c +++ b/src/add-ons/accelerants/matrox/SetDisplayMode.c @@ -5,7 +5,7 @@ Other authors: Mark Watson, Apsed, - Rudolf Cornelissen 11/2002-1/2004 + Rudolf Cornelissen 11/2002-2/2004 */ #define MODULE_BIT 0x00200000 diff --git a/src/add-ons/accelerants/matrox/engine/mga_crtc.c b/src/add-ons/accelerants/matrox/engine/mga_crtc.c index c246786d61..217268dbee 100644 --- a/src/add-ons/accelerants/matrox/engine/mga_crtc.c +++ b/src/add-ons/accelerants/matrox/engine/mga_crtc.c @@ -2,7 +2,7 @@ /* Authors: Mark Watson 2/2000, Apsed, - Rudolf Cornelissen 11/2002-1/2004 + Rudolf Cornelissen 11/2002-2/2004 */ #define MODULE_BIT 0x00040000 @@ -315,6 +315,21 @@ status_t gx00_crtc_dpms(bool display, bool h, bool v) // MIL2 VGAW_I(CRTC,0x17,0xC3); VGAW_I(CRTC,0x14,0x00); + /* make sure CRTC1 sync is patched through on connector on G450/G550! */ + if (si->ps.card_type >= G450) + { + if (si->crossed_conns) + { + /* patch through HD15 hsync and vsync unmodified */ + DXIW(SYNCCTRL, (DXIR(SYNCCTRL) & 0x0f)); + } + else + { + /* patch through DVI-A hsync and vsync unmodified */ + DXIW(SYNCCTRL, (DXIR(SYNCCTRL) & 0xf0)); + } + } + return B_OK; } diff --git a/src/add-ons/accelerants/matrox/engine/mga_general.c b/src/add-ons/accelerants/matrox/engine/mga_general.c index aba4db1e48..97b49c77db 100644 --- a/src/add-ons/accelerants/matrox/engine/mga_general.c +++ b/src/add-ons/accelerants/matrox/engine/mga_general.c @@ -1,7 +1,7 @@ /* Authors: Mark Watson 12/1999, Apsed, - Rudolf Cornelissen 10/2002-1/2004 + Rudolf Cornelissen 10/2002-2/2004 */ #define MODULE_BIT 0x00008000 @@ -54,7 +54,7 @@ status_t gx00_general_powerup() status_t status; uint32 card_class; - LOG(1,("POWERUP: Matrox (open)BeOS Accelerant 0.16-1 running.\n")); + LOG(1,("POWERUP: Matrox (open)BeOS Accelerant 0.16-2 running.\n")); /* detect card type and power it up */ switch(CFGR(DEVID)) @@ -603,6 +603,17 @@ status_t g450_general_powerup() /* log the PINS struct settings */ dump_pins(); +//test: +//gx50_general_output_select(); + + /* check output connector setup */ + if (si->ps.primary_dvi && si->ps.secondary_head && + si->ps.secondary_tvout && (i2c_sec_tv_adapter() != B_OK)) + { + /* signal CRTC2 DPMS which connector to program or readout */ + si->crossed_conns = true; + } + /* if the user doesn't want a coldstart OR the BIOS pins info could not be found warmstart */ if (si->settings.usebios || (result != B_OK)) return gx00_general_bios_to_powergraphics(); @@ -729,7 +740,8 @@ status_t g450_general_powerup() /*turn on display one*/ gx00_crtc_dpms(true, true, true); - /* enable 'straight-through' sync outputs on both analog output connectors */ + /* enable 'straight-through' sync outputs on both analog output connectors and + * make sure CRTC1 sync outputs are patched through! */ DXIW(SYNCCTRL,0x00); return B_OK; @@ -741,23 +753,29 @@ status_t gx50_general_output_select() if ((si->ps.card_type != G450) && (si->ps.card_type != G550)) return B_ERROR; /* choose primary analog outputconnector */ - if ((si->ps.primary_dvi) && (si->ps.secondary_head) && (si->ps.secondary_tvout)) + if (si->ps.primary_dvi && si->ps.secondary_head && si->ps.secondary_tvout) { if (i2c_sec_tv_adapter() == B_OK) { LOG(4,("INIT: secondary TV-adapter detected, using primary connector\n")); DXIW(OUTPUTCONN,0x01); + /* signal CRTC2 DPMS which connector to program */ + si->crossed_conns = false; } else { LOG(4,("INIT: no secondary TV-adapter detected, using secondary connector\n")); DXIW(OUTPUTCONN,0x04); + /* signal CRTC2 DPMS which connector to program */ + si->crossed_conns = true; } } else { LOG(4,("INIT: using primary connector\n")); DXIW(OUTPUTCONN,0x01); + /* signal CRTC2 DPMS which connector to program */ + si->crossed_conns = false; } return B_OK; } @@ -875,7 +893,8 @@ status_t gx00_general_bios_to_powergraphics() case G550: /* power up everything except DVI electronics (for now) */ DXIW(PWRCTRL,0x1b); - /* enable 'straight-through' sync outputs on both analog output connectors */ + /* enable 'straight-through' sync outputs on both analog output + * connectors and make sure CRTC1 sync outputs are patched through! */ DXIW(SYNCCTRL,0x00); break; default: