NM2070 virtualspaces restrictions updates
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7643 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
19d139a450
commit
28ea1ff2ad
@ -47,7 +47,7 @@ status_t nm_general_powerup()
|
||||
{
|
||||
status_t status;
|
||||
|
||||
LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-10 running.\n"));
|
||||
LOG(1,("POWERUP: Neomagic (open)BeOS Accelerant 0.06-11 running.\n"));
|
||||
|
||||
/* detect card type and power it up */
|
||||
switch(CFGR(DEVID))
|
||||
@ -409,20 +409,41 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
|
||||
* (Note: Don't mix this up with CRTC timing contraints! Those are
|
||||
* multiples of 8 for horizontal, 1 for vertical timing.)
|
||||
*
|
||||
* CRTC pitch constraints are the same for all Neomagic cards */
|
||||
switch (target->space)
|
||||
* CRTC pitch constraints are 'officially' the same for all Neomagic cards */
|
||||
switch (si->ps.card_type)
|
||||
{
|
||||
case B_CMAP8: crtc_mask = 0x07; depth = 8; break;
|
||||
case B_RGB15: crtc_mask = 0x03; depth = 16; break;
|
||||
case B_RGB16: crtc_mask = 0x03; depth = 16; break;
|
||||
case B_RGB24: crtc_mask = 0x07; depth = 24; break;
|
||||
default:
|
||||
LOG(8,("INIT: unsupported colorspace: 0x%08x\n", target->space));
|
||||
return B_ERROR;
|
||||
case NM2070:
|
||||
switch (target->space)
|
||||
{
|
||||
case B_CMAP8: crtc_mask = 0x07; depth = 8; break;
|
||||
/* Note for NM2070 only:
|
||||
* The following depths have bandwidth trouble (pixel noise) with the
|
||||
* 'official' crtc_masks (used as defaults below). Masks of 0x1f are
|
||||
* needed (confirmed 15 and 16 bit spaces) to prevent this from occuring. */
|
||||
//fixme: doublecheck for NM2090 and NM2093: correct code if needed!
|
||||
case B_RGB15: crtc_mask = 0x1f; depth = 16; break;
|
||||
case B_RGB16: crtc_mask = 0x1f; depth = 16; break;
|
||||
case B_RGB24: crtc_mask = 0x1f; depth = 24; break;
|
||||
default:
|
||||
LOG(8,("INIT: unsupported colorspace: 0x%08x\n", target->space));
|
||||
return B_ERROR;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
switch (target->space)
|
||||
{
|
||||
case B_CMAP8: crtc_mask = 0x07; depth = 8; break;
|
||||
case B_RGB15: crtc_mask = 0x03; depth = 16; break;
|
||||
case B_RGB16: crtc_mask = 0x03; depth = 16; break;
|
||||
case B_RGB24: crtc_mask = 0x07; depth = 24; break;
|
||||
default:
|
||||
LOG(8,("INIT: unsupported colorspace: 0x%08x\n", target->space));
|
||||
return B_ERROR;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* check if we can setup this mode with acceleration:
|
||||
* constraints are same for all cards */
|
||||
/* check if we can setup this mode with acceleration: */
|
||||
*acc_mode = true;
|
||||
|
||||
switch (si->ps.card_type)
|
||||
@ -439,12 +460,21 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
|
||||
}
|
||||
|
||||
/* virtual_width */
|
||||
if (target->virtual_width > 1600) *acc_mode = false;
|
||||
if (si->ps.card_type == NM2070)
|
||||
{
|
||||
/* confirmed NM2070 */
|
||||
if (target->virtual_width > 1024) *acc_mode = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* confirmed for all cards */
|
||||
if (target->virtual_width > 1600) *acc_mode = false;
|
||||
}
|
||||
|
||||
/* virtual_height */
|
||||
if (si->ps.card_type < NM2200)
|
||||
{
|
||||
/* confirmed NM2097 and NM2160 */
|
||||
/* confirmed NM2070, NM2097 and NM2160 */
|
||||
if (target->virtual_height > 1024) *acc_mode = false;
|
||||
}
|
||||
else
|
||||
@ -483,66 +513,89 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
|
||||
/* OK, now we know that virtual_width is valid, and it's needing no slopspace if
|
||||
* it was confined above, so we can finally calculate safely if we need slopspace
|
||||
* for this mode... */
|
||||
/* note:
|
||||
* we prefer unaccelerated modes above accelerated ones if not enough RAM exists
|
||||
* and the mode can be closer matched to the requested one if unaccelerated. */
|
||||
if (*acc_mode)
|
||||
{
|
||||
uint32 mem_avail, bytes_X_height;
|
||||
if (si->ps.card_type == NM2070)
|
||||
{
|
||||
uint32 acc_mask = 0;
|
||||
|
||||
/* calculate amount of available memory */
|
||||
mem_avail = (si->ps.memory_size * 1024);
|
||||
if (si->settings.hardcursor) mem_avail -= si->ps.curmem_size;
|
||||
/* helper */
|
||||
bytes_X_height = (depth >> 3) * target->virtual_height;
|
||||
|
||||
/* Accelerated modes work with a table, there are very few fixed settings.. */
|
||||
if (target->virtual_width == 640) video_pitch = 640;
|
||||
else
|
||||
if (target->virtual_width <= 800)
|
||||
/* determine pixel multiple based on 2D engine constraints */
|
||||
switch (target->space)
|
||||
{
|
||||
if (((800 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (800 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 800;
|
||||
case B_CMAP8: acc_mask = 0x07; break;
|
||||
/* Note:
|
||||
* The following depths have actual acc_masks of 0x03. 0x1f is used
|
||||
* because on lower acc_masks bandwidth trouble arises (pixel noise). */
|
||||
//fixme: doublecheck for NM2090 and NM2093: correct code if needed!
|
||||
case B_RGB15: acc_mask = 0x1f; break;
|
||||
case B_RGB16: acc_mask = 0x1f; break;
|
||||
}
|
||||
video_pitch = ((target->virtual_width + acc_mask) & ~acc_mask);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Note:
|
||||
* We prefer unaccelerated modes above accelerated ones here if not enough
|
||||
* RAM exists and the mode can be closer matched to the requested one if
|
||||
* unaccelerated. We do this because of the large amount of slopspace
|
||||
* sometimes needed here to keep a mode accelerated. */
|
||||
|
||||
uint32 mem_avail, bytes_X_height;
|
||||
|
||||
/* calculate amount of available memory */
|
||||
mem_avail = (si->ps.memory_size * 1024);
|
||||
if (si->settings.hardcursor) mem_avail -= si->ps.curmem_size;
|
||||
/* helper */
|
||||
bytes_X_height = (depth >> 3) * target->virtual_height;
|
||||
|
||||
/* Accelerated modes work with a table, there are very few fixed settings.. */
|
||||
if (target->virtual_width == 640) video_pitch = 640;
|
||||
else
|
||||
if (target->virtual_width <= 1024)
|
||||
if (target->virtual_width <= 800)
|
||||
{
|
||||
if (((1024 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1024 - crtc_mask)))
|
||||
if (((800 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (800 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 1024;
|
||||
video_pitch = 800;
|
||||
}
|
||||
else
|
||||
if (target->virtual_width <= 1152)
|
||||
if (target->virtual_width <= 1024)
|
||||
{
|
||||
if (((1152 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1152 - crtc_mask)))
|
||||
if (((1024 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1024 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 1152;
|
||||
video_pitch = 1024;
|
||||
}
|
||||
else
|
||||
if (target->virtual_width <= 1280)
|
||||
if (target->virtual_width <= 1152)
|
||||
{
|
||||
if (((1280 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1280 - crtc_mask)))
|
||||
if (((1152 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1152 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 1280;
|
||||
video_pitch = 1152;
|
||||
}
|
||||
else
|
||||
if (target->virtual_width <= 1600)
|
||||
if (target->virtual_width <= 1280)
|
||||
{
|
||||
if (((1600 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1600 - crtc_mask)))
|
||||
if (((1280 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1280 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 1600;
|
||||
video_pitch = 1280;
|
||||
}
|
||||
else
|
||||
if (target->virtual_width <= 1600)
|
||||
{
|
||||
if (((1600 * bytes_X_height) > mem_avail) &&
|
||||
(target->virtual_width < (1600 - crtc_mask)))
|
||||
*acc_mode = false;
|
||||
else
|
||||
video_pitch = 1600;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!*acc_mode)
|
||||
video_pitch = ((target->virtual_width + crtc_mask) & ~crtc_mask);
|
||||
|
@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<p><h2>Changes done for each driverversion:</h2></p>
|
||||
<p><h1>head (0.06-10, Rudolf)</h1></p>
|
||||
<p><h1>head (0.06-11, Rudolf)</h1></p>
|
||||
<ul>
|
||||
<li>Updated modelist to include one more suggested mode for 800x600 resolution: Done by Andrew Bachmann;
|
||||
<li>CRTC timing restriction checking updated: Modelists exported adhere to every cards max. CRTC capability now: the oldest cards support upto and including 1024x1000, while the newest cards support upto and including 1280x1024 resolution;
|
||||
@ -15,7 +15,7 @@
|
||||
<li>Updated acceleration for massive speedup compared to Be driver (now running at approx 200-2000% depending on use!);
|
||||
<li>Fixed acceleration on rectangle fills and inverts: nolonger executing zero-width commands (which the app_server gives to the driver sometimes!) so no more big-time distortion stripes onscreen! (the Be driver does exhibit this fault BTW);
|
||||
<li>Updated hardware cursor to be placed elsewhere in cardRAM (acc engine requirement); distorted mousepointers could be fixed by this also on some cards outthere;
|
||||
<li>Updated workspace virtualsize restrictions for accelerated modes. Confirmed that the MagicGraph series (pre NM2200) engines can do upto and including 1600x1024 resolution. Assuming MagicMedia series (NM2200 and later) can do upto and including 1600x2048 for now. Modes above these resolutions are unaccelerated;
|
||||
<li>Updated workspace virtualsize restrictions for accelerated modes. Confirmed that the MagicGraph series (pre NM2200) engines can do upto and including 1600x1024 resolution except NM2070 which can do upto and including 1024x1024. Assuming MagicMedia series (NM2200 and later) can do upto and including 1600x2048 for now. Modes above these resolutions are unaccelerated;
|
||||
<li>Removed register area cloning bug in accelerant that prevented it from working with NM2070, NM2090 and NM2093 cards at all!
|
||||
<li>Added various fixes to get Dell Latitude XPi (NM2070) working on it's panel, probably fixes various faults on other cards as well;
|
||||
<li>Updated pixelPLL restrictions for NM2070 so external output refresh is OK.
|
||||
|
Loading…
x
Reference in New Issue
Block a user