diff options
author | =?utf-8?q?Michel_D=C3=A4nzer?= <michel@tungstengraphics.com> | 2006-10-24 09:37:43 -0400 |
---|---|---|
committer | airlied <airlied@linux.ie> | 2006-12-06 23:53:29 -0500 |
commit | a6b54f3f5050c0cbc0c35dd48064846c6302706b (patch) | |
tree | ed0a17808058150916a56120a10109d70a2dd426 /drivers/char/drm/i915_drv.h | |
parent | 049b323321bbcb476b799f50dc6444c0ed5a0e0e (diff) |
drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/i915_drv.h')
-rw-r--r-- | drivers/char/drm/i915_drv.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 5f0c4fa04da2..334b0ce8181d 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -71,6 +71,13 @@ struct mem_block { | |||
71 | DRMFILE filp; /* 0: free, -1: heap, other: real files */ | 71 | DRMFILE filp; /* 0: free, -1: heap, other: real files */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | typedef struct _drm_i915_vbl_swap { | ||
75 | struct list_head head; | ||
76 | drm_drawable_t drw_id; | ||
77 | unsigned int pipe; | ||
78 | unsigned int sequence; | ||
79 | } drm_i915_vbl_swap_t; | ||
80 | |||
74 | typedef struct drm_i915_private { | 81 | typedef struct drm_i915_private { |
75 | drm_local_map_t *sarea; | 82 | drm_local_map_t *sarea; |
76 | drm_local_map_t *mmio_map; | 83 | drm_local_map_t *mmio_map; |
@@ -83,6 +90,7 @@ typedef struct drm_i915_private { | |||
83 | dma_addr_t dma_status_page; | 90 | dma_addr_t dma_status_page; |
84 | unsigned long counter; | 91 | unsigned long counter; |
85 | 92 | ||
93 | unsigned int cpp; | ||
86 | int back_offset; | 94 | int back_offset; |
87 | int front_offset; | 95 | int front_offset; |
88 | int current_page; | 96 | int current_page; |
@@ -98,6 +106,10 @@ typedef struct drm_i915_private { | |||
98 | struct mem_block *agp_heap; | 106 | struct mem_block *agp_heap; |
99 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; | 107 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; |
100 | int vblank_pipe; | 108 | int vblank_pipe; |
109 | |||
110 | spinlock_t swaps_lock; | ||
111 | drm_i915_vbl_swap_t vbl_swaps; | ||
112 | unsigned int swaps_pending; | ||
101 | } drm_i915_private_t; | 113 | } drm_i915_private_t; |
102 | 114 | ||
103 | extern drm_ioctl_desc_t i915_ioctls[]; | 115 | extern drm_ioctl_desc_t i915_ioctls[]; |
@@ -124,6 +136,7 @@ extern void i915_driver_irq_postinstall(drm_device_t * dev); | |||
124 | extern void i915_driver_irq_uninstall(drm_device_t * dev); | 136 | extern void i915_driver_irq_uninstall(drm_device_t * dev); |
125 | extern int i915_vblank_pipe_set(DRM_IOCTL_ARGS); | 137 | extern int i915_vblank_pipe_set(DRM_IOCTL_ARGS); |
126 | extern int i915_vblank_pipe_get(DRM_IOCTL_ARGS); | 138 | extern int i915_vblank_pipe_get(DRM_IOCTL_ARGS); |
139 | extern int i915_vblank_swap(DRM_IOCTL_ARGS); | ||
127 | 140 | ||
128 | /* i915_mem.c */ | 141 | /* i915_mem.c */ |
129 | extern int i915_mem_alloc(DRM_IOCTL_ARGS); | 142 | extern int i915_mem_alloc(DRM_IOCTL_ARGS); |
@@ -257,6 +270,10 @@ extern int i915_wait_ring(drm_device_t * dev, int n, const char *caller); | |||
257 | 270 | ||
258 | #define GFX_OP_DRAWRECT_INFO_I965 ((0x7900<<16)|0x2) | 271 | #define GFX_OP_DRAWRECT_INFO_I965 ((0x7900<<16)|0x2) |
259 | 272 | ||
273 | #define XY_SRC_COPY_BLT_CMD ((2<<29)|(0x53<<22)|6) | ||
274 | #define XY_SRC_COPY_BLT_WRITE_ALPHA (1<<21) | ||
275 | #define XY_SRC_COPY_BLT_WRITE_RGB (1<<20) | ||
276 | |||
260 | #define MI_BATCH_BUFFER ((0x30<<23)|1) | 277 | #define MI_BATCH_BUFFER ((0x30<<23)|1) |
261 | #define MI_BATCH_BUFFER_START (0x31<<23) | 278 | #define MI_BATCH_BUFFER_START (0x31<<23) |
262 | #define MI_BATCH_BUFFER_END (0xA<<23) | 279 | #define MI_BATCH_BUFFER_END (0xA<<23) |