Revert "i965: Make the driver compile until a proper libdrm can be released."
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 18 Nov 2013 20:39:02 +0000 (12:39 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 26 Nov 2013 21:10:52 +0000 (13:10 -0800)
libdrm 2.4.48 has been released.

This reverts commit bd4596efac2b783b789392a222da909efcd0fd3b.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_reset.c

index 6e090770683107a68c040a32de16ebab96f3940e..d5c18bb7a3b0ac7a3bdcc9342b9cdc96da463fb4 100644 (file)
@@ -683,10 +683,12 @@ brwCreateContext(gl_api api,
    }
 
    /* Notification of GPU resets requires hardware contexts and a kernel new
-    * enough to support DRM_IOCTL_I915_GET_RESET_STATS, which isn't upstream
-    * yet.
+    * enough to support DRM_IOCTL_I915_GET_RESET_STATS.
     */
-   if (notify_reset) {
+   if (notify_reset &&
+       (brw->hw_ctx == NULL
+        || drm_intel_get_reset_stats(brw->hw_ctx, &brw->reset_count, NULL,
+                                     NULL))) {
       /* This is the wrong error code, but the correct error code (one that
        * will cause EGL to generate EGL_BAD_MATCH) doesn't seem to exist.
        */
index e93b2e253ad543510a567a294dc0078d7c49f3b3..7eca1bca0b2f205effb6d9f067e16087fef1daa6 100644 (file)
@@ -42,17 +42,10 @@ brw_get_graphics_reset_status(struct gl_context *ctx)
     */
    assert(brw->hw_ctx != NULL);
 
-#if 0
-   /* This is waiting until the kernel code can be merged and a new libdrm
-    * actually released.
-    */
    err = drm_intel_get_reset_stats(brw->hw_ctx, &reset_count, &active,
                                    &pending);
    if (err)
       return GL_NO_ERROR;
-#else
-   return GL_NO_ERROR;
-#endif
 
    /* A reset was observed while a batch from this context was executing.
     * Assume that this context was at fault.