[Bug 101176] [IGT] [APL] gem_workarounds at basic-read Test assertion failure

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 10 15:54:11 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101176

--- Comment #13 from Mika Kuoppala <mika.kuoppala at intel.com> ---
Can you try with:

diff --git a/tests/gem_workarounds.c b/tests/gem_workarounds.c
index c7286d86..c09512cb 100644
--- a/tests/gem_workarounds.c
+++ b/tests/gem_workarounds.c
@@ -45,11 +45,11 @@ struct intel_wa_reg {
 static struct intel_wa_reg *wa_regs;
 static int num_wa_regs;

-static void wait_gpu(void)
+static int open_and_wake_gpu(void)
 {
        int fd = drm_open_driver(DRIVER_INTEL);
        gem_quiescent_gpu(fd);
-       close(fd);
+       return fd;
 }

 static void test_hang_gpu(void)
@@ -67,13 +67,13 @@ static void test_suspend_resume(void)

 static int workaround_fail_count(void)
 {
-       int i, fail_count = 0;
+       int i, fd, fail_count = 0;

        /* There is a small delay after coming ot of rc6 to the correct
           render context values will get loaded by hardware (bdw,chv).
           This here ensures that we have the correct context loaded before
           we start to read values */
-       wait_gpu();
+       fd = open_and_wake_gpu();

        igt_debug("Address\tval\t\tmask\t\tread\t\tresult\n");

@@ -95,6 +95,8 @@ static int workaround_fail_count(void)
                }
        }

+       close(fd);
+
        return fail_count;
 }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20170710/4da5538f/attachment.html>


More information about the intel-gfx-bugs mailing list