OSDN Git Service

minigbm/msm: Disable UBWC for video gtest
authorFritz Koenig <frkoenig@chromium.org>
Fri, 6 Nov 2020 17:39:34 +0000 (09:39 -0800)
committerCommit Bot <commit-bot@chromium.org>
Mon, 9 Nov 2020 23:36:43 +0000 (23:36 +0000)
video_decode_accelerator_tests need non UBWC
frames in order to check for exactness.  This
is expected to be a short term fix until a
proper verification method is devised.

BUG=b:171260705
TEST=YouTube has UBWC, video_decode_accelerator_tests does not

Change-Id: Ia3ab02493f8b740ba9589b4fc21d3fa6b23ea7cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2523246
Reviewed-by: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Fritz Koenig <frkoenig@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>

msm.c

diff --git a/msm.c b/msm.c
index f83c09b..add04a8 100644 (file)
--- a/msm.c
+++ b/msm.c
@@ -180,6 +180,22 @@ static bool should_avoid_ubwc(void)
                drv_log("WARNING: waffle detected, disabling UBWC\n");
                return true;
        }
+
+       /* The video_decode_accelerator_tests needs to read back the frames
+        * to verify they are correct.  The frame verification relies on
+        * computing the MD5 of the video frame.  UBWC results in a different
+        * MD5.  This turns off UBWC for gtest until a proper frame
+        * comparison can be made
+        * Rely on the same mechanism that waffle is using, but this time check
+        * for a dynamic library function that is present in chrome, but missing
+        * in gtest.  Cups is not loaded for video tests.
+        *
+        * See b/171260705
+        */
+       if (!dlsym(RTLD_DEFAULT, "cupsFilePrintf")) {
+               drv_log("WARNING: gtest detected, disabling UBWC\n");
+               return true;
+       }
 #endif
        return false;
 }