diff options
author | Dmitry Ermilov <dmitry.ermilov@intel.com> | 2012-06-15 00:24:37 -0400 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2012-06-15 10:25:10 +0800 |
commit | 16308dd6f040a216321b7f4eea9798ba39dbe7ba (patch) | |
tree | 63381752cda5dd6e0f657585ae607d4c12a436e6 | |
parent | 6f75b2b847466104cd988c57df82ea48491e8352 (diff) | |
download | vaapi-intel-driver-16308dd6f040a216321b7f4eea9798ba39dbe7ba.tar.gz vaapi-intel-driver-16308dd6f040a216321b7f4eea9798ba39dbe7ba.tar.bz2 vaapi-intel-driver-16308dd6f040a216321b7f4eea9798ba39dbe7ba.zip |
Implementation for i965_SyncSurface and i965_QuerySurfaceStatus
(cherry picked from commit 25673c458932caa09ae3f47c6dbe7e040dbae032)
-rwxr-xr-x | src/i965_drv_video.c | 18 |
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; } |