xf86-video-ati: Branch 'kms-only'

Dave Airlie airlied at kemper.freedesktop.org
Fri Jun 15 10:56:03 PDT 2012


 src/radeon.h     |    7 -------
 src/radeon_kms.c |   40 ----------------------------------------
 2 files changed, 47 deletions(-)

New commits:
commit 81593e7deb688fa3108a0589c1418459ec0df4de
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jun 15 18:52:52 2012 +0100

    radeon: drop cardType shouldn't matter to userspace.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/radeon.h b/src/radeon.h
index 21f950b..b7d67de 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -253,12 +253,6 @@ typedef struct {
 	(info->ChipFamily == CHIP_FAMILY_RS300) || \
 	(info->ChipFamily == CHIP_FAMILY_R200))
 
-typedef enum {
-	CARD_PCI,
-	CARD_AGP,
-	CARD_PCIE
-} RADEONCardType;
-
 struct radeon_exa_pixmap_priv {
     struct radeon_bo *bo;
     uint32_t tiling_flags;
@@ -443,7 +437,6 @@ typedef struct {
     RADEONFBLayout    CurrentLayout;
 
     Bool              directRenderingEnabled;
-    RADEONCardType    cardType;            /* Current card is a PCI card */
     struct radeon_dri2  dri2;
     Bool              accelDFS;
 
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index f9d4178..274f7dd 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -334,7 +334,6 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn)
 static Bool RADEONPreInitChipType_KMS(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info   = RADEONPTR(pScrn);
-    uint32_t cmd_stat;
     int i;
 
     info->Chipset = PCI_DEV_DEVICE_ID(info->PciInfo);
@@ -364,45 +363,6 @@ static Bool RADEONPreInitChipType_KMS(ScrnInfoPtr pScrn)
 	}
     }
 
-    info->cardType = CARD_PCI;
-
-    PCI_READ_LONG(info->PciInfo, &cmd_stat, PCI_CMD_STAT_REG);
-    if (cmd_stat & RADEON_CAP_LIST) {
-	uint32_t cap_ptr, cap_id;
-
-	PCI_READ_LONG(info->PciInfo, &cap_ptr, RADEON_CAPABILITIES_PTR_PCI_CONFIG);
-	cap_ptr &= RADEON_CAP_PTR_MASK;
-
-	while(cap_ptr != RADEON_CAP_ID_NULL) {
-	    PCI_READ_LONG(info->PciInfo, &cap_id, cap_ptr);
-	    if ((cap_id & 0xff)== RADEON_CAP_ID_AGP) {
-		info->cardType = CARD_AGP;
-		break;
-	    }
-	    if ((cap_id & 0xff)== RADEON_CAP_ID_EXP) {
-		info->cardType = CARD_PCIE;
-		break;
-	    }
-	    cap_ptr = (cap_id >> 8) & RADEON_CAP_PTR_MASK;
-	}
-    }
-
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s card detected\n",
-	       (info->cardType==CARD_PCI) ? "PCI" :
-		(info->cardType==CARD_PCIE) ? "PCIE" : "AGP");
-
-    /* treat PCIE IGP cards as PCI */
-    if (info->cardType == CARD_PCIE && info->IsIGP)
-	info->cardType = CARD_PCI;
-
-    if ((info->ChipFamily >= CHIP_FAMILY_R600) && info->IsIGP)
-	info->cardType = CARD_PCIE;
-
-    /* not sure about gart table requirements */
-    if ((info->ChipFamily == CHIP_FAMILY_RS600) && info->IsIGP)
-	info->cardType = CARD_PCIE;
-
 #ifdef RENDER
     info->RenderAccel = xf86ReturnOptValBool(info->Options, OPTION_RENDER_ACCEL,
 					     info->Chipset != PCI_CHIP_RN50_515E &&


More information about the xorg-commit mailing list