diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index ac22668b239a..2d705e8a297e 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -3369,8 +3369,12 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
3369 | 3369 | ||
3370 | /* Set the pending read domains for the batch buffer to COMMAND */ | 3370 | /* Set the pending read domains for the batch buffer to COMMAND */ |
3371 | batch_obj = object_list[args->buffer_count-1]; | 3371 | batch_obj = object_list[args->buffer_count-1]; |
3372 | batch_obj->pending_read_domains = I915_GEM_DOMAIN_COMMAND; | 3372 | if (batch_obj->pending_write_domain) { |
3373 | batch_obj->pending_write_domain = 0; | 3373 | DRM_ERROR("Attempting to use self-modifying batch buffer\n"); |
3374 | ret = -EINVAL; | ||
3375 | goto err; | ||
3376 | } | ||
3377 | batch_obj->pending_read_domains |= I915_GEM_DOMAIN_COMMAND; | ||
3374 | 3378 | ||
3375 | /* Sanity check the batch buffer, prior to moving objects */ | 3379 | /* Sanity check the batch buffer, prior to moving objects */ |
3376 | exec_offset = exec_list[args->buffer_count - 1].offset; | 3380 | exec_offset = exec_list[args->buffer_count - 1].offset; |