summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiwei Zhang <zzyiwei@chromium.org>2022-04-14 06:28:14 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-14 22:18:32 +0000
commit7a1a7dbda342415279f01eccb728803446ab3250 (patch)
tree7a7f01716f76660e5547da42fe22f360242dc4cc
parent2119a9cefc12f892d0dc12107723adbb5f74d3be (diff)
downloadminigbm-7a1a7dbda342415279f01eccb728803446ab3250.tar.gz
minigbm/msm: disable UBWC for virtualization
This actually reverts commit 407eb0ebf3ce52fd4b3d79712d1b86d7b021c29b. However, the rationales have been updated. BUG=b:229147702 TEST=emerge and deploy and verified graphics working in crostini Change-Id: I8f491daf14f97a5dbda797207886695a985e44e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3586372 Tested-by: Yiwei Zhang <zzyiwei@chromium.org> Auto-Submit: Yiwei Zhang <zzyiwei@chromium.org> Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Chia-I Wu <olv@google.com> Commit-Queue: Chia-I Wu <olv@google.com>
-rw-r--r--msm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/msm.c b/msm.c
index 14ecf2b..5a2a73c 100644
--- a/msm.c
+++ b/msm.c
@@ -207,6 +207,21 @@ static bool should_avoid_ubwc(void)
drv_log("WARNING: waffle detected, disabling UBWC\n");
return true;
}
+
+ /* Sommelier relies on implicit modifier, which does not pass host modifier to
+ * zwp_linux_buffer_params_v1_add. Graphics will be broken if UBWC is enabled.
+ * Sommelier shall be fixed to mirror what arc wayland_service does, and then
+ * we can re-enable UBWC here.
+ *
+ * Inherit the trick from crrev/c/2523246 previously used for gtest. The side
+ * effect is all VM guests on msm will revert back to use linear modifier.
+ *
+ * See b/229147702
+ */
+ if (!dlsym(RTLD_DEFAULT, "cupsFilePrintf")) {
+ drv_log("WARNING: virtualization detected, disabling UBWC\n");
+ return true;
+ }
#endif
return false;
}