1. 03 May, 2022 3 commits
  2. 02 May, 2022 3 commits
  3. 29 Apr, 2022 4 commits
  4. 28 Apr, 2022 2 commits
  5. 21 Apr, 2022 11 commits
  6. 20 Apr, 2022 1 commit
  7. 19 Apr, 2022 6 commits
  8. 16 Apr, 2022 1 commit
  9. 15 Apr, 2022 7 commits
  10. 14 Apr, 2022 2 commits
    • Ramalingam C's avatar
      drm/i915/migrate: Evict and restore the flatccs capable lmem obj · da0595ae
      Ramalingam C authored
      When we are swapping out the local memory obj on flat-ccs capable platform,
      we need to capture the ccs data too along with main meory and we need to
      restore it when we are swapping in the content.
      
      When lmem object is swapped into a smem obj, smem obj will
      have the extra pages required to hold the ccs data corresponding to the
      lmem main memory. So main memory of lmem will be copied into the initial
      pages of the smem and then ccs data corresponding to the main memory
      will be copied to the subsequent pages of smem. ccs data is 1/256 of
      lmem size.
      
      Swapin happens exactly in reverse order. First main memory of lmem is
      restored from the smem's initial pages and the ccs data will be restored
      from the subsequent pages of smem.
      
      Extracting and restoring the CCS data is done through a special cmd called
      XY_CTRL_SURF_COPY_BLT
      
      v2: Fixing the ccs handling
      v3: Handle the ccs data at same loop as main memory [Thomas]
      v4: changes for emit_copy_ccs
      v5: handle non-flat-ccs scenario
      Signed-off-by: default avatarRamalingam C <ramalingam.c@intel.com>
      Reviewed-by: default avatarThomas Hellstrom <thomas.hellstrom@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220405150840.29351-10-ramalingam.c@intel.com
      da0595ae
    • Ramalingam C's avatar
      drm/i915/gem: Add extra pages in ttm_tt for ccs data · 76a6d563
      Ramalingam C authored
      On Xe-HP and later devices, dedicated compression control state (CCS)
      stored in local memory is used for each surface, to support the
      3D and media compression formats.
      
      The memory required for the CCS of the entire local memory is 1/256 of
      the local memory size. So before the kernel boot, the required memory
      is reserved for the CCS data and a secure register will be programmed
      with the CCS base address
      
      So when an object is allocated in local memory, dont need to explicitly
      allocate the space for ccs data. But when the obj is evicted into the
      smem, to hold the compression related data along with the obj extra space
      is needed in smem. i.e obj_size + (obj_size/256).
      
      Hence when a smem pages are allocated for an obj with lmem placement
      possibility we create with the extra pages required for the ccs data for
      the obj size.
      
      v2:
        Used imperative wording [Thomas]
      v3:
        Inflate the pages only when obj's placement is lmem only
      v4:
        GEM_BUG_ON if the ttm->num_pages > obj page size [Thomas]
      Signed-off-by: default avatarRamalingam C <ramalingam.c@intel.com>
      cc: Christian Koenig <christian.koenig@amd.com>
      cc: Hellstrom Thomas <thomas.hellstrom@intel.com>
      Reviewed-by: default avatarThomas Hellstrom <thomas.hellstrom@linux.intel.com>
      Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220405150840.29351-9-ramalingam.c@intel.com
      76a6d563