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

George Sapountzis gsap7 at kemper.freedesktop.org
Mon Feb 5 19:30:47 EET 2007


 src/aticonfig.c  |   10 +---------
 src/atipreinit.c |   39 ++++++++++++++++++---------------------
 src/atiprint.c   |   17 +++--------------
 src/atividmem.c  |   19 +------------------
 4 files changed, 23 insertions(+), 62 deletions(-)

New commits:
diff-tree d876889add41c8052d4f3feaa21ddf384f5a7054 (from 2c8b33b761e4411451aea1eea3a89d629aeea40d)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Tue Nov 21 04:47:06 2006 +0200

    Drop non-PCI support from atividmem.c
    
    - we require a PCI device (pVideo != NULL)
    - map the VGA framebuffer with xf86MapDomainMemory()

diff --git a/src/atividmem.c b/src/atividmem.c
index 99560f5..b1a7a8d 100644
--- a/src/atividmem.c
+++ b/src/atividmem.c
@@ -183,12 +183,8 @@ ATIMapApertures
          * No relocation, resizing, caching or write-combining of this
          * aperture is supported.  Hence, the hard-coded values here...
          */
-        if (pVideo)
-            pATI->pBank = xf86MapPciMem(iScreen, VIDMEM_MMIO,
+            pATI->pBank = xf86MapDomainMemory(iScreen, VIDMEM_MMIO_32BIT,
                 Tag, 0x000A0000U, 0x00010000U);
-        else
-            pATI->pBank = xf86MapVidMem(iScreen, VIDMEM_MMIO,
-                0x000A0000U, 0x00010000U);
 
         if (!pATI->pBank)
             return FALSE;
@@ -201,12 +197,8 @@ ATIMapApertures
     /* Map linear aperture */
     if (pATI->LinearBase)
     {
-        if (pVideo)
             pATI->pMemory = xf86MapPciMem(iScreen, VIDMEM_FRAMEBUFFER,
                 Tag, pATI->LinearBase, pATI->LinearSize);
-        else
-            pATI->pMemory = xf86MapVidMem(iScreen, VIDMEM_FRAMEBUFFER,
-                pATI->LinearBase, pATI->LinearSize);
 
         if (!pATI->pMemory)
         {
@@ -237,7 +229,6 @@ ATIMapApertures
          * Map the little-endian aperture (used for video, etc.).  Note that
          * caching of this area is _not_ wanted.
          */
-        if (pVideo)
         {
             pATI->pMemoryLE = xf86MapPciMem(iScreen, VIDMEM_MMIO, Tag,
                 pATI->LinearBase - 0x00800000U, pATI->LinearSize);
@@ -266,12 +257,8 @@ ATIMapApertures
     {
         unsigned long MMIOBase = pATI->Block0Base & ~(PageSize - 1);
 
-        if (pVideo)
             pATI->pMMIO = xf86MapPciMem(iScreen, VIDMEM_MMIO,
                 Tag, MMIOBase, PageSize);
-        else
-            pATI->pMMIO = xf86MapVidMem(iScreen, VIDMEM_MMIO,
-                MMIOBase, PageSize);
 
         if (!pATI->pMMIO)
         {
@@ -321,12 +308,8 @@ ATIMapApertures
     {
         unsigned long CursorBase = pATI->CursorBase & ~(PageSize - 1);
 
-        if (pVideo)
             pATI->pCursorPage = xf86MapPciMem(iScreen, VIDMEM_FRAMEBUFFER,
                 Tag, CursorBase, PageSize);
-        else
-            pATI->pCursorPage = xf86MapVidMem(iScreen, VIDMEM_FRAMEBUFFER,
-                CursorBase, PageSize);
 
         if (!pATI->pCursorPage)
         {
diff-tree 2c8b33b761e4411451aea1eea3a89d629aeea40d (from a659b7235332e19659c56cc9d7af362bd8885a29)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Tue Nov 21 04:51:02 2006 +0200

    Minor refactoring of pATI->Block0Base computation.

diff --git a/src/atipreinit.c b/src/atipreinit.c
index b9111fc..62c32bb 100644
--- a/src/atipreinit.c
+++ b/src/atipreinit.c
@@ -400,22 +400,6 @@ ATIPreInit
         return TRUE;
     }
 
-    pATI->Block0Base = 0;       /* Might no longer be valid */
-    if ((pVideo = pATI->PCIInfo))
-    {
-        if (pATI->CPIODecoding == BLOCK_IO)
-            pATI->CPIOBase = pVideo->ioBase[1];
-
-        /* Set MMIO address from PCI configuration space, if available */
-        if ((pATI->Block0Base = pVideo->memBase[2]))
-        {
-            if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
-                pATI->Block0Base = 0;
-            else
-                pATI->Block0Base += 0x0400U;
-        }
-    }
-
 #ifdef AVOID_CPIO
 
     pScreenInfo->racMemFlags =
@@ -438,16 +422,29 @@ ATIPreInit
 
     /* Finish probing the adapter */
     {
+
+        if (pATI->CPIODecoding == BLOCK_IO)
+            pATI->CPIOBase = pVideo->ioBase[1];
+
+        /* Set MMIO address from PCI configuration space, if available */
+        if ((pATI->Block0Base = pVideo->memBase[2]))
+        {
+            if (pATI->Block0Base >= (CARD32)(-1 << pVideo->size[2]))
+                pATI->Block0Base = 0;
+            else
+                pATI->Block0Base += 0x0400U;
+        }
+
+            Block0Base = pATI->Block0Base; /* save */
+
             do
             {
                 /*
                  * Find and mmap() MMIO area.  Allow only auxiliary aperture if
                  * it exists.
                  */
-                if (!(Block0Base = pATI->Block0Base))
+                if (!pATI->Block0Base)
                 {
-                    if (pVideo)
-                    {
                         /* Check tail end of linear (8MB or 4MB) aperture */
                         if ((pATI->Block0Base = pVideo->memBase[0]))
                         {
@@ -461,7 +458,6 @@ ATIPreInit
                             if (pATI->pBlock[0])
                                 break;
                         }
-                    }
 
                     /* Check VGA MMIO aperture */
                     pATI->Block0Base = 0x000BFC00U;
@@ -469,7 +465,8 @@ ATIPreInit
 
                 ATIMach64Map(pScreenInfo->scrnIndex, pATI);
             } while (0);
-            pATI->Block0Base = Block0Base;
+
+            pATI->Block0Base = Block0Base; /* restore */
 
 #ifdef AVOID_CPIO
 
diff-tree a659b7235332e19659c56cc9d7af362bd8885a29 (from 9d77aabdff919360f0c9333105436c31f1f5749a)
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Sun Feb 4 11:28:54 2007 +0200

    Cleanup checks for pATI->PCIInfo.
    
    Fixes a bug where shadowfb would not be enabled by default in the non-accel
    case because pATI->PCIInfo is now set after ATIProcessOptions() is called.

diff --git a/src/aticonfig.c b/src/aticonfig.c
index 988edfd..37cc9cd 100644
--- a/src/aticonfig.c
+++ b/src/aticonfig.c
@@ -168,15 +168,7 @@ ATIProcessOptions
 
     ReferenceClock = ((double)157500000.0) / ((double)11.0);
 
-#ifndef AVOID_CPIO
-
-    if (pATI->PCIInfo)
-
-#endif /* AVOID_CPIO */
-
-    {
-        ShadowFB = TRUE;
-    }
+    ShadowFB = TRUE;
 
     Blend = PanelDisplay = TRUE;
 #ifdef XF86DRI_DEVEL
diff --git a/src/atiprint.c b/src/atiprint.c
index 243dcf5..d435e21 100644
--- a/src/atiprint.c
+++ b/src/atiprint.c
@@ -355,8 +355,8 @@ ATIPrintRegisters
     ATIPtr pATI
 )
 {
-    pciVideoPtr  pVideo;
-    pciConfigPtr pPCI;
+    pciVideoPtr  pVideo = pATI->PCIInfo;
+    pciConfigPtr pPCI = pVideo->thisCard;
     int          Index;
     CARD32       lcd_index, tv_out_index, lcd_gen_ctrl;
     CARD8        dac_read, dac_mask, dac_write;
@@ -638,9 +638,7 @@ ATIPrintRegisters
 
 #endif /* AVOID_CPIO */
 
-    if ((pVideo = pATI->PCIInfo))
     {
-        pPCI = pVideo->thisCard;
         xf86ErrorFVerb(4, "\n\n PCI configuration register values:");
         for (Index = 0;  Index < 256;  Index+= 4)
         {
@@ -661,18 +659,9 @@ ATIPrintRegisters
     else
         xf86ErrorFVerb(4, "\n No banked aperture.");
 
-    if (pATI->pMemory == pATI->pBank)
-    {
-        xf86ErrorFVerb(4, "\n No linear aperture.\n");
-    }
-    else
-
-#else /* AVOID_CPIO */
-
-    if (pATI->pMemory)
-
 #endif /* AVOID_CPIO */
 
+    if (pATI->pMemory)
     {
         xf86ErrorFVerb(4, "\n Linear aperture at %p.\n", pATI->pMemory);
     }



More information about the xorg-commit mailing list