mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 03:58:05 +02:00
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>
This commit is contained in:
parent
cf7e32bdf9
commit
94425f6272
1 changed files with 5 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue