summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2008-07-18 17:38:52 +0200
committerEgbert Eich <eich@freedesktop.org>2008-07-18 17:38:52 +0200
commit3bc154bf768c281258064474ee414aa002d8ad90 (patch)
treeee720829a8c7e4000dff448140bdbb50e641f964
parent3ac5a2f54efc27bfa0a859a03706328aeeb517a4 (diff)
ID: Remove concept of chipset families.
The family concept was only used in two places to identify RS690 chipsets.
-rw-r--r--src/rhd.h20
-rw-r--r--src/rhd_ddia.c2
-rw-r--r--src/rhd_i2c.c2
-rw-r--r--src/rhd_id.c70
4 files changed, 15 insertions, 79 deletions
diff --git a/src/rhd.h b/src/rhd.h
index a163a14..1a71eef 100644
--- a/src/rhd.h
+++ b/src/rhd.h
@@ -93,25 +93,6 @@ enum RHD_CHIPSETS {
RHD_CHIP_END
};
-enum RHD_FAMILIES {
- RHD_FAMILY_UNKNOWN = 0,
- RHD_FAMILY_RV515,
- RHD_FAMILY_R520,
- RHD_FAMILY_RV530,
- RHD_FAMILY_RV560,
- RHD_FAMILY_RV570,
- RHD_FAMILY_R580,
- RHD_FAMILY_RS690,
- RHD_FAMILY_R600,
- RHD_FAMILY_RV610,
- RHD_FAMILY_RV630,
- RHD_FAMILY_RV670,
- RHD_FAMILY_RV620,
- RHD_FAMILY_RV635,
- RHD_FAMILY_RS780,
- RHD_FAMILY_RV770
-};
-
enum RHD_HPD_USAGE {
RHD_HPD_USAGE_AUTO = 0,
RHD_HPD_USAGE_OFF,
@@ -355,7 +336,6 @@ extern void _RHDWritePLL(int scrnIndex, CARD16 offset, CARD32 data);
extern unsigned int RHDAllocFb(RHDPtr rhdPtr, unsigned int size, const char *name);
/* rhd_id.c */
-enum RHD_FAMILIES RHDFamily(enum RHD_CHIPSETS chipset);
Bool RHDIsIGP(enum RHD_CHIPSETS chipset);
/* rhd_helper.c */
diff --git a/src/rhd_ddia.c b/src/rhd_ddia.c
index 0bf2c32..e67673a 100644
--- a/src/rhd_ddia.c
+++ b/src/rhd_ddia.c
@@ -340,7 +340,7 @@ RHDDDIAInit(RHDPtr rhdPtr, enum rhdOutputType outputType)
* This needs to be handled separately
* for now we only deal with it here.
*/
- if (RHDFamily(rhdPtr->ChipSet) != RHD_FAMILY_RS690)
+ if (rhdPtr->ChipSet < RHD_RS600 || rhdPtr->ChipSet >= RHD_RS740)
return FALSE;
Output = xnfcalloc(sizeof(struct rhdOutput), 1);
diff --git a/src/rhd_i2c.c b/src/rhd_i2c.c
index 2342e78..552a69e 100644
--- a/src/rhd_i2c.c
+++ b/src/rhd_i2c.c
@@ -1175,7 +1175,7 @@ rhdInitI2C(int scrnIndex)
I2CPtr->scrnIndex = scrnIndex;
if (rhdPtr->ChipSet < RHD_RS600)
I2CPtr->I2CWriteRead = rhd5xxWriteRead;
- else if (RHDFamily(rhdPtr->ChipSet) == RHD_FAMILY_RS690)
+ else if (rhdPtr->ChipSet >= RHD_RS600 && rhdPtr->ChipSet <= RHD_RS740)
I2CPtr->I2CWriteRead = rhdRS69WriteRead;
else if (rhdPtr->ChipSet < RHD_RV620)
I2CPtr->I2CWriteRead = rhd6xxWriteRead;
diff --git a/src/rhd_id.c b/src/rhd_id.c
index 29ba7f3..5e0932e 100644
--- a/src/rhd_id.c
+++ b/src/rhd_id.c
@@ -285,49 +285,12 @@ const PCI_ID_LIST = {
LIST_END
};
-static struct rhdChipsetMapStruct {
- enum RHD_FAMILIES family;
- Bool IGP;
-} rhdChipsetMap[] = {
- { RHD_FAMILY_UNKNOWN, 0 }, /* RHD_UNKNOWN */
- { RHD_FAMILY_RV515, 0 }, /* RHD_RV505 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_RV515 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_RV516 */
- { RHD_FAMILY_R520, 0 }, /* RHD_R520 */
- { RHD_FAMILY_RV530, 0 }, /* RHD_RV530 */
- { RHD_FAMILY_RV530, 0 }, /* RHD_RV535 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_RV550 */
- { RHD_FAMILY_RV560, 0 }, /* RHD_RV560 */
- { RHD_FAMILY_RV570, 0 }, /* RHD_RV570 */
- { RHD_FAMILY_R580, 0 }, /* RHD_R580 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_M52 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_M54 */
- { RHD_FAMILY_RV530, 0 }, /* RHD_M56 */
- { RHD_FAMILY_R520, 0 }, /* RHD_M58 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_M62 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_M64 */
- { RHD_FAMILY_RV530, 0 }, /* RHD_M66 */
- { RHD_FAMILY_R580, 0 }, /* RHD_M68 */
- { RHD_FAMILY_RV515, 0 }, /* RHD_M71 */
- { RHD_FAMILY_RS690, 1 }, /* RHD_RS600 */
- { RHD_FAMILY_RS690, 1 }, /* RHD_RS690 */
- { RHD_FAMILY_RS690, 1 }, /* RHD_RS740 */
- { RHD_FAMILY_R600, 0 }, /* RHD_R600 */
- { RHD_FAMILY_RV610, 0 }, /* RHD_RV610 */
- { RHD_FAMILY_RV630, 0 }, /* RHD_RV630 */
- { RHD_FAMILY_RV610, 0 }, /* RHD_M72 */
- { RHD_FAMILY_RV610, 0 }, /* RHD_M74 */
- { RHD_FAMILY_RV630, 0 }, /* RHD_M76 */
- { RHD_FAMILY_RV670, 0 }, /* RHD_RV670 */
- { RHD_FAMILY_RV670, 0 }, /* RHD_M88 */
- { RHD_FAMILY_RV670, 0 }, /* RHD_R680 */
- { RHD_FAMILY_RV620, 0 }, /* RHD_RV620 */
- { RHD_FAMILY_RV620, 0 }, /* RHD_M82 */
- { RHD_FAMILY_RV635, 0 }, /* RHD_RV635 */
- { RHD_FAMILY_RV635, 0 }, /* RHD_M86 */
- { RHD_FAMILY_RS780, 1 }, /* RHD_RS780 */
- { RHD_FAMILY_RV770, 0 } /* RHD_RV770 */
- /* RHD_CHIP_END */
+static enum RHD_CHIPSETS rhdIGPChipsetList[] = {
+ RHD_RS690,
+ RHD_RS690,
+ RHD_RS690,
+ RHD_RS780,
+ RHD_UNKNOWN /* end marker */
};
/*
@@ -392,23 +355,16 @@ RHDIdentify(int flags)
/*
*
*/
-enum RHD_FAMILIES
-RHDFamily(enum RHD_CHIPSETS chipset)
-{
- ASSERT(chipset < sizeof(rhdChipsetMap)/sizeof(struct rhdChipsetMapStruct));
-
- return rhdChipsetMap[chipset].family;
-}
-
-/*
- *
- */
Bool
RHDIsIGP(enum RHD_CHIPSETS chipset)
{
- ASSERT(chipset < sizeof(rhdChipsetMap)/sizeof(struct rhdChipsetMapStruct));
-
- return rhdChipsetMap[chipset].IGP;
+ int i = 0;
+ while (rhdIGPChipsetList[i] != RHD_UNKNOWN) {
+ if (chipset == (rhdIGPChipsetList[i]))
+ return TRUE;
+ i++;
+ }
+ return FALSE;
}
/*