All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, emil.l.velikov@gmail.com
Subject: [PATCH libdrm v2] intel: error out on has_error in exec2
Date: Mon, 31 Aug 2015 19:14:12 +0100	[thread overview]
Message-ID: <1441044852-14089-1-git-send-email-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <1440434060-31347-4-git-send-email-emil.l.velikov@gmail.com>

Just like we do for the original exec()

v2: move bo_gem declaration to the top of the function.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 intel/intel_bufmgr_gem.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 7303903..5287419 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -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;
 
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-31 18:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 16:34 [PATCH libdrm 01/17] vbltest: fix variable shadowing warning Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 02/17] modetest: fix shadowing warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 03/17] intel: resolve " Emil Velikov
2015-08-31 18:13   ` [PATCH libdrm v2] " Emil Velikov
2015-08-31 18:20     ` Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 04/17] intel: error out on has_error in exec2 Emil Velikov
2015-08-31 18:14   ` Emil Velikov [this message]
2015-08-31 18:26     ` [PATCH libdrm v2] " Chris Wilson
2015-08-31 19:01       ` Emil Velikov
2015-08-31 19:09         ` Chris Wilson
2015-08-31 19:47           ` [PATCH libdrm 4.1/17] intel: introduce to_bo_gem() helper Emil Velikov
2015-08-31 19:48             ` Chris Wilson
2015-08-24 16:34 ` [PATCH libdrm 05/17] configure: enable -Wshadow when available Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 06/17] amdgpu: remove unneeded -Wno-switch-enum flag Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 07/17] modetest: annotate const data as such for good measure Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 08/17] libkms: use static const " Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 09/17] radeon: cleanup bo/cs func tables Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 10/17] freedreno: annotate the device/bo/pipe/ringbuffer funcs as const data Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 11/17] tests/amdgpu: reference the correct variable for memcpy Emil Velikov
2015-08-24 17:05   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 12/17] tests/amdgpu: annotate the uvd message templates as const data Emil Velikov
2015-08-24 17:06   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 13/17] tests/amdgpu: annotate (most of) the vce " Emil Velikov
2015-08-24 17:07   ` Alex Deucher
2015-08-24 16:34 ` [PATCH libdrm 14/17] tests/amdgpu: ensure tests work by using c99 initializers Emil Velikov
2015-08-24 17:08   ` Alex Deucher
2015-09-04 16:33     ` Alex Deucher
2015-09-04 20:45       ` Emil Velikov
     [not found] ` <1440434060-31347-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-24 16:34   ` [PATCH libdrm 15/17] nouveau: use designated initializers Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 16/17] intel: ignore missing-field-initializers warnings Emil Velikov
2015-08-24 16:34 ` [PATCH libdrm 17/17] configure: remove -Wno-missing-field-initializers Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441044852-14089-1-git-send-email-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.