From af40e14ce335fa689d1a989feba3c02a8c71b7a7 Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Mon, 27 Dec 2010 16:32:21 -0600 Subject: meta-emenlow: move to meta-intel repo from poky repo This is the meta-emenlow layer, moved from the poky repo in order to keep all the meta-intel BSPs together. This version builds against laverne (0.90) - detailed build instruction can be found in the README file. Signed-off-by: Tom Zanussi --- .../libva-0.31.0/036_g45_add_vaGetImage.patch | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch (limited to 'meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch') diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch new file mode 100644 index 00000000..dc25d9f9 --- /dev/null +++ b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch @@ -0,0 +1,71 @@ +From 37f40c0cdc9667907dfb784874b42fb16c2c9bde Mon Sep 17 00:00:00 2001 +From: Gwenole Beauchesne +Date: Wed, 4 Nov 2009 13:16:34 +0000 +Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaGetImage()=20for=20full-sized=20surface=20readback.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +--- + i965_drv_video/i965_drv_video.c | 45 ++++++++++++++++++++++++++++++++++++++- + 1 files changed, 44 insertions(+), 1 deletions(-) + +diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c +index 8558d0e..10baffb 100644 +--- a/i965_drv_video/i965_drv_video.c ++++ b/i965_drv_video/i965_drv_video.c +@@ -1388,7 +1388,50 @@ i965_GetImage(VADriverContextP ctx, + unsigned int height, + VAImageID image) + { +- return VA_STATUS_SUCCESS; ++ struct i965_driver_data *i965 = i965_driver_data(ctx); ++ ++ struct object_surface *obj_surface = SURFACE(surface); ++ if (!obj_surface) ++ return VA_STATUS_ERROR_INVALID_SURFACE; ++ ++ struct object_image *obj_image = IMAGE(image); ++ if (!obj_image) ++ return VA_STATUS_ERROR_INVALID_IMAGE; ++ ++ /* XXX: we only support full-size surface readback */ ++ if (x != 0 || ++ y != 0 || ++ width != obj_surface->width || ++ height != obj_surface->height) ++ return VA_STATUS_ERROR_INVALID_PARAMETER; ++ ++ /* XXX: we only support 1:1 image copies */ ++ if (width != obj_image->image.width || ++ height != obj_image->image.height) ++ return VA_STATUS_ERROR_INVALID_PARAMETER; ++ ++ VAStatus va_status; ++ void *image_data = NULL; ++ ++ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data); ++ if (va_status != VA_STATUS_SUCCESS) ++ return va_status; ++ ++ dri_bo_map(obj_surface->bo, 0); ++ ++ switch (obj_image->image.format.fourcc) { ++ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */ ++ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size); ++ break; ++ default: ++ va_status = VA_STATUS_ERROR_OPERATION_FAILED; ++ break; ++ } ++ ++ dri_bo_unmap(obj_surface->bo); ++ ++ i965_UnmapBuffer(ctx, obj_image->image.buf); ++ return va_status; + } + + VAStatus +-- +1.5.4.3 + -- cgit v1.2.3-54-g00ecf