summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-11-13 17:54:09 +0100
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-11-13 17:58:16 +0100
commit06e71ea7289035f33e36242b0da11f72f8b0916d (patch)
tree7ef70ca884602f4d835ac2f349267b876519c28e
parentd3ed0af4e9238dd29b7f14fd5bd2e06791f02c03 (diff)
downloadlibva-intel-driver-06e71ea7289035f33e36242b0da11f72f8b0916d.tar.gz
libva-intel-driver-06e71ea7289035f33e36242b0da11f72f8b0916d.tar.bz2
libva-intel-driver-06e71ea7289035f33e36242b0da11f72f8b0916d.zip
Revert "add LockBuffer support for VAImage/VASurface"
This reverts commit 9dbdd5c26b4a47f0edab79b86ba8d46d8a0c8bd4. Change-Id: I23eeb6b1a4889cc97d13d3ddcb6b9d3cd6eb570b Bug-Tizen: TC-1195/related
-rw-r--r--src/i965_drv_video.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index a9516d1..ba7c7be 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -4588,80 +4588,6 @@ i965_UnlockSurface(
return vaStatus;
}
-VAStatus
-i965_LockBuffer(
- VADriverContextP ctx,
- VABufferID buf_id,
- VABufferInfo * buf_info_ptr
-)
-{
- struct object_buffer *obj_buffer = NULL;
- struct i965_driver_data *i965 = i965_driver_data(ctx);
-
- obj_buffer = BUFFER(buf_id);
-
- assert(obj_buffer);
- if (!obj_buffer)
- return VA_STATUS_ERROR_INVALID_BUFFER;
-
- assert(obj_buffer->buffer_store);
- if (!obj_buffer)
- return VA_STATUS_ERROR_INVALID_BUFFER;
-
- assert(obj_buffer->buffer_store->bo);
- if (!obj_buffer)
- return VA_STATUS_ERROR_INVALID_BUFFER;
-
- // XXX, a flag should be added to object_buffer to indicate that the buffer is using by external ones or not
- switch (obj_buffer->type) {
- case VAImageBufferType:
- buf_info_ptr->type = VAImageBufferType;
- // XXX, fix me, don't care about the mem_size for now.
- buf_info_ptr->mem_size = -1;
- if (buf_info_ptr->mem_type & VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM_BO) {
- buf_info_ptr->mem_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM_BO;
- buf_info_ptr->handle = (uintptr_t)obj_buffer->buffer_store->bo;
- } else if (buf_info_ptr->mem_type &VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM) {
- uint32_t name;
- if (drm_intel_bo_flink(obj_buffer->buffer_store->bo, &name) == 0) {
- buf_info_ptr->mem_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
- buf_info_ptr->handle = name;
- } else {
- assert(0);
- return VA_STATUS_ERROR_INVALID_BUFFER;
- }
- } else if (buf_info_ptr->mem_type & VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME) {
- int prime_fd; // libdrm use 'int'
- if (drm_intel_bo_gem_export_to_prime(obj_buffer->buffer_store->bo, &prime_fd) == 0) {
- buf_info_ptr->mem_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
- buf_info_ptr->handle = prime_fd;
- } else {
- assert(0);
- return VA_STATUS_ERROR_INVALID_BUFFER;
- }
- } else {
- assert(0);
- }
- break;
- default:
- // XXX, not interest to support other typed buffer yet
- assert(0);
- }
-
- return VA_STATUS_SUCCESS;
-}
-
-VAStatus
-i965_UnlockBuffer(
- VADriverContextP ctx,
- VABufferID buf_id,
- VABufferInfo * buf_info_ptr
-)
-{
- // XXX, unset the flag mentioned in i965_LockBuffer
- return VA_STATUS_SUCCESS;
-}
-
static VAStatus
i965_GetSurfaceAttributes(
VADriverContextP ctx,
@@ -5870,8 +5796,6 @@ VA_DRIVER_INIT_FUNC( VADriverContextP ctx )
vtable->vaBufferInfo = i965_BufferInfo;
vtable->vaLockSurface = i965_LockSurface;
vtable->vaUnlockSurface = i965_UnlockSurface;
- vtable->vaLockBuffer = i965_LockBuffer;
- vtable->vaUnlockBuffer = i965_UnlockBuffer;
vtable->vaGetSurfaceAttributes = i965_GetSurfaceAttributes;
vtable->vaQuerySurfaceAttributes = i965_QuerySurfaceAttributes;
vtable->vaCreateSurfaces2 = i965_CreateSurfaces2;