<div dir="ltr"><div>There is no GDS shadowing info in the device info uapi, so userspace can't create any GDS buffer and thus can't have any GDS va. It's a uapi issue, not what firmware wants to do.<br></div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 6, 2023 at 6:31 AM Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" target="_blank">ckoenig.leichtzumerken@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    That's what I thought as well, but Mitch/Hans insisted on that.<br>
    <br>
    We should probably double check internally.<br>
    <br>
    Christian.<br>
    <br>
    <div>Am 06.04.23 um 11:43 schrieb Marek
      Olšák:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>GDS memory isn't used on gfx11. Only GDS OA is used.<br>
        </div>
        <div><br>
        </div>
        <div>Marek<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Apr 6, 2023 at 5:09 AM
          Christian König <<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div> Why that?<br>
            <br>
            This is the save buffer for GDS, not the old style GDS BOs.<br>
            <br>
            Christian.<br>
            <br>
            <div>Am 06.04.23 um 09:36 schrieb Marek Olšák:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>gds_va is unnecessary.</div>
                <div><br>
                </div>
                <div>Marek<br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Thu, Mar 30, 2023
                  at 3:18 PM Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For GFX11, the UMD
                  needs to allocate some shadow buffers<br>
                  to be used for preemption.  The UMD allocates the
                  buffers<br>
                  and passes the GPU virtual address to the kernel since
                  the<br>
                  kernel will program the packet that specified these<br>
                  addresses as part of its IB submission frame.<br>
                  <br>
                  v2: UMD passes shadow init to tell kernel when to
                  initialize<br>
                      the shadow<br>
                  <br>
                  Reviewed-by: Christian König <<a href="mailto:christian.koenig@amd.com" target="_blank">christian.koenig@amd.com</a>><br>
                  Signed-off-by: Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>><br>
                  ---<br>
                   include/uapi/drm/amdgpu_drm.h | 10 ++++++++++<br>
                   1 file changed, 10 insertions(+)<br>
                  <br>
                  diff --git a/include/uapi/drm/amdgpu_drm.h
                  b/include/uapi/drm/amdgpu_drm.h<br>
                  index b6eb90df5d05..3d9474af6566 100644<br>
                  --- a/include/uapi/drm/amdgpu_drm.h<br>
                  +++ b/include/uapi/drm/amdgpu_drm.h<br>
                  @@ -592,6 +592,7 @@ struct drm_amdgpu_gem_va {<br>
                   #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07<br>
                   #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT    0x08<br>
                   #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL  0x09<br>
                  +#define AMDGPU_CHUNK_ID_CP_GFX_SHADOW   0x0a<br>
                  <br>
                   struct drm_amdgpu_cs_chunk {<br>
                          __u32           chunk_id;<br>
                  @@ -708,6 +709,15 @@ struct drm_amdgpu_cs_chunk_data {<br>
                          };<br>
                   };<br>
                  <br>
                  +#define
                  AMDGPU_CS_CHUNK_CP_GFX_SHADOW_FLAGS_INIT_SHADOW       
                   0x1<br>
                  +<br>
                  +struct drm_amdgpu_cs_chunk_cp_gfx_shadow {<br>
                  +       __u64 shadow_va;<br>
                  +       __u64 csa_va;<br>
                  +       __u64 gds_va;<br>
                  +       __u64 flags;<br>
                  +};<br>
                  +<br>
                   /*<br>
                    *  Query h/w info: Flag that this is integrated
                  (a.h.a. fusion) GPU<br>
                    *<br>
                  -- <br>
                  2.39.2<br>
                  <br>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>