xf86-video-ati: Branch 'master' - 2 commits

Michel Daenzer daenzer at kemper.freedesktop.org
Fri Dec 7 00:49:51 PST 2007


 src/radeon_driver.c |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 5896ca4097d439f59f90f397939132c061c3c364
Author: LisaWu <liswu at ati.com>
Date:   Fri Dec 7 09:45:05 2007 +0100

    radeon: Use %u instead of %d for unsigned value.

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9bf46ef..50f78eb 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1064,7 +1064,7 @@ static void RADEONGetClockInfo(ScrnInfoPtr pScrn)
     }
 
     xf86DrvMsg (pScrn->scrnIndex, X_INFO,
-		"PLL parameters: rf=%d rd=%d min=%d max=%d; xclk=%d\n",
+		"PLL parameters: rf=%u rd=%u min=%u max=%u; xclk=%u\n",
 		pll->reference_freq,
 		pll->reference_div,
 		(unsigned)pll->min_pll_freq, (unsigned)pll->max_pll_freq,
commit df44f8380268c27d3978c4e91d736f093322b8b8
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Fri Dec 7 09:41:47 2007 +0100

    radeon: Use gettimeofday instead of xf86getsecs.

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 3422b66..9bf46ef 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -90,7 +90,6 @@
 
 				/* X and server generic header files */
 #include "xf86.h"
-#include "xf86_ansic.h"		/* For xf86getsecs() */
 #include "xf86_OSproc.h"
 #include "xf86RAC.h"
 #include "xf86RandR12.h"
@@ -805,8 +804,8 @@ static Bool RADEONProbePLLParameters(ScrnInfoPtr pScrn)
     unsigned xclk, tmp, ref_div;
     int hTotal, vTotal, num, denom, m, n;
     float hz, prev_xtal, vclk, xtal, mpll, spll;
-    long start_secs, start_usecs, stop_secs, stop_usecs, total_usecs;
-    long to1_secs, to1_usecs, to2_secs, to2_usecs;
+    long total_usecs;
+    struct timeval start, stop, to1, to2;
     unsigned int f1, f2, f3;
     int tries = 0;
 
@@ -816,32 +815,32 @@ static Bool RADEONProbePLLParameters(ScrnInfoPtr pScrn)
     if (++tries > 10)
            goto failed;
 
-    xf86getsecs(&to1_secs, &to1_usecs);
+    gettimeofday(&to1, NULL);
     f1 = INREG(RADEON_CRTC_CRNT_FRAME);
     for (;;) {
        f2 = INREG(RADEON_CRTC_CRNT_FRAME);
        if (f1 != f2)
 	    break;
-       xf86getsecs(&to2_secs, &to2_usecs);
-       if ((to2_secs - to1_secs) > 1) {
+       gettimeofday(&to2, NULL);
+       if ((to2.tv_sec - to1.tv_sec) > 1) {
            xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Clock not counting...\n");
            goto failed;
        }
     }
-    xf86getsecs(&start_secs, &start_usecs);
+    gettimeofday(&start, NULL);
     for(;;) {
        f3 = INREG(RADEON_CRTC_CRNT_FRAME);
        if (f3 != f2)
 	    break;
-       xf86getsecs(&to2_secs, &to2_usecs);
-       if ((to2_secs - start_secs) > 1)
+       gettimeofday(&to2, NULL);
+       if ((to2.tv_sec - start.tv_sec) > 1)
            goto failed;
     }
-    xf86getsecs(&stop_secs, &stop_usecs);
+    gettimeofday(&stop, NULL);
 
-    if ((stop_secs - start_secs) != 0)
+    if ((stop.tv_sec - start.tv_sec) != 0)
            goto again;
-    total_usecs = abs(stop_usecs - start_usecs);
+    total_usecs = abs(stop.tv_usec - start.tv_usec);
     if (total_usecs == 0)
            goto again;
     hz = 1000000.0/(float)total_usecs;


More information about the xorg-commit mailing list