updated acc engine workspace size restrictions.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7095 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2004-03-28 20:31:43 +00:00
parent b6e8c7e83d
commit 43ad155f45
2 changed files with 24 additions and 5 deletions
@@ -105,9 +105,19 @@ status_t nm_acc_init()
* workaround: place cursor bitmap at _end_ of cardRAM instead of in _beginning_. */ * workaround: place cursor bitmap at _end_ of cardRAM instead of in _beginning_. */
/* setup clipping */ /* setup clipping */
si->engine.control |= (1 << 26); /* note:
ACCW(CLIPLT, 0); * on NM2160 the max acc engine width of 1600 pixels can be programmed, but
ACCW(CLIPRB, ((si->dm.virtual_height << 16) | (si->dm.virtual_width & 0x0000ffff))); * the max. height is only 1023 pixels (height register holds just 10 bits)!
* note also:
* while the vertical clipping feature can do upto and including 1023 pixels,
* the engine itself can do upto and including 1024 pixels vertically.
* So:
* Don't use the engine's clipping feature as we want to get the max out of the
* engine. We won't export the acc hooks for modes beyond the acc engine's
* capabilities. */
// si->engine.control |= (1 << 26);
// ACCW(CLIPLT, 0);
// ACCW(CLIPRB, ((si->dm.virtual_height << 16) | (si->dm.virtual_width & 0x0000ffff)));
return B_OK; return B_OK;
} }
@@ -47,7 +47,7 @@ status_t nm_general_powerup()
{ {
status_t status; status_t status;
LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-5 running.\n")); LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-6 running.\n"));
/* detect card type and power it up */ /* detect card type and power it up */
switch(CFGR(DEVID)) switch(CFGR(DEVID))
@@ -415,7 +415,16 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
if (target->virtual_width > 1600) *acc_mode = false; if (target->virtual_width > 1600) *acc_mode = false;
/* virtual_height */ /* virtual_height */
if (si->ps.card_type < NM2200)
{
/* confirmed NM2097 and NM2160 */
if (target->virtual_height > 1024) *acc_mode = false;
}
else
{
/* fixme: needs confirmation, assuming this height will still work.. */
if (target->virtual_height > 2048) *acc_mode = false; if (target->virtual_height > 2048) *acc_mode = false;
}
/* now check virtual_size based on CRTC constraints and modify if needed */ /* now check virtual_size based on CRTC constraints and modify if needed */
//fixme: checkout cardspecs here!! (NM2160 can do 8192 _bytes_ at least (in theory)) //fixme: checkout cardspecs here!! (NM2160 can do 8192 _bytes_ at least (in theory))