From 03bb0b1eb41d943ad042888a33f86588df57ed21 Mon Sep 17 00:00:00 2001 From: Xiaosong Wei Date: Tue, 12 Sep 2017 00:44:01 +0800 Subject: [PATCH] Add BO_USAGE_RENDERING to YUYV/VYUY formats This is needed for overlay input with YUYV/VYUY formats. Signed-off-by: Xiaosong Wei --- i915.c | 2 +- i915_private.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/i915.c b/i915.c index f745829..8f2c6db 100644 --- a/i915.c +++ b/i915.c @@ -29,7 +29,7 @@ static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMA static const uint32_t tileable_texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_NV12, DRM_FORMAT_R8, DRM_FORMAT_UYVY, - DRM_FORMAT_YUYV }; + DRM_FORMAT_YUYV, DRM_FORMAT_YVYU, DRM_FORMAT_VYUY }; static const uint32_t texture_source_formats[] = { DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID }; diff --git a/i915_private.c b/i915_private.c index 8196586..914ef7e 100644 --- a/i915_private.c +++ b/i915_private.c @@ -82,7 +82,13 @@ int i915_private_add_combinations(struct driver *drv) drv_modify_combination(drv, DRM_FORMAT_NV12, &metadata, BO_USE_RENDERING | BO_USE_TEXTURE | BO_USE_CAMERA_MASK); drv_modify_combination(drv, DRM_FORMAT_YUYV, &metadata, - BO_USE_TEXTURE | BO_USE_CAMERA_MASK); + BO_USE_TEXTURE | BO_USE_CAMERA_MASK | BO_USE_RENDERING); + drv_modify_combination(drv, DRM_FORMAT_VYUY, &metadata, + BO_USE_TEXTURE | BO_USE_CAMERA_MASK | BO_USE_RENDERING); + drv_modify_combination(drv, DRM_FORMAT_UYVY, &metadata, + BO_USE_TEXTURE | BO_USE_CAMERA_MASK | BO_USE_RENDERING); + drv_modify_combination(drv, DRM_FORMAT_YVYU, &metadata, + BO_USE_TEXTURE | BO_USE_CAMERA_MASK | BO_USE_RENDERING); drv_modify_combination(drv, DRM_FORMAT_YVU420_ANDROID, &metadata, BO_USE_TEXTURE | BO_USE_CAMERA_MASK);