OSDN Git Service

amdgpu: Enable to allocate YVU420 buffer with BO_USE_TEXTURE_MASK flag
authorHirokazu Honda <hiroh@chromium.org>
Wed, 31 Jul 2019 08:33:06 +0000 (17:33 +0900)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 9 Aug 2019 08:34:30 +0000 (01:34 -0700)
Chrome needs to allocate YUV420 buffer that cpu can read and write with a linear
view. YUV420 is not supported by gbm widely. YVU420 is used on behalf of YUV420.
This CL adds YVU420 to texture_source_formats so that YVU420 buffer can be
allocated on AMD platform.

BUG=chromium:987860
TEST=None

Change-Id: I11af92e74ad1d3c7c5631e67c5a2fef90077d887
Reviewed-on: https://chromium-review.googlesource.com/1728730
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
amdgpu.c

index 095335e..8e578df 100644 (file)
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -38,7 +38,8 @@ const static uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMA
                                                  DRM_FORMAT_XRGB8888 };
 
 const static uint32_t texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_R8, DRM_FORMAT_NV21,
-                                                  DRM_FORMAT_NV12, DRM_FORMAT_YVU420_ANDROID };
+                                                  DRM_FORMAT_NV12, DRM_FORMAT_YVU420_ANDROID,
+                                                  DRM_FORMAT_YVU420 };
 
 static int amdgpu_init(struct driver *drv)
 {