xf86-video-intel: Branch 'randr-1.2-rotation' - 3 commits - src/i830_driver.c src/i830_memory.c src/i830_randr.c src/i830_rotate.c src/i830_video.c src/i915_video.c

Zhenyu Wang zhen at kemper.freedesktop.org
Thu Jan 11 11:06:39 EET 2007


 src/i830_driver.c |    5 +----
 src/i830_memory.c |   25 +++++++++++++++----------
 src/i830_randr.c  |    6 +-----
 src/i830_rotate.c |   11 +++--------
 src/i830_video.c  |    5 +----
 src/i915_video.c  |    3 +--
 6 files changed, 22 insertions(+), 33 deletions(-)

New commits:
diff-tree 60a48c17797593d45e7a1bae4886b34bc9080a69 (from fcc351eea41ea579f25bcaede7a63ca3905866b6)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Thu Jan 11 17:10:29 2007 +0800

    clean up log message for mem allocation
    
    show dryrun explicit

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 9806feb..5af9138 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -788,6 +788,9 @@ I830AllocateCursorMemory (ScrnInfoPtr pS
       I830Ptr pI830 = I830PTR(pScrn);
       int cursFlags = 0;
       unsigned long size, alloced;
+      Bool dryrun = ((flags & ALLOCATE_DRY_RUN) != 0);
+      int verbosity = dryrun ? 4 : 1;
+      const char *s = dryrun ? "[dryrun] " : "";
 
       /*
        * Mouse cursor -- The i810-i830 need a physical address in system
@@ -804,16 +807,17 @@ I830AllocateCursorMemory (ScrnInfoPtr pS
 				&(pI830->StolenPool), size,
 				GTT_PAGE_SIZE, flags | cursFlags);
       if (alloced < size) {
-           xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+           if (!dryrun) 
+               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "Failed to allocate HW cursor space.\n");
 	   return FALSE;
       } else {
 	 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-			"Allocated %ld kB for HW cursor at 0x%lx",
+			"%sAllocated %ld kB for HW cursor at 0x%lx\n",s,
 			alloced / 1024, cursor_mem->Start);
 	 if (pI830->CursorNeedsPhysical)
-	    xf86ErrorF(" (0x%08lx)", cursor_mem->Physical);
-	 xf86ErrorF("\n");
+	    xf86ErrorFVerb(verbosity, " (0x%08lx)", cursor_mem->Physical);
+	 xf86ErrorFVerb(verbosity, "\n");
       }
 
       size = HWCURSOR_SIZE_ARGB;
@@ -825,16 +829,17 @@ I830AllocateCursorMemory (ScrnInfoPtr pS
 				&(pI830->StolenPool), size,
 				GTT_PAGE_SIZE, flags | cursFlags);
       if (alloced < size) {
-           xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+           if (!dryrun) 
+               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "Failed to allocate HW (ARGB) cursor space.\n");
 	   return FALSE;
       } else {
 	 xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-			"Allocated %ld kB for HW (ARGB) cursor at 0x%lx",
+			"%sAllocated %ld kB for HW (ARGB) cursor at 0x%lx\n",s,
 			alloced / 1024, cursor_mem_argb->Start);
 	 if (pI830->CursorNeedsPhysical)
-	    xf86ErrorF(" (0x%08lx)", cursor_mem_argb->Physical);
-	 xf86ErrorF("\n");
+	    xf86ErrorFVerb(verbosity, " (0x%08lx)", cursor_mem_argb->Physical);
+	 xf86ErrorFVerb(verbosity, "\n");
       }
 
       return TRUE;
@@ -967,8 +972,8 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, 
 	    }
 	    return FALSE;
 	 } else {
-	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Successful allocation of "
-		       "EXA offscreen memory at 0x%lx, size %ld KB\n",
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%sSuccessful allocation of "
+		       "EXA offscreen memory at 0x%lx, size %ld KB\n",s,
 		       pI830->Offscreen.Start, pI830->Offscreen.Size/1024);
 	 }
       }
diff-tree fcc351eea41ea579f25bcaede7a63ca3905866b6 (from parents)
Merge: 481e96aa2ff987ef20f77b2e3c9f132576228735 5857b4a1693085b8b42dd9560a7c4f5c3c82f862
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Wed Jan 10 15:12:06 2007 +0800

    Merge branch 'modesetting' into randr-1.2-rotation

diff-tree 5857b4a1693085b8b42dd9560a7c4f5c3c82f862 (from ee52c0ec4e95fa6e5f35c9cd75005a0c0003fd97)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Wed Jan 10 15:09:47 2007 +0800

    Formalize sync interface
    
    We should just call i830MarkSync/i830WaitSync in places we need,
    which care for both XAA and EXA.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 2992798..9bc74b5 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3016,10 +3016,7 @@ i830AdjustFrame(int scrnIndex, int x, in
    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 533322b..18f84c4 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 029f439..efa76ed 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 6b76faa..652e73d 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 52fe1a5..591b6f8 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -433,7 +433,6 @@ I915DisplayVideoTextured(ScrnInfoPtr pSc
       ADVANCE_LP_RING();
    }
 
-   if (pI830->AccelInfoRec)
-      pI830->AccelInfoRec->NeedToSync = TRUE;
+   i830MarkSync(pScrn);
 }
 



More information about the xorg-commit mailing list