<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">The function called is either
      amdgpu_vm_do_set_ptes() or amdgpu_vm_do_copy_ptes().<br>
      <br>
      But that is actually rather unrelated to the local handling of
      addr in the function changed.<br>
      <br>
      The point here is we have handled the address offset by giving it
      to amdgpu_vm_map_gart() and so we shouldn't add the address again.<br>
      <br>
      Regards,<br>
      Christian.<br>
      <br>
      Am 26.09.2016 um 15:46 schrieb StDenis, Tom:<br>
    </div>
    <blockquote
cite="mid:CY4PR12MB1768C24C35861367BAD1BA07F7CD0@CY4PR12MB1768.namprd12.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>I'm reading through the amdgpu_vm.c to try and see if the
          patch is correct but I'm not that familiar with the VM side of
          things.  It seems to boil down to calling params->func()
          with a new dst value of NULL but that's where I'm stopped at
          the moment since I don't know what func() is.  Nothing up to
          that point looks overtly wrong (like trying to use that
          address as a source for a read/write).</p>
        <p><br>
        </p>
        <p>Tom</p>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <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> amd-gfx
                <a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a> on behalf
                of Christian König <a class="moz-txt-link-rfc2396E" href="mailto:deathsimple@vodafone.de"><deathsimple@vodafone.de></a><br>
                <b>Sent:</b> Monday, September 26, 2016 09:29<br>
                <b>To:</b> Cui, Flora<br>
                <b>Cc:</b> Huang, Ray; <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
                <b>Subject:</b> Re: [PATCH] drm/amdgpu: fix addr
                handling in amdgpu_vm_bo_update_mapping</font>
              <div> </div>
            </div>
          </div>
          <font size="2"><span style="font-size:10pt;">
              <div class="PlainText">Yeah, that wouldn't really help but
                just make the problem more unlikely
                <br>
                to happen once more.<br>
                <br>
                Anyway Tom St confirmed that the patch seems to work for
                the open stack.<br>
                <br>
                Anybody brave enough to throw an rb on this so that I
                can commit it?<br>
                <br>
                Thanks,<br>
                Christian.<br>
                <br>
                Am 26.09.2016 um 11:16 schrieb Flora Cui:<br>
                > please ignore this patch. it actually revert the
                gtt mgr changes.<br>
                ><br>
                > On Mon, Sep 26, 2016 at 03:19:01PM +0800, Flora Cui
                wrote:<br>
                >> On Sun, Sep 25, 2016 at 11:55:13AM +0200,
                Christian König wrote:<br>
                >>> From: Christian König
                <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a><br>
                >>><br>
                >>> Otherwise we will look at the wrong place
                in the IB when GART<br>
                >>> mappings are split into smaller updates.<br>
                >>><br>
                >>> Signed-off-by: Christian König
                <a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a><br>
                >>> ---<br>
                >>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c |
                1 +<br>
                >>>   1 file changed, 1 insertion(+)<br>
                >>><br>
                >>> diff --git
                a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
                b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >>> index 2bb78dc..da31189 100644<br>
                >>> ---
                a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >>> +++
                b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >>> @@ -1017,6 +1017,7 @@ static int
                amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,<br>
