diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 16:53:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 16:53:40 -0500 |
commit | 37ef4399a6bb265d3035e6d6e45f7677b132a3ba (patch) | |
tree | 31adbac36ea310a44562a335f501d69d5ce2c78c /drivers/char/drm/i915_drv.h | |
parent | bf785ee0aeea7a3e717cb1e11df4135b6cbde7da (diff) | |
parent | 9c7d462eda13ca211b7b4a62f191f4cfda135e2d (diff) |
Merge branch 'drm-forlinus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
Diffstat (limited to 'drivers/char/drm/i915_drv.h')
-rw-r--r-- | drivers/char/drm/i915_drv.h | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 17e457c73dc7..c6c71b45f101 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- | 1 | /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- |
2 | */ | 2 | */ |
3 | /************************************************************************** | 3 | /* |
4 | * | 4 | * |
5 | * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. | 5 | * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. |
6 | * All Rights Reserved. | 6 | * All Rights Reserved. |
@@ -25,7 +25,7 @@ | |||
25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 25 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 26 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
27 | * | 27 | * |
28 | **************************************************************************/ | 28 | */ |
29 | 29 | ||
30 | #ifndef _I915_DRV_H_ | 30 | #ifndef _I915_DRV_H_ |
31 | #define _I915_DRV_H_ | 31 | #define _I915_DRV_H_ |
@@ -37,21 +37,18 @@ | |||
37 | 37 | ||
38 | #define DRIVER_NAME "i915" | 38 | #define DRIVER_NAME "i915" |
39 | #define DRIVER_DESC "Intel Graphics" | 39 | #define DRIVER_DESC "Intel Graphics" |
40 | #define DRIVER_DATE "20040405" | 40 | #define DRIVER_DATE "20051209" |
41 | 41 | ||
42 | /* Interface history: | 42 | /* Interface history: |
43 | * | 43 | * |
44 | * 1.1: Original. | 44 | * 1.1: Original. |
45 | * 1.2: Add Power Management | ||
46 | * 1.3: Add vblank support | ||
45 | */ | 47 | */ |
46 | #define DRIVER_MAJOR 1 | 48 | #define DRIVER_MAJOR 1 |
47 | #define DRIVER_MINOR 1 | 49 | #define DRIVER_MINOR 3 |
48 | #define DRIVER_PATCHLEVEL 0 | 50 | #define DRIVER_PATCHLEVEL 0 |
49 | 51 | ||
50 | /* We use our own dma mechanisms, not the drm template code. However, | ||
51 | * the shared IRQ code is useful to us: | ||
52 | */ | ||
53 | #define __HAVE_PM 1 | ||
54 | |||
55 | typedef struct _drm_i915_ring_buffer { | 52 | typedef struct _drm_i915_ring_buffer { |
56 | int tail_mask; | 53 | int tail_mask; |
57 | unsigned long Start; | 54 | unsigned long Start; |
@@ -97,6 +94,7 @@ typedef struct drm_i915_private { | |||
97 | int tex_lru_log_granularity; | 94 | int tex_lru_log_granularity; |
98 | int allow_batchbuffer; | 95 | int allow_batchbuffer; |
99 | struct mem_block *agp_heap; | 96 | struct mem_block *agp_heap; |
97 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; | ||
100 | } drm_i915_private_t; | 98 | } drm_i915_private_t; |
101 | 99 | ||
102 | extern drm_ioctl_desc_t i915_ioctls[]; | 100 | extern drm_ioctl_desc_t i915_ioctls[]; |
@@ -104,14 +102,18 @@ extern int i915_max_ioctl; | |||
104 | 102 | ||
105 | /* i915_dma.c */ | 103 | /* i915_dma.c */ |
106 | extern void i915_kernel_lost_context(drm_device_t * dev); | 104 | extern void i915_kernel_lost_context(drm_device_t * dev); |
107 | extern void i915_driver_pretakedown(drm_device_t * dev); | 105 | extern int i915_driver_load(struct drm_device *, unsigned long flags); |
108 | extern void i915_driver_prerelease(drm_device_t * dev, DRMFILE filp); | 106 | extern void i915_driver_lastclose(drm_device_t * dev); |
107 | extern void i915_driver_preclose(drm_device_t * dev, DRMFILE filp); | ||
109 | extern int i915_driver_device_is_agp(drm_device_t * dev); | 108 | extern int i915_driver_device_is_agp(drm_device_t * dev); |
109 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, | ||
110 | unsigned long arg); | ||
110 | 111 | ||
111 | /* i915_irq.c */ | 112 | /* i915_irq.c */ |
112 | extern int i915_irq_emit(DRM_IOCTL_ARGS); | 113 | extern int i915_irq_emit(DRM_IOCTL_ARGS); |
113 | extern int i915_irq_wait(DRM_IOCTL_ARGS); | 114 | extern int i915_irq_wait(DRM_IOCTL_ARGS); |
114 | 115 | ||
116 | extern int i915_driver_vblank_wait(drm_device_t *dev, unsigned int *sequence); | ||
115 | extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); | 117 | extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); |
116 | extern void i915_driver_irq_preinstall(drm_device_t * dev); | 118 | extern void i915_driver_irq_preinstall(drm_device_t * dev); |
117 | extern void i915_driver_irq_postinstall(drm_device_t * dev); | 119 | extern void i915_driver_irq_postinstall(drm_device_t * dev); |
@@ -125,13 +127,10 @@ extern void i915_mem_takedown(struct mem_block **heap); | |||
125 | extern void i915_mem_release(drm_device_t * dev, | 127 | extern void i915_mem_release(drm_device_t * dev, |
126 | DRMFILE filp, struct mem_block *heap); | 128 | DRMFILE filp, struct mem_block *heap); |
127 | 129 | ||
128 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, | 130 | #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, (reg)) |
129 | unsigned long arg); | 131 | #define I915_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, (reg), (val)) |
130 | 132 | #define I915_READ16(reg) DRM_READ16(dev_priv->mmio_map, (reg)) | |
131 | #define I915_READ(reg) DRM_READ32(dev_priv->mmio_map, reg) | 133 | #define I915_WRITE16(reg,val) DRM_WRITE16(dev_priv->mmio_map, (reg), (val)) |
132 | #define I915_WRITE(reg,val) DRM_WRITE32(dev_priv->mmio_map, reg, val) | ||
133 | #define I915_READ16(reg) DRM_READ16(dev_priv->mmio_map, reg) | ||
134 | #define I915_WRITE16(reg,val) DRM_WRITE16(dev_priv->mmio_map, reg, val) | ||
135 | 134 | ||
136 | #define I915_VERBOSE 0 | 135 | #define I915_VERBOSE 0 |
137 | 136 | ||
@@ -195,6 +194,13 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); | |||
195 | #define PPCR 0x61204 | 194 | #define PPCR 0x61204 |
196 | #define PPCR_ON (1<<0) | 195 | #define PPCR_ON (1<<0) |
197 | 196 | ||
197 | #define DVOB 0x61140 | ||
198 | #define DVOB_ON (1<<31) | ||
199 | #define DVOC 0x61160 | ||
200 | #define DVOC_ON (1<<31) | ||
201 | #define LVDS 0x61180 | ||
202 | #define LVDS_ON (1<<31) | ||
203 | |||
198 | #define ADPA 0x61100 | 204 | #define ADPA 0x61100 |
199 | #define ADPA_DPMS_MASK (~(3<<10)) | 205 | #define ADPA_DPMS_MASK (~(3<<10)) |
200 | #define ADPA_DPMS_ON (0<<10) | 206 | #define ADPA_DPMS_ON (0<<10) |
@@ -258,4 +264,6 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); | |||
258 | 264 | ||
259 | #define CMD_OP_DESTBUFFER_INFO ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1) | 265 | #define CMD_OP_DESTBUFFER_INFO ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1) |
260 | 266 | ||
267 | #define READ_BREADCRUMB(dev_priv) (((u32 *)(dev_priv->hw_status_page))[5]) | ||
268 | |||
261 | #endif | 269 | #endif |