Problem has been solved by compiling libdrm form source code, so the release error is caused by libdrm.<div><br></div><div>1. I run the follow command, problem not solved. I guess it's wrong with PPA https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers/</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sudo apt-get --purge autoremove libdrm-dev</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>sudo apt-get install libdrm-dev</div><div><span class="Apple-tab-span" style="white-space:pre"> </span><span style="line-height: 16.7999992370605px;">apt-show-versions libdrm-dev</span></div><div><span style="line-height: 16.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>libdrm-dev:amd64/trusty 2.4.60+git1505061830.812e8f~gd~t uptodate</span></div><div><span style="line-height: 16.7999992370605px;"><span class="Apple-tab-span" style="white-space:pre"> </span>... recompile Beignet</span></div><div><span style="line-height: 16.7999992370605px;"><br></span></div><div><span style="line-height: 16.7999992370605px;">2. Recompile </span><a href="http://dri.freedesktop.org/libdrm/libdrm-2.4.58.tar.gz" target="_blank" style="line-height: 16.7999992370605px;"><span style="font-size: 13.5pt; font-family: 宋体;">libdrm-2.4.58.tar.gz</span></a><span style="line-height: 16.7999992370605px;"> from </span><a href="http://dri.freedesktop.org/libdrm/" target="_blank" style="line-height: 16.7999992370605px;">http://dri.freedesktop.org/libdrm/</a>, it's OK</div><div><br></div><div>3. Recompile <a href="http://dri.freedesktop.org/libdrm/libdrm-2.4.58.tar.gz" target="_blank" style="line-height: 16.7999992370605px;"><span style="font-size: 13.5pt; font-family: 宋体;">libdrm-2.4.60.tar.gz</span></a><span style="line-height: 16.7999992370605px;"> from </span><a href="http://dri.freedesktop.org/libdrm/" target="_blank" style="line-height: 16.7999992370605px;">http://dri.freedesktop.org/libdrm/</a>, it's OK<span style="line-height: 16.7999992370605px;"> </span></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><br><br><br><blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0">-----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Guo, Yejun" <yejun.guo@intel.com></span><br>
<b>发送时间:</b><span id="rc_senttime">2015-05-07 10:41:32 (星期四)</span><br>
<b>收件人:</b> "Gao, Sanshan" <gss@mail.ustc.edu.cn>, "beignet@lists.freedesktop.org" <beignet@lists.freedesktop.org><br>
<b>抄送:</b> <br>
<b>主题:</b> RE: [Beignet] "utest_run -c runtime_use_host_ptr_buffer" failed to release test userptr object! [Append]<br><br>
<style></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It is a message from libdrm, what’s your exact version of libdrm and linux kernel?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I did not see this message at my Ubuntu14.04 64bit system with libdrm 2.4.58 (built from source) and linux kernel 3.19 (download from kernel.org)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Beignet [mailto:<a href="mailto:beignet-bounces@lists.freedesktop.org" target="_blank">beignet-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Gao, Sanshan<br>
<b>Sent:</b> Thursday, May 07, 2015 9:39 AM<br>
<b>To:</b> <a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [Beignet] "utest_run -c runtime_use_host_ptr_buffer" failed to release test userptr object! [Append]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My simple demo now has the same hint, <span style="background:yellow">Failed to release test userptr object! (9) i915 kernel driver may not be sane!</span> , but it works correct last night.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have used the Patch and run "<span style="font-family:Consolas;background:ghostwhite">echo 0 > /sys/module/i915/parameters/enable_cmd_parser</span>".<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">-----<span lang="ZH-CN" style="font-family:宋体">原始邮件</span>-----<br>
<b><span lang="ZH-CN" style="font-family:宋体">发件人</span>:</b>"Gao, Sanshan" <<a href="mailto:gss@mail.ustc.edu.cn" target="_blank">gss@mail.ustc.edu.cn</a>><br>
<b><span lang="ZH-CN" style="font-family:宋体">发送时间</span>:</b>2015-05-07 09:29:19 (<span lang="ZH-CN" style="font-family:宋体">星期四</span>)<br>
<b><span lang="ZH-CN" style="font-family:宋体">收件人</span>:</b> "<a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a>" <<a href="mailto:beignet@lists.freedesktop.org" target="_blank">beignet@lists.freedesktop.org</a>><br>
<b><span lang="ZH-CN" style="font-family:宋体">抄送</span>:</b> <br>
<b><span lang="ZH-CN" style="font-family:宋体">主题</span>:</b> "utest_run -c runtime_use_host_ptr_buffer" failed to release test userptr object!<br>
<br>
Hello, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>1. </b>When I run "./utest_run -c runtime_use_host_ptr_buffer", I get this message:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">... ...<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">device_opencl_c_version "OpenCL C 1.2 beignet 1.1 (git-83f8739)"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="background:yellow">Failed to release test userptr object! (9) i915 kernel driver may not be sane!</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">21 image formats are supported<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">... ...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">runtime_use_host_ptr_buffer() [SUCCESS]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="background:yellow">Failed to release test userptr object! (9) i915 kernel driver may not be sane!</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">summary:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">----------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> total: 681<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> run: 1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <span style="background:yellow">pass: 1</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> fail: 0<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> pass rate: 1.000000<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>2. </b>When I run "cmake ../", maybe everything is OK, because I get this message:<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">-- Building mode: RelWithDebInfo<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- LLVM llvm-config found at: /usr/bin/llvm-config-3.5<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- find unstable LLVM version 3.5.0<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for XLib - found<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="background:yellow">-- Looking for DRM - found at /usr 2.4.60</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="background:yellow">-- Looking for DRM Intel - found at /usr 2.4.60</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="background:yellow">-- Enable userptr support</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Enable EU total query support<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Enable subslice total query support<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for OpenGL - found at /usr<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for Xext - found at /usr<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for Xfixes - found at /usr<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for EGL - found at /usr<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Looking for OCL ICD header file - found<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Building mode: RelWithDebInfo<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">running cd "/home/gss/files/beignet/utests" && mkdir generated -p 2>&1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Configuring done<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Generating done<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-- Build files have been written to: /home/gss/files/beignet/build<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>3. </b>I have written a simple demo using CL_MEM_USE_HOST_PTR, and it gets right result.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Problem: What's wrong with my Beignet? <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</blockquote></div>