From 5dc63faf56e4833f45c18c7ab6be9f9847cfe53c Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Wed, 31 Jul 2019 17:33:06 +0900 Subject: [PATCH] amdgpu: Enable to allocate YVU420 buffer with BO_USE_TEXTURE_MASK flag 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 Commit-Ready: Hirokazu Honda Legacy-Commit-Queue: Commit Bot Reviewed-by: Gurchetan Singh Reviewed-by: Hirokazu Honda --- amdgpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amdgpu.c b/amdgpu.c index 095335e..8e578df 100644 --- 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) { -- 2.11.0