summaryrefslogtreecommitdiff
path: root/lib/intel_chipset.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-22 14:54:28 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-22 14:54:28 +0100
commitaed95c390ae834a1661fb1e4ec433177b1c01fcc (patch)
tree87fd16b091b495b4eb353160f6b8c4000312085b /lib/intel_chipset.h
parent94e1b6af99b3548014686a0943bb286e3c81a889 (diff)
lib: consolidate chipset helpers in intel_chipset.[hc]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/intel_chipset.h')
-rw-r--r--lib/intel_chipset.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
index 7ce09008..f50056f2 100644
--- a/lib/intel_chipset.h
+++ b/lib/intel_chipset.h
@@ -28,6 +28,27 @@
#ifndef _INTEL_CHIPSET_H
#define _INTEL_CHIPSET_H
+#include <sys/types.h>
+#include <pciaccess.h>
+
+struct pci_device *intel_get_pci_device(void);
+uint32_t intel_get_drm_devid(int fd);
+int intel_gen(uint32_t devid);
+
+extern enum pch_type pch;
+enum pch_type {
+ PCH_NONE,
+ PCH_IBX,
+ PCH_CPT,
+ PCH_LPT,
+};
+
+void intel_check_pch(void);
+
+#define HAS_IBX (pch == PCH_IBX)
+#define HAS_CPT (pch == PCH_CPT)
+#define HAS_LPT (pch == PCH_LPT)
+
#define PCI_CHIP_I810 0x7121
#define PCI_CHIP_I810_DC100 0x7123
#define PCI_CHIP_I810_E 0x7125