diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-08 11:56:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-04-08 12:17:31 +0100 |
commit | 95374225e865da3a30153f73e8bb536700d15459 (patch) | |
tree | ab8797a6f255a0d76e5d8e7439b8fe4a9b34ca90 /lib/intel_gpu_tools.h | |
parent | cd64e193299be4b9733a5e804cedd99e2072830f (diff) |
Enable compilation on non-Intel, non-DRM systems.
A few of the tools can be performed post-mortem from a different system,
so it is useful to be able to compile those tools on those foreign
systems. Obviously, any program to interact with the PCI device or talk
to GEM will fail on a non-Intel system.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/intel_gpu_tools.h')
-rw-r--r-- | lib/intel_gpu_tools.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/intel_gpu_tools.h b/lib/intel_gpu_tools.h index 259fd9a9..0251031a 100644 --- a/lib/intel_gpu_tools.h +++ b/lib/intel_gpu_tools.h @@ -25,19 +25,18 @@ * */ +#include <stdint.h> #include <sys/types.h> #include <pciaccess.h> -#include "i915_drm.h" -#include "intel_batchbuffer.h" + #include "intel_chipset.h" #include "intel_reg.h" -extern struct pci_device *pci_dev; -extern uint32_t devid; -extern void *mmio; - #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) +extern void *mmio; +void intel_get_mmio(struct pci_device *pci_dev); + static inline uint32_t INREG(uint32_t reg) { @@ -50,10 +49,8 @@ OUTREG(uint32_t reg, uint32_t val) *(volatile uint32_t *)((volatile char *)mmio + reg) = val; } -void intel_get_pci_device(void); -void intel_get_mmio(void); -void intel_get_drm_devid(int fd); -void intel_copy_bo(struct intel_batchbuffer *batch, - drm_intel_bo *dst_bo, drm_intel_bo *src_bo, - int width, int height); +struct pci_device *intel_get_pci_device(void); + +uint32_t intel_get_drm_devid(int fd); + void intel_map_file(char *); |