summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-08-21 15:02:48 +0200
committerJakob Bornecrantz <jakob@vmware.com>2009-08-21 15:04:21 +0200
commit9b3e5df900db465319ed4b5d4c4721e1986fb5a3 (patch)
tree28945236e7e82f791214ec8ab6b8626d812e055b /src
parent0c0cea250d6615bbd500ac0b61b5d34bc61711cf (diff)
st/egl: Add support for drmModeDirtyFB command if found
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index ed8738e404..0cca68dc36 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -351,6 +351,7 @@ drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface)
EGLBoolean
drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw)
{
+ struct drm_device *dev = (struct drm_device *)drv;
struct drm_surface *surf = lookup_drm_surface(draw);
struct pipe_surface *back_surf;
@@ -368,7 +369,6 @@ drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw)
st_notify_swapbuffers(surf->stfb);
if (surf->screen) {
- surf->user->pipe->flush(surf->user->pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE, NULL);
surf->user->pipe->surface_copy(surf->user->pipe,
surf->screen->surface,
0, 0,
@@ -376,7 +376,15 @@ drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw)
0, 0,
surf->w, surf->h);
surf->user->pipe->flush(surf->user->pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE, NULL);
- /* TODO stuff here */
+
+#ifdef DRM_MODE_FEATURE_DIRTYFB
+ /* TODO query connector property to see if this is needed */
+ drmModeDirtyFB(dev->drmFD, surf->screen->fbID, NULL, 0);
+#else
+ (void)dev;
+#endif
+
+ /* TODO more stuff here */
}
}