>>>                                                 
                AMDGPU_GPU_PAGE_SIZE);<br>
                >>>                      pte[i] |= flags;<br>
                >>>              }<br>
                >>> +           addr = 0;<br>
                >>>      }<br>
                >>>   <br>
                >>>      r = amdgpu_sync_fence(adev,
                &job->sync, exclusive);<br>
                >>> -- <br>
                >>> 2.5.0<br>
                >>><br>
                >>><br>
                >> IMHO this could fix the vmfault issue.<br>
                >><br>
                >> 8<---<br>
                >>  From cc7b5618665defd88e2adcd6f735562ecd784298
                Mon Sep 17 00:00:00 2001<br>
                >> From: Flora Cui <a class="moz-txt-link-rfc2396E" href="mailto:Flora.Cui@amd.com"><Flora.Cui@amd.com></a><br>
                >> Date: Mon, 26 Sep 2016 15:14:02 +0800<br>
                >> Subject: [PATCH] drm/amdgpu: add ttm_bind in
                amdgpu_vm_bo_update()<br>
                >><br>
                >> Change-Id:
                If73d5b06e9188e40250ccdfd1a2a659ed1ef52a6<br>
                >> Signed-off-by: Flora Cui
                <a class="moz-txt-link-rfc2396E" href="mailto:Flora.Cui@amd.com"><Flora.Cui@amd.com></a><br>
                >> ---<br>
                >>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++<br>
                >>   1 file changed, 2 insertions(+)<br>
                >><br>
                >> diff --git
                a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
                b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >> index 2bb78dc..7f17127 100644<br>
                >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c<br>
                >> @@ -1166,6 +1166,8 @@ int
                amdgpu_vm_bo_update(struct amdgpu_device *adev,<br>
                >>                       ttm =
                container_of(bo_va->bo->tbo.ttm, struct<br>
                >>                                         
                ttm_dma_tt, ttm);<br>
                >>                       pages_addr =
                ttm->dma_address;<br>
                >> +                   
                amdgpu_ttm_bind(&bo_va->bo->tbo, mem);<br>
                >> +                    addr = (u64)mem->start
                << PAGE_SHIFT;<br>
                >>                       break;<br>
                >>   <br>
                >>               case TTM_PL_VRAM:<br>
                >> -- <br>
                >> 2.7.4<br>
                >><br>
                >><br>
                >> _______________________________________________<br>
                >> amd-gfx mailing list<br>
                >> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
                >> <a moz-do-not-send="true"
                  href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
                  id="LPlnk752113">
                  https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
                <div id="LPBorder_GT_14748974921180.061148974248180776"
                  style="margin-bottom: 20px; overflow: auto; width:
                  100%; text-indent: 0px;">
                  <table
                    id="LPContainer_14748974921150.5420295662969261"
                    style="width: 90%; background-color: rgb(255, 255,
                    255); position: relative; overflow: auto;
                    padding-top: 20px; padding-bottom: 20px; margin-top:
                    20px; border-top: 1px dotted rgb(200, 200, 200);
                    border-bottom: 1px dotted rgb(200, 200, 200);"
                    cellspacing="0">
                    <tbody>
                      <tr style="border-spacing: 0px;" valign="top">
                        <td
                          id="TextCell_14748974921160.9203516131537464"
                          colspan="2" style="vertical-align: top;
                          position: relative; padding: 0px; display:
                          table-cell;">
                          <div
                            id="LPTitle_14748974921170.667584414663523"
                            style="top: 0px; color: rgb(59, 87, 119);
                            font-weight: normal; font-size: 21px;
                            font-family: wf_segoe-ui_light, "Segoe
                            UI Light", "Segoe WP Light",
                            "Segoe UI", "Segoe WP",
                            Tahoma, Arial, sans-serif; line-height:
                            21px;">
                            <a moz-do-not-send="true"
                              id="LPUrlAnchor_14748974921170.2600095206173294"
href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
                              target="_blank" style="text-decoration:
                              none;">amd-gfx Info Page -
                              lists.freedesktop.org</a></div>
                          <div
                            id="LPMetadata_14748974921170.8198680036506909"
                            style="margin: 10px 0px 16px; color:
                            rgb(102, 102, 102); font-weight: normal;
                            font-family: wf_segoe-ui_normal, "Segoe
                            UI", "Segoe WP", Tahoma,
                            Arial, sans-serif; font-size: 14px;
                            line-height: 14px;">
                            lists.freedesktop.org</div>
                          <div
                            id="LPDescription_14748974921180.08916125964466382"
                            style="display: block; color: rgb(102, 102,
                            102); font-weight: normal; font-family:
                            wf_segoe-ui_normal, "Segoe UI",
                            "Segoe WP", Tahoma, Arial,
                            sans-serif; font-size: 14px; line-height:
                            20px; max-height: 100px; overflow: hidden;">
                            To see the collection of prior postings to
                            the list, visit the amd-gfx Archives. Using
                            amd-gfx: To post a message to all the list
                            members, send email ...</div>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <br>
                <br>
                > _______________________________________________<br>
                > amd-gfx mailing list<br>
                > <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
                > <a moz-do-not-send="true"
                  href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
                <br>
                <br>
                _______________________________________________<br>
                amd-gfx mailing list<br>
                <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
              </div>
            </span></font></div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>