minigbm: rockchip/mediatek: add PROTECTED flag back in

crrev.com/c/1643677 removed it, so we should add it back in.

BUG=b:141347335
TEST=GtsExoPlayerTestCases/GtsMediaTestCases

Change-Id: Ic49bd4158349da6170e8435c5c516954fe1646fa
Reviewed-on: https://chromium-review.googlesource.com/1821693
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Kazuhiro Inaba <kinaba@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
Gurchetan Singh 2019-09-24 10:37:59 -07:00 committed by chrome-bot
parent 793675a1c0
commit 8312ec228d
2 changed files with 3 additions and 2 deletions

View file

@ -54,7 +54,8 @@ static int mediatek_init(struct driver *drv)
drv_add_combinations(drv, texture_source_formats, ARRAY_SIZE(texture_source_formats),
&LINEAR_METADATA, BO_USE_TEXTURE_MASK);
drv_add_combination(drv, DRM_FORMAT_R8, &LINEAR_METADATA, BO_USE_SW_MASK | BO_USE_LINEAR);
drv_add_combination(drv, DRM_FORMAT_R8, &LINEAR_METADATA,
BO_USE_SW_MASK | BO_USE_LINEAR | BO_USE_PROTECTED);
/*
* Chrome uses DMA-buf mmap to write to YV12 buffers, which are then accessed by the
* Video Encoder Accelerator (VEA). It could also support NV12 potentially in the future.

View file

@ -141,7 +141,7 @@ static int rockchip_init(struct driver *drv)
*/
drv_add_combination(drv, DRM_FORMAT_R8, &metadata,
BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE | BO_USE_SW_MASK |
BO_USE_LINEAR);
BO_USE_LINEAR | BO_USE_PROTECTED);
kms_items = drv_query_kms(drv);
if (!kms_items)