Mesa (master): i965: Don't enable reset notification support on Gen4-5.
Kenneth Graunke
kwg at kemper.freedesktop.org
Thu May 1 06:38:09 UTC 2014
Module: Mesa
Branch: master
Commit: 0380ec467d78f40b5c8134158ca48b4c5378b282
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0380ec467d78f40b5c8134158ca48b4c5378b282
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed Mar 12 01:43:40 2014 -0700
i965: Don't enable reset notification support on Gen4-5.
arekm reported that using Chrome with GPU acceleration enabled on GM45
triggered the hw_ctx != NULL assertion in brw_get_graphics_reset_status.
We definitely do not want to advertise reset notification support on
Gen4-5 systems, since it needs hardware contexts, and we never even
request a hardware context on those systems.
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75723
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/intel_screen.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 3b2e4e9..2c8069d 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1367,13 +1367,18 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
* no error. If the ioctl is not supported, it always generate EINVAL.
* Use this to determine whether to advertise the __DRI2_ROBUSTNESS
* extension to the loader.
+ *
+ * Don't even try on pre-Gen6, since we don't attempt to use contexts there.
*/
- struct drm_i915_reset_stats stats;
- memset(&stats, 0, sizeof(stats));
+ if (intelScreen->devinfo->gen >= 6) {
+ struct drm_i915_reset_stats stats;
+ memset(&stats, 0, sizeof(stats));
- const int ret = drmIoctl(psp->fd, DRM_IOCTL_I915_GET_RESET_STATS, &stats);
+ const int ret = drmIoctl(psp->fd, DRM_IOCTL_I915_GET_RESET_STATS, &stats);
- intelScreen->has_context_reset_notification = (ret != -1 || errno != EINVAL);
+ intelScreen->has_context_reset_notification =
+ (ret != -1 || errno != EINVAL);
+ }
psp->extensions = !intelScreen->has_context_reset_notification
? intelScreenExtensions : intelRobustScreenExtensions;
More information about the mesa-commit
mailing list