virtgpu_cross_domain: align with virtgpu_virgl on the scanout formats
Start from aligning with the virgl backend that most platforms stay on.
Later we can do per platform customization in cross_domain backend.
BUG=b:262928949
TEST=CtsNativeHardwareTestCases on mtk
Change-Id: Ic7f1cb2ae9c8485f24dc7da0e27933de18cc59c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4113687
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
diff --git a/virtgpu_cross_domain.c b/virtgpu_cross_domain.c
index 6908d4c..4af9c3a 100644
--- a/virtgpu_cross_domain.c
+++ b/virtgpu_cross_domain.c
@@ -19,16 +19,16 @@
#define CAPSET_CROSS_DOMAIN 5
#define CAPSET_CROSS_FAKE 30
-static const uint32_t scanout_render_formats[] = { DRM_FORMAT_ABGR2101010, DRM_FORMAT_ABGR8888,
- DRM_FORMAT_ARGB2101010, DRM_FORMAT_ARGB8888,
- DRM_FORMAT_RGB565, DRM_FORMAT_XBGR2101010,
- DRM_FORMAT_XBGR8888, DRM_FORMAT_XRGB2101010,
+static const uint32_t scanout_render_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
DRM_FORMAT_XRGB8888 };
-static const uint32_t render_formats[] = { DRM_FORMAT_ABGR16161616F };
-
-static const uint32_t texture_only_formats[] = { DRM_FORMAT_R8, DRM_FORMAT_NV12, DRM_FORMAT_P010,
- DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID };
+static const uint32_t texture_only_formats[] = {
+ DRM_FORMAT_R8, DRM_FORMAT_NV12, DRM_FORMAT_P010,
+ DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID, DRM_FORMAT_ABGR2101010,
+ DRM_FORMAT_ARGB2101010, DRM_FORMAT_XBGR2101010, DRM_FORMAT_XRGB2101010,
+ DRM_FORMAT_ABGR16161616F
+};
extern struct virtgpu_param params[];
@@ -78,9 +78,6 @@
drv_add_combinations(drv, scanout_render_formats, ARRAY_SIZE(scanout_render_formats),
&metadata, BO_USE_RENDER_MASK | BO_USE_SCANOUT);
- drv_add_combinations(drv, render_formats, ARRAY_SIZE(render_formats), &metadata,
- BO_USE_RENDER_MASK);
-
drv_add_combinations(drv, texture_only_formats, ARRAY_SIZE(texture_only_formats), &metadata,
BO_USE_TEXTURE_MASK);