summaryrefslogtreecommitdiff
path: root/src/mga.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-10-27 11:48:35 -0700
committerIan Romanick <idr@us.ibm.com>2006-10-27 11:48:35 -0700
commit19d950e61b2b33052e52c33add8e70c29ac9d766 (patch)
treef4b9aed1afe45c52984bf9e7c705d767b08daf2d /src/mga.h
parentd28c4a3307984b86e0f3cc68fa48cdc01e307a7c (diff)
Convert tests of pMga->Chipset to tests of single bit flags.
Several places in the driver contain if-statements that test Chipset against several different values to determine what functionality to use. Some of these tests, HALCHIPSETS in particular, test as many as 6 different values. This bloats the code size unnecessarilly. Instead we cache the results of some of those tests in single bit flags stored in pMga. These changes are similar to some changes in the pci-rework branch.
Diffstat (limited to 'src/mga.h')
-rw-r--r--src/mga.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mga.h b/src/mga.h
index 5297076..6b53d87 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -391,6 +391,11 @@ typedef struct {
xf86AccessRec Access;
int Chipset;
int ChipRev;
+
+ int is_Gx50:1;
+ int is_G200SE:1;
+ int is_HAL_chipset:1;
+
Bool Primary;
Bool Interleave;
int HwBpp;