<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">An additions sentence like "Should be
      released using amdgpu_bo_free()." in the description would be nice
      to have.<br>
      <br>
      But either way Reviewed-by: Christian König
      <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a>.<br>
      <br>
      Regards,<br>
      Christian.<br>
      <br>
      Am 24.06.2016 um 15:33 schrieb Yu, Qiang:<br>
    </div>
    <blockquote
cite="mid:BY2PR12MB0021702595D5B34A76DD5B8C8F2E0@BY2PR12MB0021.namprd12.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <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 style="font-size:11pt"
            color="#000000" face="Calibri, sans-serif"><b>From:</b>
            Qiang Yu <a class="moz-txt-link-rfc2396E" href="mailto:yq882255@163.com"><yq882255@163.com></a><br>
            <b>Sent:</b> Friday, June 24, 2016 9:30:48 PM<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>; 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 <a class="moz-txt-link-rfc2396E" href="mailto:Qiang.Yu@amd.com"><Qiang.Yu@amd.com></a><br>
            <br>
            Change-Id: Icdc00d3e22e48120ca6f4d73ffd05ba43551ad2c<br>
            Signed-off-by: Qiang Yu <a class="moz-txt-link-rfc2396E" href="mailto:Qiang.Yu@amd.com"><Qiang.Yu@amd.com></a><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>
    </blockquote>
    <br>
  </body>
</html>