completed cursor hardware retrace syncing, confirmed working fully OK on FX5200. Other cards will be tested shortly. Note: this also seems to fix losing screen sync for short bursts with DVI connectors on some DVI encoders.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10646 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2005-01-10 10:38:53 +00:00
parent 57af9fc29e
commit df7dbd1d4e
2 changed files with 21 additions and 18 deletions

View File

@ -663,6 +663,9 @@ status_t nv_crtc2_cursor_init()
/* select 32x32 pixel, 16bit color cursorbitmap, no doublescan */
NV_REG32(NV32_2CURCONF) = 0x02000100;
/* activate hardware-sync between cursor updates and vertical retrace */
DAC2W(NV10_CURSYNC, (DAC2R(NV10_CURSYNC) | 0x02000000));
/* activate hardware cursor */
nv_crtc2_cursor_show();
@ -752,7 +755,7 @@ status_t nv_crtc2_cursor_define(uint8* andMask,uint8* xorMask)
/* position the cursor */
status_t nv_crtc2_cursor_position(uint16 x, uint16 y)
{
uint16 yhigh;
// uint16 yhigh;
/* make sure we are beyond the first line of the cursorbitmap being drawn during
* updating the position to prevent distortions: no double buffering feature */
@ -760,29 +763,29 @@ status_t nv_crtc2_cursor_position(uint16 x, uint16 y)
* we need to return as quick as possible or some apps will exhibit lagging.. */
/* read the old cursor Y position */
yhigh = ((DAC2R(CURPOS) & 0x0fff0000) >> 16);
// yhigh = ((DAC2R(CURPOS) & 0x0fff0000) >> 16);
/* make sure we will wait until we are below both the old and new Y position:
* visible cursorbitmap drawing needs to be done at least... */
if (y > yhigh) yhigh = y;
// if (y > yhigh) yhigh = y;
if (yhigh < (si->dm.timing.v_display - 16))
{
// if (yhigh < (si->dm.timing.v_display - 16))
// {
/* we have vertical lines below old and new cursorposition to spare. So we
* update the cursor postion 'mid-screen', but below that area. */
while (((uint16)(NV_REG32(NV32_RASTER2) & 0x000007ff)) < (yhigh + 16))
{
snooze(10);
}
}
else
{
// while (((uint16)(NV_REG32(NV32_RASTER2) & 0x000007ff)) < (yhigh + 16))
// {
// snooze(10);
// }
// }
// else
// {
/* no room to spare, just wait for retrace (is relatively slow) */
while ((NV_REG32(NV32_RASTER2) & 0x000007ff) < si->dm.timing.v_display)
{
// while ((NV_REG32(NV32_RASTER2) & 0x000007ff) < si->dm.timing.v_display)
// {
/* don't snooze much longer or retrace might get missed! */
snooze(10);
}
}
// snooze(10);
// }
// }
/* update cursorposition */
DAC2W(CURPOS, ((x & 0x0fff) | ((y & 0x0fff) << 16)));

View File

@ -90,7 +90,7 @@ status_t nv_general_powerup()
{
status_t status;
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.32 running.\n"));
LOG(1,("POWERUP: Haiku nVidia Accelerant 0.33 running.\n"));
/* preset no laptop */
si->ps.laptop = false;