minigbm: conditionally fallback to strip scanout use_flag

Only 2d virtgpu backend needs to fallback here because virtio primary
plane only allows DRM_FORMAT_XRGB8888.

Most our platforms cannot display YV12 (except msm), thus the fallback
is required for the converted DRM_FORMAT_YVU420_ANDROID. For virgl
backend, additionally append a BO_USE_LINEAR as a replacement for the
hack inside compute_virgl_bind_flags.

BUG=b:199524294
TEST=CQ
TEST=gralloctest alloc_combinations
TEST=android.media.cts.VideoDecoderRotationTest

Change-Id: Ic87838ea2aae2b0abf87ed898ad75a3d7e556471
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3166775
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
This commit is contained in:
Yiwei Zhang 2021-09-17 08:20:21 +00:00 committed by Commit Bot
parent 9f390d92a4
commit c1413ea43a
13 changed files with 51 additions and 16 deletions

View file

@ -257,6 +257,7 @@ const struct backend backend_rockchip = {
.bo_invalidate = rockchip_bo_invalidate,
.bo_flush = rockchip_bo_flush,
.resolve_format = drv_resolve_format_helper,
.resolve_use_flags = drv_resolve_use_flags_helper,
};
#endif