intel: error out on has_error in exec2
Just like we do for the original exec() v2: move bo_gem declaration to the top of the function. Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by Chris Wilson <chris@chris-wilson.co.uk>main
parent
cf7e32bdf9
commit
94425f6272
|
@ -2185,10 +2185,14 @@ do_exec2(drm_intel_bo *bo, int used, drm_intel_context *ctx,
|
|||
unsigned int flags)
|
||||
{
|
||||
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bo->bufmgr;
|
||||
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
|
||||
struct drm_i915_gem_execbuffer2 execbuf;
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
if (bo_gem->has_error)
|
||||
return -ENOMEM;
|
||||
|
||||
switch (flags & 0x7) {
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -2259,8 +2263,7 @@ skip_execution:
|
|||
drm_intel_gem_dump_validation_list(bufmgr_gem);
|
||||
|
||||
for (i = 0; i < bufmgr_gem->exec_count; i++) {
|
||||
drm_intel_bo_gem *bo_gem =
|
||||
(drm_intel_bo_gem *) bufmgr_gem->exec_bos[i];
|
||||
bo_gem = (drm_intel_bo_gem *) bufmgr_gem->exec_bos[i];
|
||||
|
||||
bo_gem->idle = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue