diff --git a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c index c5c6b3949b..18eb9e8944 100644 --- a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c @@ -4,7 +4,7 @@ Other authors for MGA driver: Mark Watson, - Rudolf Cornelissen 9/2002-11/2005 + Rudolf Cornelissen 9/2002-1/2006 */ #define MODULE_BIT 0x00400000 @@ -418,7 +418,14 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con break; } - /* if not TVout capable card clear TVout flags */ + /* TVout can only be done if the interface cable is connected */ + if ((i2c_sec_tv_adapter() != B_OK) && (target->flags & TV_CAPABLE)) + { + target->flags &= ~TV_CAPABLE; + LOG(1, ("PROPOSEMODE: blocking TVout: no TVout cable connected!\n")); + } + + /* if not TVout capable card and mode clear TVout flags */ if (!(target->flags & TV_CAPABLE)) { target->flags &= ~TV_BITS; diff --git a/src/add-ons/accelerants/matrox/SetDisplayMode.c b/src/add-ons/accelerants/matrox/SetDisplayMode.c index f4286a801d..79cace1b33 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-11/2005 + Rudolf Cornelissen 11/2002-1/2006 */ #define MODULE_BIT 0x00200000 @@ -16,7 +16,8 @@ Enable/Disable interrupts. Just a wrapper around the ioctl() to the kernel driver. */ -static void interrupt_enable(bool flag) { +static void interrupt_enable(bool flag) +{ status_t result; gx00_set_bool_state sbs; @@ -92,14 +93,6 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set) LOG(1,("SETMODE: setting DUALHEAD mode\n")); - /* validate flags for secondary TVout */ - if ((i2c_sec_tv_adapter() != B_OK) && (target2.flags & TV_BITS)) - { - target.flags &= ~TV_BITS;//still needed for some routines... - target2.flags &= ~TV_BITS; - LOG(1,("SETMODE: blocking TVout: no TVout cable connected!\n")); - } - /* set the pixel clock PLL(s) */ LOG(8,("SETMODE: target clock %dkHz\n",target.timing.pixel_clock)); if (gx00_dac_set_pix_pll(target) == B_ERROR)