summaryrefslogtreecommitdiff
path: root/src/i965_drv_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i965_drv_video.c')
-rwxr-xr-xsrc/i965_drv_video.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 80a788f..7096fd3 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1871,6 +1871,9 @@ i965_SyncSurface(VADriverContextP ctx,
assert(obj_surface);
+ if(obj_surface->bo)
+ drm_intel_bo_wait_rendering(obj_surface->bo);
+
return VA_STATUS_SUCCESS;
}
@@ -1884,15 +1887,16 @@ i965_QuerySurfaceStatus(VADriverContextP ctx,
assert(obj_surface);
- /* Usually GEM will handle synchronization with the graphics hardware */
-#if 0
if (obj_surface->bo) {
- dri_bo_map(obj_surface->bo, 0);
- dri_bo_unmap(obj_surface->bo);
+ if (drm_intel_bo_busy(obj_surface->bo)){
+ *status = VASurfaceRendering;
+ }
+ else {
+ *status = VASurfaceReady;
+ }
+ } else {
+ *status = VASurfaceReady;
}
-#endif
-
- *status = obj_surface->status;
return VA_STATUS_SUCCESS;
}