summaryrefslogtreecommitdiff
path: root/src/intel_driver.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-08 13:59:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-08 13:59:55 +0100
commitc139e2fb95f2db0b39aadcd58cc63b316a278951 (patch)
treea3ddbf756e480d3d00e93e73d16d2ffeeb19e507 /src/intel_driver.h
parent57c48e4973ac0dad09744eaa82315a5f023094e7 (diff)
intel: Store pointer to struct intel_device
Beware the barbarians at the gate, who invade and steal your ScrnInfoPtr and its Entity from underneath you. In some configurations, we lose access to the struct intel_device stored on the Entity after initialisation, causing havoc. Workaround this by storing the intel_device that we open in our driverPrivate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_driver.h')
-rw-r--r--src/intel_driver.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/intel_driver.h b/src/intel_driver.h
index 13e26886..f3eb90a2 100644
--- a/src/intel_driver.h
+++ b/src/intel_driver.h
@@ -117,23 +117,24 @@ struct xf86_platform_device;
struct intel_device_info {
int gen;
};
+struct intel_device;
int intel_entity_get_devid(int index);
-void intel_detect_chipset(ScrnInfoPtr scrn, EntityInfoPtr ent);
-
int intel_open_device(int entity_num,
const struct pci_device *pci,
struct xf86_platform_device *dev);
int __intel_peek_fd(ScrnInfoPtr scrn);
-int intel_has_render_node(ScrnInfoPtr scrn);
-int intel_get_device(ScrnInfoPtr scrn);
-const char *intel_get_client_name(ScrnInfoPtr scrn);
-int intel_get_client_fd(ScrnInfoPtr scrn);
-int intel_get_device_id(ScrnInfoPtr scrn);
-int intel_get_master(ScrnInfoPtr scrn);
-int intel_put_master(ScrnInfoPtr scrn);
-void intel_put_device(ScrnInfoPtr scrn);
+struct intel_device *intel_get_device(ScrnInfoPtr scrn, int *fd);
+int intel_has_render_node(struct intel_device *dev);
+const char *intel_get_client_name(struct intel_device *dev);
+int intel_get_client_fd(struct intel_device *dev);
+int intel_get_device_id(struct intel_device *dev);
+int intel_get_master(struct intel_device *dev);
+int intel_put_master(struct intel_device *dev);
+void intel_put_device(struct intel_device *dev);
+
+void intel_detect_chipset(ScrnInfoPtr scrn, struct intel_device *dev);
#define IS_DEFAULT_ACCEL_METHOD(x) ({ \
enum { NOACCEL, SNA, UXA, GLAMOR } default_accel_method__ = DEFAULT_ACCEL_METHOD; \