summaryrefslogtreecommitdiff
path: root/intel/intel_chipset.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-12-20 13:10:36 -0800
committerEric Anholt <eric@anholt.net>2011-12-29 16:43:27 -0800
commit078bc5b6ee24ea786c465f5e29dcb8b0d2f81b2e (patch)
tree46e1417339ff138d642fe2db539613bb1a81b6fd /intel/intel_chipset.h
parent8c4a2c884846caca517b49e2026661e57924d9e1 (diff)
intel: Make intel_chipset handle devid directly.
This will make these macros reusable from intel_decode.c, which doesn't have a bufmgr_gem context, without faking the struct. We should generally only be using these macros from bufmgr_gem context setup anyway. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net>
Diffstat (limited to 'intel/intel_chipset.h')
-rw-r--r--intel/intel_chipset.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/intel/intel_chipset.h b/intel/intel_chipset.h
index b4e0747e..5d417dab 100644
--- a/intel/intel_chipset.h
+++ b/intel/intel_chipset.h
@@ -28,22 +28,22 @@
#ifndef _INTEL_CHIPSET_H
#define _INTEL_CHIPSET_H
-#define IS_830(dev) ((dev)->pci_device == 0x3577)
-#define IS_845(dev) ((dev)->pci_device == 0x2562)
-#define IS_85X(dev) ((dev)->pci_device == 0x3582)
-#define IS_865(dev) ((dev)->pci_device == 0x2572)
+#define IS_830(dev) (dev == 0x3577)
+#define IS_845(dev) (dev == 0x2562)
+#define IS_85X(dev) (dev == 0x3582)
+#define IS_865(dev) (dev == 0x2572)
#define IS_GEN2(dev) (IS_830(dev) || \
IS_845(dev) || \
IS_85X(dev) || \
IS_865(dev))
-#define IS_915G(dev) ((dev)->pci_device == 0x2582 || \
- (dev)->pci_device == 0x258a)
-#define IS_915GM(dev) ((dev)->pci_device == 0x2592)
-#define IS_945G(dev) ((dev)->pci_device == 0x2772)
-#define IS_945GM(dev) ((dev)->pci_device == 0x27A2 || \
- (dev)->pci_device == 0x27AE)
+#define IS_915G(dev) (dev == 0x2582 || \
+ dev == 0x258a)
+#define IS_915GM(dev) (dev == 0x2592)
+#define IS_945G(dev) (dev == 0x2772)
+#define IS_945GM(dev) (dev == 0x27A2 || \
+ dev == 0x27AE)
#define IS_915(dev) (IS_915G(dev) || \
IS_915GM(dev))
@@ -53,44 +53,44 @@
IS_G33(dev) || \
IS_PINEVIEW(dev))
-#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
- (dev)->pci_device == 0x29B2 || \
- (dev)->pci_device == 0x29D2)
+#define IS_G33(dev) (dev == 0x29C2 || \
+ dev == 0x29B2 || \
+ dev == 0x29D2)
-#define IS_PINEVIEW(dev) ((dev)->pci_device == 0xa001 || \
- (dev)->pci_device == 0xa011)
+#define IS_PINEVIEW(dev) (dev == 0xa001 || \
+ dev == 0xa011)
#define IS_GEN3(dev) (IS_915(dev) || \
IS_945(dev) || \
IS_G33(dev) || \
IS_PINEVIEW(dev))
-#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02)
+#define IS_I965GM(dev) (dev == 0x2A02)
-#define IS_GEN4(dev) ((dev)->pci_device == 0x2972 || \
- (dev)->pci_device == 0x2982 || \
- (dev)->pci_device == 0x2992 || \
- (dev)->pci_device == 0x29A2 || \
- (dev)->pci_device == 0x2A02 || \
- (dev)->pci_device == 0x2A12 || \
- (dev)->pci_device == 0x2A42 || \
- (dev)->pci_device == 0x2E02 || \
- (dev)->pci_device == 0x2E12 || \
- (dev)->pci_device == 0x2E22 || \
- (dev)->pci_device == 0x2E32 || \
- (dev)->pci_device == 0x2E42 || \
- (dev)->pci_device == 0x0042 || \
- (dev)->pci_device == 0x0046 || \
+#define IS_GEN4(dev) (dev == 0x2972 || \
+ dev == 0x2982 || \
+ dev == 0x2992 || \
+ dev == 0x29A2 || \
+ dev == 0x2A02 || \
+ dev == 0x2A12 || \
+ dev == 0x2A42 || \
+ dev == 0x2E02 || \
+ dev == 0x2E12 || \
+ dev == 0x2E22 || \
+ dev == 0x2E32 || \
+ dev == 0x2E42 || \
+ dev == 0x0042 || \
+ dev == 0x0046 || \
IS_I965GM(dev) || \
IS_G4X(dev))
-#define IS_GM45(dev) ((dev)->pci_device == 0x2A42)
+#define IS_GM45(dev) (dev == 0x2A42)
-#define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \
- (dev)->pci_device == 0x2E12 || \
- (dev)->pci_device == 0x2E22 || \
- (dev)->pci_device == 0x2E32 || \
- (dev)->pci_device == 0x2E42 || \
+#define IS_G4X(dev) (dev == 0x2E02 || \
+ dev == 0x2E12 || \
+ dev == 0x2E22 || \
+ dev == 0x2E32 || \
+ dev == 0x2E42 || \
IS_GM45(dev))
#define IS_9XX(dev) (IS_GEN3(dev) || \