finalized acc related stuff, did some tidbits, fixed cursor.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7093 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2004-03-28 16:01:54 +00:00
parent be76d636d4
commit 1c8f74d9e8
4 changed files with 23 additions and 16 deletions
@@ -219,15 +219,6 @@ status_t check_acc_capability(uint32 feature)
* memory pitch.. */ * memory pitch.. */
if (si->acc_mode) 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)); LOG(4, ("Acc: Exporting hook %s.\n", msg));
return B_OK; return B_OK;
} }
@@ -3,7 +3,7 @@
This file may be used under the terms of the Be Sample Code License. This file may be used under the terms of the Be Sample Code License.
Other authors for nm driver: Other authors for nm driver:
Rudolf Cornelissen 4/2003-1/2004 Rudolf Cornelissen 4/2003-3/2004
*/ */
#define MODULE_BIT 0x00400000 #define MODULE_BIT 0x00400000
@@ -137,6 +137,13 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con
} }
#endif #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*/ /*find a nearby valid timing from that given*/
result = nm_crtc_validate_timing result = nm_crtc_validate_timing
( (
@@ -1,6 +1,6 @@
/* CTRC functionality */ /* CTRC functionality */
/* Author: /* Author:
Rudolf Cornelissen 4/2003-1/2004 Rudolf Cornelissen 4/2003-3/2004
*/ */
#define MODULE_BIT 0x00040000 #define MODULE_BIT 0x00040000
@@ -602,11 +602,16 @@ status_t nm_crtc_cursor_init()
CR1W(22CURFGCOLOR, 0x00ffffff); CR1W(22CURFGCOLOR, 0x00ffffff);
} }
/*clear cursor*/ /* we must set a valid colordepth to get full RAM access on Neomagic cards:
fb = (uint32 *) si->framebuffer + curadd; * in old pre 8-bit color VGA modes some planemask is in effect apparantly,
for (i=0;i<(1024/4);i++) * 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 */ /* activate hardware cursor */
@@ -47,7 +47,7 @@ status_t nm_general_powerup()
{ {
status_t status; 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 */ /* detect card type and power it up */
switch(CFGR(DEVID)) 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) */ /* enable memory above 256Kb: set b4 (disables adress wraparound at 256Kb boundary) */
ISAGRPHW(FBSTADDE, 0x10); 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 */ /* turn on display */
nm_crtc_dpms(true, true, true); nm_crtc_dpms(true, true, true);