Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2016 19:07:39 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Michael Butler <imb@protected-networks.net>
Cc:        FreeBSD Current <freebsd-current@FreeBSD.org>
Subject:   Re: DRM_I915_GEM_OBJECT_MAX_PIN_COUNT failure on -current
Message-ID:  <20161213170739.GB54029@kib.kiev.ua>
In-Reply-To: <57abe23a-d7b5-953c-9119-c1d281106db6@protected-networks.net>
References:  <57abe23a-d7b5-953c-9119-c1d281106db6@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2016 at 11:49:37AM -0500, Michael Butler wrote:
> I've been bitten by this twice on a KDE desktop in the last 24 hours .. 
> same error on both occasions :-(
> 
> error: [drm:pid1197:i915_gem_object_pin] *ERROR* WARN ON: obj->pin_count 
> == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT
> pid 1197 (Xorg), uid 0: exited on signal 6 (core dumped)
> 
>   [ .. ]
> 
> error: [drm:pid16212:i915_gem_object_pin] *ERROR* WARN ON: 
> obj->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT
> pid 16212 (Xorg), uid 0: exited on signal 6 (core dumped)
> 
> I see only one change in the dev/drm2 sources (r309712) but there have 
> been many in the vm code.
> 
> Any hints/pointers appreciated,

This is indeed a bug in r309712, it seems.  Please try this.

diff --git a/sys/dev/drm2/i915/i915_gem.c b/sys/dev/drm2/i915/i915_gem.c
index 2a53ae8f8ed..0fa5249e553 100644
--- a/sys/dev/drm2/i915/i915_gem.c
+++ b/sys/dev/drm2/i915/i915_gem.c
@@ -1521,7 +1521,7 @@ retry:
 	/* Now bind it into the GTT if needed */
 	ret = i915_gem_object_pin(obj, 0, true, false);
 	if (ret)
-		goto unpin;
+		goto unlock;
 	pinned = 1;
 
 	ret = i915_gem_object_set_to_gtt_domain(obj, write);
@@ -1580,6 +1580,8 @@ have_page:
 	return (VM_PAGER_OK);
 
 unpin:
+	i915_gem_object_unpin(obj);
+unlock:
 	DRM_UNLOCK(dev);
 out:
 	KASSERT(ret != 0, ("i915_gem_pager_fault: wrong return"));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161213170739.GB54029>