msm: Add scanout support for UBWC RGB8888
msm hardware does not support UBWC RGB, only BGR.
The creator and consumers know that UBWC buffers
are hw native format. This is an opaque buffer
that will not be accessed outside of the gpu.
BUG=b:145579089
TEST=webgl aquarium goes to ubwc underlay
Change-Id: I4872958d00e1de623b2a9692249e88e4aa302334
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1960784
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Auto-Submit: Fritz Koenig <frkoenig@chromium.org>
diff --git a/msm.c b/msm.c
index 175d90f..dbc5b70 100644
--- a/msm.c
+++ b/msm.c
@@ -131,6 +131,8 @@
switch (format) {
case DRM_FORMAT_XBGR8888:
case DRM_FORMAT_ABGR8888:
+ case DRM_FORMAT_XRGB8888:
+ case DRM_FORMAT_ARGB8888:
case DRM_FORMAT_NV12:
return 1;
default:
@@ -186,10 +188,10 @@
texture_use_flags &= ~sw_flags;
msm_add_ubwc_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
- &metadata, render_use_flags);
+ &metadata, render_use_flags | BO_USE_SCANOUT);
msm_add_ubwc_combinations(drv, texture_source_formats, ARRAY_SIZE(texture_source_formats),
- &metadata, texture_use_flags);
+ &metadata, texture_use_flags | BO_USE_SCANOUT);
return 0;
}