summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-08 22:39:32 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-08 22:42:11 +0000
commit4e4e10935d2815fb62aeaedbfffe10aad115ec0b (patch)
tree67cb878a98a00986224fed1d0d634ea3463319e2 /src/sna/sna_video_textured.c
parentcef11795f627a393d4254845b0a19eefbf6c782c (diff)
sna: Flush upon change of target if GPU is idle
The aim is to improve GPU concurrency by keeping it busy. The possible complication is that we incur more overhead due to small batches. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index f420769a..8db8b6fc 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -275,11 +275,12 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
}
}
- kgem_set_mode(&sna->kgem, KGEM_RENDER);
if (crtc && video->SyncToVblank != 0 &&
- sna_pixmap_is_scanout(sna, pixmap))
+ sna_pixmap_is_scanout(sna, pixmap)) {
+ kgem_set_mode(&sna->kgem, KGEM_RENDER, sna_pixmap(pixmap)->gpu_bo);
flush = sna_wait_for_scanline(sna, pixmap, crtc,
&clip->extents);
+ }
ret = Success;
if (!sna->render.video(sna, video, &frame, clip,