1. 15 Nov, 2022 27 commits
  2. 10 Nov, 2022 11 commits
  3. 09 Nov, 2022 2 commits
    • Felix Kuehling's avatar
      drm/amdgpu: Set MTYPE in PTE based on BO flags · d1a372af
      Felix Kuehling authored
      The same BO may need different MTYPEs and SNOOP flags in PTEs depending
      on its current location relative to the mapping GPU. Setting MTYPEs from
      clients ahead of time is not practical for coherent memory sharing.
      Instead determine the correct MTYPE for the desired coherence model and
      current BO location when updating the page tables.
      
      To maintain backwards compatibility with MTYPE-selection in
      AMDGPU_VA_OP_MAP, the coherence-model-based MTYPE selection is only
      applied if it chooses an MTYPE other than MTYPE_NC (the default).
      
      Add two AMDGPU_GEM_CREATE_... flags to indicate the coherence model. The
      default if no flag is specified is non-coherent (i.e. coarse-grained
      coherent at dispatch boundaries).
      
      Update amdgpu_amdkfd_gpuvm.c to use this new method to choose the
      correct MTYPE depending on the current memory location.
      
      v2:
      * check that bo is not NULL (e.g. PRT mappings)
      * Fix missing ~ bitmask in gmc_v11_0.c
      v3:
      * squash in "drm/amdgpu: Inherit coherence flags on dmabuf import"
      Suggested-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d1a372af
    • Hamza Mahfooz's avatar
      drm/amd/display: only fill dirty rectangles when PSR is enabled · d852871c
      Hamza Mahfooz authored
      Currently, we are calling fill_dc_dirty_rects() even if PSR isn't
      supported by the relevant link in amdgpu_dm_commit_planes(), this is
      undesirable especially because when drm.debug is enabled we are printing
      messages in fill_dc_dirty_rects() that are only useful for debugging PSR
      (and confusing otherwise). So, we can instead limit the filling of dirty
      rectangles to only when PSR is enabled.
      Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
      Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d852871c