aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drv.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-10-20 17:35:40 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 00:11:12 -0500
commit332b242f47786d1a43bd7a19a0513dd5d493db8e (patch)
treef6681c1513c58db54f71c64184ebc033a14c49fe /drivers/gpu/drm/nouveau/nouveau_drv.h
parent042206c0cd4924879c4292c5ffa2bf1e8023ae5a (diff)
drm/nouveau: Implement the pageflip ioctl.
nv0x-nv4x should be mostly fine, nv50 doesn't work yet. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 7cf034fd5cd0..2bb1f1572a55 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -166,6 +166,13 @@ struct nouveau_gpuobj {
166 void *priv; 166 void *priv;
167}; 167};
168 168
169struct nouveau_page_flip_state {
170 struct list_head head;
171 struct drm_pending_vblank_event *event;
172 int crtc, bpp, pitch, x, y;
173 uint64_t offset;
174};
175
169struct nouveau_channel { 176struct nouveau_channel {
170 struct drm_device *dev; 177 struct drm_device *dev;
171 int id; 178 int id;
@@ -253,6 +260,7 @@ struct nouveau_channel {
253 uint32_t vblsem_offset; 260 uint32_t vblsem_offset;
254 uint32_t vblsem_rval; 261 uint32_t vblsem_rval;
255 struct list_head vbl_wait; 262 struct list_head vbl_wait;
263 struct list_head flip;
256 } nvsw; 264 } nvsw;
257 265
258 struct { 266 struct {
@@ -1076,6 +1084,8 @@ extern void nv04_graph_destroy_context(struct nouveau_channel *);
1076extern int nv04_graph_load_context(struct nouveau_channel *); 1084extern int nv04_graph_load_context(struct nouveau_channel *);
1077extern int nv04_graph_unload_context(struct drm_device *); 1085extern int nv04_graph_unload_context(struct drm_device *);
1078extern void nv04_graph_context_switch(struct drm_device *); 1086extern void nv04_graph_context_switch(struct drm_device *);
1087extern int nv04_graph_mthd_page_flip(struct nouveau_channel *chan,
1088 u32 class, u32 mthd, u32 data);
1079 1089
1080/* nv10_graph.c */ 1090/* nv10_graph.c */
1081extern int nv10_graph_init(struct drm_device *); 1091extern int nv10_graph_init(struct drm_device *);
@@ -1249,6 +1259,7 @@ extern u16 nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index);
1249extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); 1259extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val);
1250extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); 1260extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index);
1251extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val); 1261extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val);
1262extern void nouveau_bo_fence(struct nouveau_bo *, struct nouveau_fence *);
1252 1263
1253/* nouveau_fence.c */ 1264/* nouveau_fence.c */
1254struct nouveau_fence; 1265struct nouveau_fence;
@@ -1315,6 +1326,10 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *,
1315/* nouveau_display.c */ 1326/* nouveau_display.c */
1316int nouveau_vblank_enable(struct drm_device *dev, int crtc); 1327int nouveau_vblank_enable(struct drm_device *dev, int crtc);
1317void nouveau_vblank_disable(struct drm_device *dev, int crtc); 1328void nouveau_vblank_disable(struct drm_device *dev, int crtc);
1329int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
1330 struct drm_pending_vblank_event *event);
1331int nouveau_finish_page_flip(struct nouveau_channel *,
1332 struct nouveau_page_flip_state *);
1318 1333
1319/* nv10_gpio.c */ 1334/* nv10_gpio.c */
1320int nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); 1335int nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag);
@@ -1514,5 +1529,6 @@ nv_match_device(struct drm_device *dev, unsigned device,
1514#define NV_SW_VBLSEM_OFFSET 0x00000400 1529#define NV_SW_VBLSEM_OFFSET 0x00000400
1515#define NV_SW_VBLSEM_RELEASE_VALUE 0x00000404 1530#define NV_SW_VBLSEM_RELEASE_VALUE 0x00000404
1516#define NV_SW_VBLSEM_RELEASE 0x00000408 1531#define NV_SW_VBLSEM_RELEASE 0x00000408
1532#define NV_SW_PAGE_FLIP 0x00000500
1517 1533
1518#endif /* __NOUVEAU_DRV_H__ */ 1534#endif /* __NOUVEAU_DRV_H__ */