From 4f4721f1b8a76a0bf9938e3c614ba7166d5f3dab Mon Sep 17 00:00:00 2001 From: Arthur Huillet Date: Wed, 25 Jul 2007 22:23:37 +0200 Subject: removed pointless sleep in notifier wait --- src/nv_notifier.c | 36 ------------------------------------ src/nv_video.c | 8 ++++---- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/src/nv_notifier.c b/src/nv_notifier.c index 866ebf8..70a7fcc 100644 --- a/src/nv_notifier.c +++ b/src/nv_notifier.c @@ -130,39 +130,3 @@ NVNotifierWaitStatus(ScrnInfoPtr pScrn, return FALSE; } -Bool -NVNotifierWaitStatusSleep(ScrnInfoPtr pScrn, - struct drm_nouveau_notifier_alloc *notifier, - unsigned int status, unsigned int timeout) -{ - NOTIFIER(n); - unsigned int t_start, time = 0; - - t_start = GetTimeInMillis(); - while (time <= timeout) { -#if 0 - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "N(0x%08x)/%d = 0x%08x/0x%08x/0x%08x/0x%08x\n", - notifier->handle, time, n[0], n[1], n[2], n[3]); -#endif - if (n[NV_NOTIFY_STATE/4] & NV_NOTIFY_STATE_ERROR_CODE_MASK) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Notifier returned error: 0x%04x\n", - NVNotifierErrorCode(pScrn, notifier)); - return FALSE; - } - - if ((n[NV_NOTIFY_STATE/4] >> NV_NOTIFY_STATE_STATUS_SHIFT) - == status) - return TRUE; - - if (timeout) - time = GetTimeInMillis() - t_start; - sched_yield(); - } - - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Notifier (0x%08x) timeout!\n", notifier->handle); - return FALSE; -} - diff --git a/src/nv_video.c b/src/nv_video.c index bff7168..45ab72f 100644 --- a/src/nv_video.c +++ b/src/nv_video.c @@ -1170,7 +1170,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, NVDmaNext (pNv, 0); NVDmaKickoff(pNv); - if (!NVNotifierWaitStatusSleep(pScrn, pNv->Notifier0, 0, 0)) + if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0)) return FALSE; } else @@ -1190,12 +1190,12 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, NV10_IMAGE_BLIT_NOTIFY, 1); NVDmaNext (pNv, 0); NVDmaStart(pNv, NvSubScaledImage, 0x100, 1); - NVDmaNext (pNv, 0); - + NVDmaNext (pNv, 106); + NVDmaStart(pNv, NvSubScaledImage, NV04_SCALED_IMAGE_FROM_MEMORY_DMA_IMAGE, 1); NVDmaNext (pNv, NvDmaFB); /* source object */ NVDmaKickoff(pNv); - if (!NVNotifierWaitStatusSleep(pScrn, pNv->Notifier0, 0, 0)) + if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0)) return FALSE; return Success; } -- cgit v1.2.1