From: "Siluvery, Arun" <arun.siluvery@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area
Date: Tue, 22 Oct 2013 12:04:17 +0000 [thread overview]
Message-ID: <1382443455.7976.49.camel@asiluver-linux.isw.intel.com> (raw)
From: "Siluvery, Arun" <arun.siluvery@intel.com>
When a mapping is requested and if there is no space the mapping fails
and the region is not physically backed. This results in
signal 7(SIGBUS), code 2 (BUS_ADRERR) when it is actually accessed.
This patch handles this error, continues to wait and retries to find space.
Signed-off-by: Siluvery, Arun <arun.siluvery@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e7b39d7..927a27b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3275,6 +3275,10 @@ search_free:
obj->cache_level,
map_and_fenceable,
nonblocking);
+
+ if (ret == -ENOSPC)
+ ret = i915_gem_evict_everything(dev);
+
if (ret == 0)
goto search_free;
--
1.8.4
next reply other threads:[~2013-10-22 12:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 12:04 Siluvery, Arun [this message]
2013-10-22 12:15 ` [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area Chris Wilson
2013-10-22 12:30 ` Daniel Vetter
2013-10-23 9:44 ` Bloomfield, Jon
2013-10-23 9:55 ` Daniel Vetter
2013-10-23 10:02 ` Chris Wilson
2013-12-05 14:28 ` Daniel Vetter
2013-12-05 15:14 ` Daniel Vetter
2013-12-05 15:14 ` [PATCH] drm/i915: When evicting something fails, try unpinning old contexts and framebuffers Chris Wilson
2013-12-05 15:19 ` Daniel Vetter
2013-12-05 15:25 ` Chris Wilson
[not found] <20131023131038.GM3011@nuc-i3427.alporthouse.com>
[not found] ` <AD48BB7FB99B174FBCC69E228F58B3B601544938@IRSMSX103.ger.corp.intel.com>
[not found] ` <CAKMK7uE3gZfSGK0eteNLijGzDEJSXH=gRovRsgVaZZVGqOxZkw@mail.gmail.com>
[not found] ` <AD48BB7FB99B174FBCC69E228F58B3B601544FDC@IRSMSX103.ger.corp.intel.com>
[not found] ` <20131024153253.GB7752@nuc-i3427.alporthouse.com>
[not found] ` <AD48BB7FB99B174FBCC69E228F58B3B601547D89@IRSMSX103.ger.corp.intel.com>
[not found] ` <20131101112127.GD13837@nuc-i3427.alporthouse.com>
[not found] ` <AD48BB7FB99B174FBCC69E228F58B3B601547DC6@IRSMSX103.ger.corp.intel.com>
[not found] ` <20131101115122.GA5664@nuc-i3427.alporthouse.com>
[not found] ` <AD48BB7FB99B174FBCC69E228F58B3B601547E34@IRSMSX103.ger.corp.intel.com>
[not found] ` <20131101124740.GB5664@nuc-i3427.alporthouse.com>
2013-11-01 16:56 ` [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area Daniel Vetter
2013-11-01 18:06 ` Bloomfield, Jon
2013-11-01 18:37 ` Daniel Vetter
2013-11-02 12:15 ` Daniel Vetter
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=1382443455.7976.49.camel@asiluver-linux.isw.intel.com \
--to=arun.siluvery@intel.com \
--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