From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Siluvery, Arun" 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 Message-ID: <1382443455.7976.49.camel@asiluver-linux.isw.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B4AEE7712 for ; Tue, 22 Oct 2013 05:04:20 -0700 (PDT) Content-Language: en-US Content-ID: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org From: "Siluvery, Arun" 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 --- 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