<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Fix type error of "reference".</p>
<p><br>
</p>
<p>Regards,</p>
<p>Qiang</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Qiang Yu <yq882255@163.com><br>
<b>Sent:</b> Friday, June 24, 2016 9:30:48 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; Koenig, Christian<br>
<b>Cc:</b> Yu, Qiang<br>
<b>Subject:</b> [PATCH v3][libdrm] amdgpu: add amdgpu_bo_inc_ref() function.</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">From: Qiang Yu <Qiang.Yu@amd.com><br>
<br>
Change-Id: Icdc00d3e22e48120ca6f4d73ffd05ba43551ad2c<br>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com><br>
---<br>
amdgpu/amdgpu.h | 13 +++++++++++++<br>
amdgpu/amdgpu_bo.c | 6 ++++++<br>
2 files changed, 19 insertions(+)<br>
<br>
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h<br>
index 693d841..d8c436f 100644<br>
--- a/amdgpu/amdgpu.h<br>
+++ b/amdgpu/amdgpu.h<br>
@@ -716,6 +716,19 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,<br>
int amdgpu_bo_free(amdgpu_bo_handle buf_handle);<br>
<br>
/**<br>
+ * Increase the reference count of a buffer object<br>
+ *<br>
+ * \param bo - \c [in] Buffer object handle to increase the reference count<br>
+ *<br>
+ * \return 0 on success\n<br>
+ * <0 - Negative POSIX Error code<br>
+ *<br>
+ * \sa amdgpu_bo_alloc(), amdgpu_bo_free()<br>
+ *<br>
+*/<br>
+int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);<br>
+<br>
+/**<br>
* Request CPU access to GPU accessable memory<br>
*<br>
* \param buf_handle - \c [in] Buffer handle<br>
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c<br>
index aa0d001..c3f5fb9 100644<br>
--- a/amdgpu/amdgpu_bo.c<br>
+++ b/amdgpu/amdgpu_bo.c<br>
@@ -424,6 +424,12 @@ int amdgpu_bo_free(amdgpu_bo_handle buf_handle)<br>
return 0;<br>
}<br>
<br>
+int amdgpu_bo_inc_ref(amdgpu_bo_handle bo)<br>
+{<br>
+ atomic_inc(&bo->refcount);<br>
+ return 0;<br>
+}<br>
+<br>
int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)<br>
{<br>
union drm_amdgpu_gem_mmap args;<br>
-- <br>
1.9.1<br>
<br>
<br>
</div>
</span></font>
</body>
</html>