intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 2/5] drm/i915: not finding a fence is a non-recoverable condition
Date: Tue, 19 Apr 2011 22:46:01 +0200	[thread overview]
Message-ID: <1303245964-3022-3-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1303245964-3022-1-git-send-email-daniel.vetter@ffwll.ch>

This happens in two cases:
- userspace got its fence accounting wrong or
- the kernel got its fence accounting wrong.

In both cases there's absolutely no point in calling evict_everything,
that will not magically bring back the missing fence. So return a
different (hopefully somewhat sensible) error code.

This has the added benefit that out-of-gtt can be distinguish from
broken fence accounting by simply looking at the ioctl return code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1ef0b91..5c900d3 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2735,7 +2735,7 @@ i915_gem_object_get_fence(struct drm_i915_gem_object *obj,
 
 	reg = i915_find_fence_reg(dev, pipelined);
 	if (reg == NULL)
-		return -ENOSPC;
+		return -EDEADLK;
 
 	if ((old = reg->obj)) {
 		drm_gem_object_reference(&old->base);
-- 
1.7.4.1

  parent reply	other threads:[~2011-04-19 19:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 20:45 [PATCH 0/5] various small patches for -next Daniel Vetter
2011-04-19 20:46 ` [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs Daniel Vetter
2011-04-20  8:18   ` Chris Wilson
2011-04-20 14:27     ` Ben Widawsky
2011-04-20 14:36       ` Chris Wilson
2011-04-19 20:46 ` Daniel Vetter [this message]
2011-04-19 20:46 ` [PATCH 3/5] drm/i915: check gpu_write_list in move_to_flushing Daniel Vetter
2011-04-19 20:46 ` [PATCH 4/5] drm/i915: fix relaxed tiling on gen2: y-tiling on i855gm Daniel Vetter
2011-04-19 20:46 ` [PATCH 5/5] drm/i915: fix relaxed tiling on gen2: tile height Daniel Vetter
2011-04-21  9:23 ` [PATCH 0/5] various small patches for -next Chris Wilson

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=1303245964-3022-3-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).