summaryrefslogtreecommitdiff
path: root/lib/igt_fb.c
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-03-07 16:25:43 +0100
committerDaniel Stone <daniels@collabora.com>2016-04-14 13:54:24 +0100
commita2d5b348ee0f9b51ef3b38393ce91ddbefbfaacb (patch)
treec3b576bb0bf1efb7cfdeab5bcf4d542d1831efca /lib/igt_fb.c
parentfb66a5df937b44b594f17a30663938250c759b35 (diff)
lib: Add igt_dirty_fb
Just wraps drmModeDirtyFB and for now invalidates the whole FB. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_fb.c')
-rw-r--r--lib/igt_fb.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 81809d4c..ee03d622 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1014,6 +1014,20 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
blit, destroy_cairo_surface__blit);
}
+/**
+ * igt_dirty_fb:
+ * @fd: open drm file descriptor
+ * @fb: pointer to an #igt_fb structure
+ *
+ * Flushes out the whole framebuffer.
+ *
+ * Returns: 0 upon success.
+ */
+int igt_dirty_fb(int fd, struct igt_fb *fb)
+{
+ return drmModeDirtyFB(fb->fd, fb->fb_id, NULL, 0);
+}
+
static void destroy_cairo_surface__gtt(void *arg)
{
struct igt_fb *fb = arg;