Mesa (master): Revert "i965: Make the driver compile until a proper libdrm can be released."

Ian Romanick idr at kemper.freedesktop.org
Tue Nov 26 21:14:05 UTC 2013


Module: Mesa
Branch: master
Commit: 0ae84399069b77e9464462c53405baf6f854a6fd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ae84399069b77e9464462c53405baf6f854a6fd

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Nov 18 12:39:02 2013 -0800

Revert "i965: Make the driver compile until a proper libdrm can be released."

libdrm 2.4.48 has been released.

This reverts commit bd4596efac2b783b789392a222da909efcd0fd3b.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_context.c |    8 +++++---
 src/mesa/drivers/dri/i965/brw_reset.c   |    7 -------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 6e09077..d5c18bb 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -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.
        */
diff --git a/src/mesa/drivers/dri/i965/brw_reset.c b/src/mesa/drivers/dri/i965/brw_reset.c
index e93b2e2..7eca1bc 100644
--- a/src/mesa/drivers/dri/i965/brw_reset.c
+++ b/src/mesa/drivers/dri/i965/brw_reset.c
@@ -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.




More information about the mesa-commit mailing list