diff --git a/src/add-ons/accelerants/neomagic/GetAccelerantHook.c b/src/add-ons/accelerants/neomagic/GetAccelerantHook.c index 4a11f88bdb..d547a9832f 100644 --- a/src/add-ons/accelerants/neomagic/GetAccelerantHook.c +++ b/src/add-ons/accelerants/neomagic/GetAccelerantHook.c @@ -219,15 +219,6 @@ status_t check_acc_capability(uint32 feature) * memory pitch.. */ if (si->acc_mode) { - /* see if we support hardware rectangle fills in the current mode: - * the Matrox card's acc engine can adress upto 16Mbyte memory for this cmd! */ - if (fill && - ((si->fbc.bytes_per_row * si->dm.virtual_height) > (16 * 1024 * 1024))) - { - LOG(4, ("Acc: Not exporting hook %s.\n", msg)); - return B_ERROR; - } - LOG(4, ("Acc: Exporting hook %s.\n", msg)); return B_OK; } diff --git a/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c b/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c index 092684a543..459b196a3b 100644 --- a/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c +++ b/src/add-ons/accelerants/neomagic/ProposeDisplayMode.c @@ -3,7 +3,7 @@ This file may be used under the terms of the Be Sample Code License. Other authors for nm driver: - Rudolf Cornelissen 4/2003-1/2004 + Rudolf Cornelissen 4/2003-3/2004 */ #define MODULE_BIT 0x00400000 @@ -137,6 +137,13 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con } #endif + /* NM2070 cannot do 24 bit color */ + if ((si->ps.card_type == NM2070) && (target->space == B_RGB24_LITTLE)) + { + LOG(4, ("PROPOSEMODE: 24bit color not supported on NM2070, aborted.\n")); + return B_ERROR; + } + /*find a nearby valid timing from that given*/ result = nm_crtc_validate_timing ( diff --git a/src/add-ons/accelerants/neomagic/engine/nm_crtc.c b/src/add-ons/accelerants/neomagic/engine/nm_crtc.c index 678bc2475b..4ad7d9b3a0 100644 --- a/src/add-ons/accelerants/neomagic/engine/nm_crtc.c +++ b/src/add-ons/accelerants/neomagic/engine/nm_crtc.c @@ -1,6 +1,6 @@ /* CTRC functionality */ /* Author: - Rudolf Cornelissen 4/2003-1/2004 + Rudolf Cornelissen 4/2003-3/2004 */ #define MODULE_BIT 0x00040000 @@ -602,11 +602,16 @@ status_t nm_crtc_cursor_init() CR1W(22CURFGCOLOR, 0x00ffffff); } - /*clear cursor*/ - fb = (uint32 *) si->framebuffer + curadd; - for (i=0;i<(1024/4);i++) + /* we must set a valid colordepth to get full RAM access on Neomagic cards: + * in old pre 8-bit color VGA modes some planemask is in effect apparantly, + * allowing access only to every 7th and 8th RAM byte across the entire RAM. */ + nm_crtc_depth(BPP8); + + /* clear cursor: so we need full RAM access! */ + fb = ((uint32 *)(((uint32)si->framebuffer) + curadd)); + for (i = 0; i < (1024/4); i++) { - fb[i]=0; + fb[i] = 0; } /* activate hardware cursor */ diff --git a/src/add-ons/accelerants/neomagic/engine/nm_general.c b/src/add-ons/accelerants/neomagic/engine/nm_general.c index 0d0bf40173..c85dfcc0d2 100644 --- a/src/add-ons/accelerants/neomagic/engine/nm_general.c +++ b/src/add-ons/accelerants/neomagic/engine/nm_general.c @@ -47,7 +47,7 @@ status_t nm_general_powerup() { status_t status; - LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-4 running.\n")); + LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-5 running.\n")); /* detect card type and power it up */ switch(CFGR(DEVID)) @@ -351,6 +351,10 @@ status_t nm_general_bios_to_powergraphics() /* enable memory above 256Kb: set b4 (disables adress wraparound at 256Kb boundary) */ ISAGRPHW(FBSTADDE, 0x10); + /* this speeds up RAM writes according to XFree driver */ +// fixme: don't touch until more is known: part of RAM or CORE PLL??? +// ISAGRPHW(SPEED, 0xc0); + /* turn on display */ nm_crtc_dpms(true, true, true);