From 6967fb7a1c5d1799afd8f456d1b36784e8245bbd Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Thu, 10 Nov 2005 19:19:51 +0000 Subject: [PATCH] fixed a few errors in Proposemode: overriding B_BAD_VALUE is fixed, aborting with B_ERROR for dualhead modes in singlehead only colorspaces is fixed (routine continues with B_BAD_VALUE and in singlehead mode then). Bumped version to 0.21. It's refreshing to look from the Screenprefs app perspective :). Fixes done for 'unofficial prefs panel' Dualhead Setup 0.04 optimum compatibility (will be released soon). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14835 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../accelerants/matrox/ProposeDisplayMode.c | 29 +++++++++++-------- .../accelerants/matrox/engine/mga_general.c | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c index cdf3d0572b..3d80872061 100644 --- a/src/add-ons/accelerants/matrox/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/matrox/ProposeDisplayMode.c @@ -157,6 +157,23 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con } #endif + /* check colorspace versus requested dualhead mode */ + switch (target->space) + { + case B_CMAP8: + case B_RGB15: + /* mode will be made 'outside limits' when dualhead was requested */ + if (target->flags & DUALHEAD_BITS) + { + status = B_BAD_VALUE; + LOG(4, ("PROPOSEMODE: WARNING: Colorspace can't be done in dualhead mode\n")); + } + /* clear dualhead bits if colorspace isn't supported to prevent ProposeMode + * from aborting */ + target->flags &= ~(DUALHEAD_BITS | DUALHEAD_CAPABLE); + break; + } + /*find a nearby valid timing from that given*/ result = gx00_crtc_validate_timing ( @@ -207,10 +224,6 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con { status = B_BAD_VALUE; } - else - { - status = B_OK; - } LOG(4, ("PROPOSEMODE: WARNING: horizontal timing deviates too much\n")); } @@ -232,10 +245,6 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con { status = B_BAD_VALUE; } - else - { - status = B_OK; - } LOG(4, ("PROPOSEMODE: WARNING: vertical timing deviates too much\n")); } @@ -260,10 +269,6 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con { status = B_BAD_VALUE; } - else - { - status = B_OK; - } LOG(4, ("PROPOSEMODE: WARNING: pixelclock deviates too much\n")); } diff --git a/src/add-ons/accelerants/matrox/engine/mga_general.c b/src/add-ons/accelerants/matrox/engine/mga_general.c index 276795e3ce..8f2bca6f4d 100644 --- a/src/add-ons/accelerants/matrox/engine/mga_general.c +++ b/src/add-ons/accelerants/matrox/engine/mga_general.c @@ -54,7 +54,7 @@ status_t gx00_general_powerup() status_t status; uint32 card_class; - LOG(1,("POWERUP: Haiku Matrox Accelerant 0.20 running.\n")); + LOG(1,("POWERUP: Haiku Matrox Accelerant 0.21 running.\n")); /* detect card type and power it up */ switch(CFGR(DEVID))