Bug 50075 - [IVB regression]I-G-T/gem_linear_blits fails(*ERROR* Attempting to unbind pinned buffer)
Summary: [IVB regression]I-G-T/gem_linear_blits fails(*ERROR* Attempting to unbind pi...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-17 20:20 UTC by Guang Yang
Modified: 2017-10-06 14:50 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
after running gem_linear_blits dmesg info (3.30 KB, text/plain)
2012-05-17 20:20 UTC, Guang Yang
no flags Details
dump backtrace (435 bytes, patch)
2012-05-19 12:50 UTC, Daniel Vetter
no flags Details | Splinter Review
dump backtrace, fixed version (438 bytes, patch)
2012-05-19 12:56 UTC, Daniel Vetter
no flags Details | Splinter Review
with patch's dmesg info (6.77 KB, text/plain)
2012-05-21 02:02 UTC, Guang Yang
no flags Details
Error message begone. (1.29 KB, patch)
2012-05-21 02:34 UTC, Chris Wilson
no flags Details | Splinter Review

Description Guang Yang 2012-05-17 20:20:27 UTC
Created attachment 61775 [details]
after running gem_linear_blits dmesg info

System Environment:
--------------------------
Platform:        965GM
Kernel: (drm-intel-next-queued)659900dd3fa07b4ddffebfff07f6ee0341988943
Bug detailed description:
-------------------------
   On 965GM platform ,running gem_linear_blits of the Intel-gpu-tools will fail.
   On the console refresh this every seconds:
  *ERROR* Attempting to unbind pinned buffer
Comment 1 Daniel Vetter 2012-05-19 12:50:44 UTC
Created attachment 61863 [details] [review]
dump backtrace
Comment 2 Daniel Vetter 2012-05-19 12:52:00 UTC
Please apply this patch, reproduce the problem and then attach the dmesg with the backtrace.
Comment 3 Daniel Vetter 2012-05-19 12:56:48 UTC
Created attachment 61864 [details] [review]
dump backtrace, fixed version
Comment 4 Guang Yang 2012-05-21 02:02:59 UTC
Created attachment 61903 [details]
with patch's dmesg info

(In reply to comment #3)
> Created attachment 61864 [details] [review] [review]
> dump backtrace, fixed version
The dmesg with patch.
Comment 5 Chris Wilson 2012-05-21 02:25:17 UTC
And so the unbound patch now fixes a genuine bug :-p
Comment 6 Chris Wilson 2012-05-21 02:27:41 UTC
Or rather the patch required is:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 402726d..54eac99 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2040,10 +2040,8 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)
        if (obj->gtt_space == NULL)
                return 0;
 
-       if (obj->pin_count != 0) {
-               DRM_ERROR("Attempting to unbind pinned buffer\n");
+       if (obj->pin_count != 0)
                return -EINVAL;
-       }
 
        ret = i915_gem_object_finish_gpu(obj);
        if (ret)
Comment 7 Chris Wilson 2012-05-21 02:34:12 UTC
Created attachment 61905 [details] [review]
Error message begone.
Comment 8 Daniel Vetter 2012-05-21 02:36:28 UTC
This is likely a regression introduced in

commit 1b50247a8ddde4af5aaa0e6bc125615372ce6c16
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 24 15:47:30 2012 +0100

    drm/i915: Remove the list of pinned inactive objects
Comment 9 Daniel Vetter 2012-05-23 02:31:19 UTC
Ping for the test result - I'd like to include this patch in a -fixes pull request at the end of this week.
Comment 10 Guang Yang 2012-05-24 02:03:45 UTC
(In reply to comment #9)
> Ping for the test result - I'd like to include this patch in a -fixes pull
> request at the end of this week.

I try patch of chris on comment 7,the issue is gone.
BTW, we try to revert the patch on comment 8 then build the kernel,but fail while compiling.
Comment 11 Daniel Vetter 2012-05-29 06:07:42 UTC
Patch from Chris merged to -fixes.

commit 31d8d651eb646498413abe5f17acc7fa2b68b2fc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu May 24 19:11:20 2012 +0100

    drm/i915: Remove the error message for unbinding pinned buffers
Comment 12 Elizabeth 2017-10-06 14:50:05 UTC
Closing old verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.