sync update for panning: fixes at least NM2160 glitches

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7694 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen
2004-05-31 20:27:36 +00:00
parent 11690ebdad
commit 499683d565
2 changed files with 12 additions and 4 deletions
@@ -469,8 +469,8 @@ status_t nm_crtc_set_display_start(uint32 startadd,uint8 bpp)
LOG(2,("CRTC: frameRAM: $%08x\n",si->framebuffer));
LOG(2,("CRTC: framebuffer: $%08x\n",si->fbc.frame_buffer));
/* make sure we are in retrace, because otherwise distortions might occur
* during our reprogramming them (no double buffering) (verified on NM2160) */
/* make sure we _just_ left retrace, because otherwise distortions might occur
* during our reprogramming (no double buffering) (verified on NM2160) */
/* we might have no retraces during setmode! So:
* wait 25mS max. for retrace to occur (refresh > 40Hz) */
@@ -480,6 +480,13 @@ status_t nm_crtc_set_display_start(uint32 startadd,uint8 bpp)
snooze(4);
timeout++;
}
/* now wait until retrace ends (with timeout) */
timeout = 0;
while ((ISARB(INSTAT1) & 0x08) && (timeout < (25000/4)))
{
snooze(4);
timeout++;
}
/* set standard VGA registers */
/* (startadress in 32bit words (b2 - b17) */
@@ -419,7 +419,7 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
/* 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. */
* needed (confirmed 15 and 16 bit spaces) to minimize this. */
//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;
@@ -525,7 +525,8 @@ status_t nm_general_validate_pic_size (display_mode *target, uint32 *bytes_per_r
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). */
* because on lower acc_masks more 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;