Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area
@ 2013-10-22 12:04 Siluvery, Arun
  2013-10-22 12:15 ` Chris Wilson
  2013-12-05 14:28 ` Daniel Vetter
  0 siblings, 2 replies; 15+ messages in thread
From: Siluvery, Arun @ 2013-10-22 12:04 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org

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

^ permalink raw reply related	[flat|nested] 15+ messages in thread
[parent not found: <20131023131038.GM3011@nuc-i3427.alporthouse.com>]

end of thread, other threads:[~2013-12-05 15:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 12:04 [PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area Siluvery, Arun
2013-10-22 12:15 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox