summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-07-09 16:33:14 -0700
committerIan Romanick <idr@us.ibm.com>2007-07-09 16:33:14 -0700
commit1f4e24b429789710f5d69fc78335f20c023569bb (patch)
treee9cf9a5ea7497a6996aabfce1d642482191e2209 /linux-core
parent7268b65d5ce804713c12b8fadc42f9a086cdfe14 (diff)
Move types shared with user mode to xgi_drm.h.
Diffstat (limited to 'linux-core')
l---------linux-core/xgi_drm.h1
-rw-r--r--linux-core/xgi_drv.h131
2 files changed, 3 insertions, 129 deletions
diff --git a/linux-core/xgi_drm.h b/linux-core/xgi_drm.h
new file mode 120000
index 00000000..677586d7
--- /dev/null
+++ b/linux-core/xgi_drm.h
@@ -0,0 +1 @@
+../shared-core/xgi_drm.h \ No newline at end of file
diff --git a/linux-core/xgi_drv.h b/linux-core/xgi_drv.h
index f1cfa44e..803ed9c1 100644
--- a/linux-core/xgi_drv.h
+++ b/linux-core/xgi_drv.h
@@ -29,6 +29,8 @@
#ifndef _XGI_DRV_H_
#define _XGI_DRV_H_
+#include "xgi_drm.h"
+
#define XGI_MAJOR_VERSION 0
#define XGI_MINOR_VERSION 7
#define XGI_PATCHLEVEL 5
@@ -99,19 +101,6 @@ struct xgi_aperture {
void *vbase;
};
-struct xgi_screen_info {
- unsigned int scrn_start;
- unsigned int scrn_xres;
- unsigned int scrn_yres;
- unsigned int scrn_bpp;
- unsigned int scrn_pitch;
-};
-
-struct xgi_sarea_info {
- unsigned long bus_addr;
- unsigned int size;
-};
-
struct xgi_info {
struct pci_dev *dev;
int flags;
@@ -157,12 +146,6 @@ struct xgi_ioctl_post_vbios {
unsigned int slot;
};
-enum xgi_mem_location {
- XGI_MEMLOC_NON_LOCAL = 0,
- XGI_MEMLOC_LOCAL = 1,
- XGI_MEMLOC_INVALID = 0x7fffffff
-};
-
enum PcieOwner {
PCIE_2D = 0,
/*
@@ -176,61 +159,6 @@ enum PcieOwner {
PCIE_INVALID = 0x7fffffff
};
-struct xgi_mem_alloc {
- unsigned int location;
- unsigned int size;
- unsigned int is_front;
- unsigned int owner;
-
- /**
- * Address of the memory from the graphics hardware's point of view.
- */
- u32 hw_addr;
-
- /**
- * Physical address of the memory from the processor's point of view.
- */
- unsigned long bus_addr;
-};
-
-struct xgi_chip_info {
- u16 device_id;
- u16 vendor_id;
-
- char device_name[32];
- unsigned int curr_display_mode; //Singe, DualView(Contained), MHS
- unsigned int fb_size;
- unsigned long sarea_bus_addr;
- unsigned int sarea_size;
-};
-
-struct xgi_mmio_info {
- unsigned long mmio_base;
- unsigned int size;
-};
-
-enum xgi_batch_type {
- BTYPE_2D = 0,
- BTYPE_3D = 1,
- BTYPE_FLIP = 2,
- BTYPE_CTRL = 3,
- BTYPE_NONE = 0x7fffffff
-};
-
-struct xgi_cmd_info {
- unsigned int _firstBeginType;
- u32 _firstBeginAddr;
- u32 _firstSize;
- u32 _curDebugID;
- u32 _lastBeginAddr;
- unsigned int _beginCount;
-};
-
-struct xgi_state_info {
- unsigned int _fromState;
- unsigned int _toState;
-};
-
struct xgi_mem_pid {
struct list_head list;
enum xgi_mem_location location;
@@ -238,61 +166,6 @@ struct xgi_mem_pid {
unsigned long pid;
};
-/*
- * Ioctl definitions
- */
-
-#define XGI_IOCTL_MAGIC 'x' /* use 'x' as magic number */
-
-#define XGI_IOCTL_BASE 0
-#define XGI_ESC_DEVICE_INFO (XGI_IOCTL_BASE + 0)
-#define XGI_ESC_POST_VBIOS (XGI_IOCTL_BASE + 1)
-
-#define XGI_ESC_FB_INIT (XGI_IOCTL_BASE + 2)
-#define XGI_ESC_FB_ALLOC (XGI_IOCTL_BASE + 3)
-#define XGI_ESC_FB_FREE (XGI_IOCTL_BASE + 4)
-#define XGI_ESC_PCIE_INIT (XGI_IOCTL_BASE + 5)
-#define XGI_ESC_PCIE_ALLOC (XGI_IOCTL_BASE + 6)
-#define XGI_ESC_PCIE_FREE (XGI_IOCTL_BASE + 7)
-#define XGI_ESC_SUBMIT_CMDLIST (XGI_IOCTL_BASE + 8)
-#define XGI_ESC_PUT_SCREEN_INFO (XGI_IOCTL_BASE + 9)
-#define XGI_ESC_GET_SCREEN_INFO (XGI_IOCTL_BASE + 10)
-#define XGI_ESC_GE_RESET (XGI_IOCTL_BASE + 11)
-#define XGI_ESC_SAREA_INFO (XGI_IOCTL_BASE + 12)
-#define XGI_ESC_DUMP_REGISTER (XGI_IOCTL_BASE + 13)
-#define XGI_ESC_DEBUG_INFO (XGI_IOCTL_BASE + 14)
-#define XGI_ESC_TEST_RWINKERNEL (XGI_IOCTL_BASE + 16)
-#define XGI_ESC_STATE_CHANGE (XGI_IOCTL_BASE + 17)
-#define XGI_ESC_MMIO_INFO (XGI_IOCTL_BASE + 18)
-#define XGI_ESC_PCIE_CHECK (XGI_IOCTL_BASE + 19)
-#define XGI_ESC_MEM_COLLECT (XGI_IOCTL_BASE + 20)
-
-#define XGI_IOCTL_DEVICE_INFO _IOR(XGI_IOCTL_MAGIC, XGI_ESC_DEVICE_INFO, struct xgi_chip_info)
-#define XGI_IOCTL_POST_VBIOS _IO(XGI_IOCTL_MAGIC, XGI_ESC_POST_VBIOS)
-
-#define XGI_IOCTL_FB_INIT _IO(XGI_IOCTL_MAGIC, XGI_ESC_FB_INIT)
-#define XGI_IOCTL_FB_ALLOC _IOWR(XGI_IOCTL_MAGIC, XGI_ESC_FB_ALLOC, struct xgi_mem_alloc)
-#define XGI_IOCTL_FB_FREE _IOW(XGI_IOCTL_MAGIC, XGI_ESC_FB_FREE, unsigned long)
-
-#define XGI_IOCTL_PCIE_INIT _IO(XGI_IOCTL_MAGIC, XGI_ESC_PCIE_INIT)
-#define XGI_IOCTL_PCIE_ALLOC _IOWR(XGI_IOCTL_MAGIC, XGI_ESC_PCIE_ALLOC, struct xgi_mem_alloc)
-#define XGI_IOCTL_PCIE_FREE _IOW(XGI_IOCTL_MAGIC, XGI_ESC_PCIE_FREE, unsigned long)
-
-#define XGI_IOCTL_PUT_SCREEN_INFO _IOW(XGI_IOCTL_MAGIC, XGI_ESC_PUT_SCREEN_INFO, struct xgi_screen_info)
-#define XGI_IOCTL_GET_SCREEN_INFO _IOR(XGI_IOCTL_MAGIC, XGI_ESC_GET_SCREEN_INFO, struct xgi_screen_info)
-
-#define XGI_IOCTL_GE_RESET _IO(XGI_IOCTL_MAGIC, XGI_ESC_GE_RESET)
-#define XGI_IOCTL_SAREA_INFO _IOW(XGI_IOCTL_MAGIC, XGI_ESC_SAREA_INFO, struct xgi_sarea_info)
-#define XGI_IOCTL_DUMP_REGISTER _IO(XGI_IOCTL_MAGIC, XGI_ESC_DUMP_REGISTER)
-#define XGI_IOCTL_DEBUG_INFO _IO(XGI_IOCTL_MAGIC, XGI_ESC_DEBUG_INFO)
-#define XGI_IOCTL_MMIO_INFO _IOR(XGI_IOCTL_MAGIC, XGI_ESC_MMIO_INFO, struct xgi_mmio_info)
-
-#define XGI_IOCTL_SUBMIT_CMDLIST _IOWR(XGI_IOCTL_MAGIC, XGI_ESC_SUBMIT_CMDLIST, struct xgi_cmd_info)
-#define XGI_IOCTL_TEST_RWINKERNEL _IOWR(XGI_IOCTL_MAGIC, XGI_ESC_TEST_RWINKERNEL, unsigned long)
-#define XGI_IOCTL_STATE_CHANGE _IOWR(XGI_IOCTL_MAGIC, XGI_ESC_STATE_CHANGE, struct xgi_state_info)
-
-#define XGI_IOCTL_PCIE_CHECK _IO(XGI_IOCTL_MAGIC, XGI_ESC_PCIE_CHECK)
-#define XGI_IOCTL_MAXNR 30
/*
* flags