diff options
author | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2007-01-10 15:09:47 +0800 |
---|---|---|
committer | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2007-01-10 15:09:47 +0800 |
commit | 5857b4a1693085b8b42dd9560a7c4f5c3c82f862 (patch) | |
tree | 4d77e1d04f697bdfddcb40a39de0809c8e0ede9d /src | |
parent | ee52c0ec4e95fa6e5f35c9cd75005a0c0003fd97 (diff) |
Formalize sync interface
We should just call i830MarkSync/i830WaitSync in places we need,
which care for both XAA and EXA.
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_driver.c | 5 | ||||
-rw-r--r-- | src/i830_randr.c | 6 | ||||
-rw-r--r-- | src/i830_rotate.c | 11 | ||||
-rw-r--r-- | src/i830_video.c | 5 | ||||
-rw-r--r-- | src/i915_video.c | 3 |
5 files changed, 7 insertions, 23 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 29927985..9bc74b54 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3016,10 +3016,7 @@ i830AdjustFrame(int scrnIndex, int x, int y, int flags) if (crtc && crtc->enabled) { /* Sync the engine before adjust frame */ - if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) { - (*pI830->AccelInfoRec->Sync)(pScrn); - pI830->AccelInfoRec->NeedToSync = FALSE; - } + i830WaitSync(pScrn); i830PipeSetBase(crtc, output->initial_x + x, output->initial_y + y); } } diff --git a/src/i830_randr.c b/src/i830_randr.c index 533322b2..18f84c49 100644 --- a/src/i830_randr.c +++ b/src/i830_randr.c @@ -627,14 +627,10 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, /* XXX need device-independent mode setting code through an API */ if (changed) { - I830Ptr pI830 = I830PTR(pScrn); crtc->enabled = mode != NULL; /* Sync the engine before adjust mode */ - if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) { - (*pI830->AccelInfoRec->Sync)(pScrn); - pI830->AccelInfoRec->NeedToSync = FALSE; - } + i830WaitSync(pScrn); if (mode) { diff --git a/src/i830_rotate.c b/src/i830_rotate.c index 029f439e..efa76edc 100644 --- a/src/i830_rotate.c +++ b/src/i830_rotate.c @@ -805,10 +805,7 @@ I965UpdateRotate (ScreenPtr pScreen, /* Since we use the same little vertex buffer over and over, sync for * subsequent rectangles. */ - if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) { - (*pI830->AccelInfoRec->Sync)(pScrn); - pI830->AccelInfoRec->NeedToSync = FALSE; - } + i830WaitSync(pScrn); } pbox++; @@ -895,12 +892,10 @@ I965UpdateRotate (ScreenPtr pScreen, ADVANCE_LP_RING(); first_output = FALSE; - if (pI830->AccelInfoRec) - pI830->AccelInfoRec->NeedToSync = TRUE; + i830MarkSync(pScrn); } - if (pI830->AccelInfoRec) - (*pI830->AccelInfoRec->Sync)(pScrn); + i830WaitSync(pScrn); #ifdef XF86DRI if (didLock) I830DRIUnlock(pScrn1); diff --git a/src/i830_video.c b/src/i830_video.c index 6b76faac..652e73d8 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2358,10 +2358,7 @@ I830PutImage(ScrnInfoPtr pScrn, * acceleration to finish before writing the new video data into * framebuffer. */ - if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) { - (*pI830->AccelInfoRec->Sync)(pScrn); - pI830->AccelInfoRec->NeedToSync = FALSE; - } + i830WaitSync(pScrn); } switch (id) { diff --git a/src/i915_video.c b/src/i915_video.c index 52fe1a51..591b6f82 100644 --- a/src/i915_video.c +++ b/src/i915_video.c @@ -433,7 +433,6 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, ADVANCE_LP_RING(); } - if (pI830->AccelInfoRec) - pI830->AccelInfoRec->NeedToSync = TRUE; + i830MarkSync(pScrn); } |