Commit 2ded0b54 authored by Kenneth Graunke's avatar Kenneth Graunke

intel_stub: Return a non-zero context ID.

Recent Mesa has started detecting a hardware context ID of zero (which
is bogus - it's the default context ID) and failing GL context creation.
Previously it saw that the ioctl returned success and happily proceeded.

Don't bother assigning a real ID, but do assign a non-zero value.
Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
parent 72e5f1ec
......@@ -221,6 +221,11 @@ ioctl(int fd, unsigned long request, ...)
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
return 0;
}
case DRM_IOCTL_I915_GEM_CONTEXT_CREATE: {
struct drm_i915_gem_context_create *cc = argp;
cc->ctx_id = 1; /* must be non-zero */
}
default:
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment