Bug 59229

Summary: [Bisected]I-G-T/ prime_self_import fail
Product: DRI Reporter: yanbing <bingx.a.yan>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: bingx.a.yan, yangweix.shui
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 54111    
Attachments:
Description Flags
prime_self_import.dmesg none

Description yanbing 2013-01-11 08:17:45 UTC
Created attachment 72839 [details]
prime_self_import.dmesg

Environment:
--------------------------
The first bad commit info

Repo url:  git://people.freedesktop.org/~airlied/linux
Branch:drm-fixes

commit be8a42ae60addd8b6092535c11b42d099d6470ec
Author: Seung-Woo Kim <sw0312.kim@samsung.com>
Date:   Thu Sep 27 15:30:06 2012 +0900

    drm/prime: drop reference on imported dma-buf come from gem



Steps:
---------------------------

./prime_self_import



Result:
--------------------------
prime_self_import: prime_self_import.c:61: check_bo: Assertion `ptr1' failed.
Aborted (core dumped)


The dmesg info was on the attachment.
Comment 1 Jani Nikula 2013-01-11 12:10:03 UTC

*** This bug has been marked as a duplicate of bug 54111 ***
Comment 2 Daniel Vetter 2013-01-11 13:35:46 UTC
Disagree with Jani here, sounds like a different bug caught by the same test.
Comment 3 Jani Nikula 2013-01-11 14:07:44 UTC
(In reply to comment #2)
> Disagree with Jani here, sounds like a different bug caught by the same test.

My conclusion may have been hasty, based on the assumption that

commit be8a42ae60addd8b6092535c11b42d099d6470ec
Author: Seung-Woo Kim <sw0312.kim@samsung.com>
Date:   Thu Sep 27 15:30:06 2012 +0900

    drm/prime: drop reference on imported dma-buf come from gem

was an attempt to fix bug 54111, but then caused this bug. In any case, the impact of said patch was known, but apparently ignored: http://mid.gmane.org/874nmjh995.fsf@intel.com
Comment 4 lu hua 2013-01-24 05:50:08 UTC
It fails on -fixes branch and -queued branch.
Comment 5 Imre Deak 2013-04-11 09:29:47 UTC
The bug should be fixed by Dave's WIP patch:

http://lists.freedesktop.org/archives/dri-devel/2013-April/037145.html
Comment 6 shui yangwei 2013-04-12 02:00:24 UTC
I have tried with this patch, and I can't reproduce this issue. return value is 0, and worked pretty well.
Comment 7 Daniel Vetter 2013-05-01 09:26:01 UTC
Dave Airlie merged the prime refcount fixes into drm-next, which is now included in drm-intel-nightly. Note that dinq/drm-intel-fixes does not yet have the patches, since it's a drm upstream issue.
Comment 8 shui yangwei 2013-05-02 03:39:57 UTC
(In reply to comment #7)
> Dave Airlie merged the prime refcount fixes into drm-next, which is now
> included in drm-intel-nightly. Note that dinq/drm-intel-fixes does not yet
> have the patches, since it's a drm upstream issue.

Ok, I verified it here.
Comment 9 Elizabeth 2017-10-06 14:47:12 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.