<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [kbl] [drm] GPU hang in Antutu 7.x games with 4.14.52 kernel"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107356#c26">Comment # 26</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [kbl] [drm] GPU hang in Antutu 7.x games with 4.14.52 kernel"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107356">bug 107356</a>
              from <span class="vcard"><a class="email" href="mailto:chenglei.ren@intel.com" title="Ren Chenglei <chenglei.ren@intel.com>"> <span class="fn">Ren Chenglei</span></a>
</span></b>
        <pre>Maybe I caught the root cause of the GPU Hang issue:

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 58bba208db10..fa871473ca14 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1001,19 +1003,24 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count,
GLenum type,
    FLUSH_FOR_DRAW(ctx);

    if (_mesa_is_no_error_enabled(ctx)) {
-      _mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
+      //The following function will cause screen black
+      //_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));

       if (ctx->NewState)
          _mesa_update_state(ctx);
    } else {
-      _mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
+      //The following function will cause screen black
+      //_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));

       if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices))
          return;
    }

-   vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, 0, ~0,
+   if (mode != GL_PATCHES)
+     vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, 0, ~0,
                                    count, type, indices, 0, 1, 0);
+   else
+     ALOGD("mesa - log - skip draw as GL_PATCHES cause GPU hang");
 }

Tapani, do we have support GL_PATCHES in mesa, which is only available with
GLES 3.2 or greater.
<a href="https://www.khronos.org/registry/OpenGL-Refpages/es3/">https://www.khronos.org/registry/OpenGL-Refpages/es3/</a>

When the mode is GL_PATCHES, we skip the draw, and the GPU hang can't be
reproduced. 

BTW, the screen will be black in the first part test, I commented function:
_mesa_set_draw_vao(ctx, ctx->Array.VAO, enabled_filter(ctx));
It will be better, but there is still some issue.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>