diff options
-rw-r--r-- | src/drmmode_display.c | 15 | ||||
-rw-r--r-- | src/nv_proto.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index cc141a0..3e8ccec 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -115,6 +115,21 @@ drmmode_from_scrn(ScrnInfoPtr scrn) return NULL; } +int +drmmode_head(xf86CrtcPtr crtc) +{ + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + return drmmode_crtc->mode_crtc->crtc_id; +} + +void +drmmode_swap(ScrnInfoPtr scrn, uint32_t next, uint32_t *prev) +{ + drmmode_ptr drmmode = drmmode_from_scrn(scrn); + *prev = drmmode->fb_id; + drmmode->fb_id = next; +} + static PixmapPtr drmmode_pixmap_wrap(ScreenPtr pScreen, int width, int height, int depth, int bpp, int pitch, struct nouveau_bo *bo, void *data) diff --git a/src/nv_proto.h b/src/nv_proto.h index a573269..f45c0d6 100644 --- a/src/nv_proto.h +++ b/src/nv_proto.h @@ -12,6 +12,9 @@ Bool drmmode_page_flip(DrawablePtr draw, PixmapPtr back, void *priv, void drmmode_screen_init(ScreenPtr pScreen); void drmmode_screen_fini(ScreenPtr pScreen); +int drmmode_head(xf86CrtcPtr crtc); +void drmmode_swap(ScrnInfoPtr, uint32_t, uint32_t *); + /* in nv_accel_common.c */ Bool NVAccelCommonInit(ScrnInfoPtr pScrn); Bool NVAccelGetCtxSurf2DFormatFromPixmap(PixmapPtr pPix, int *fmt_ret); |