• Matthew Auld's avatar
    drm/i915/ttm: consider CCS for backup objects · 95df9cc2
    Matthew Auld authored
    It seems we can have one or more framebuffers that are still pinned when
    suspending lmem, in such a case we end up creating a shmem backup
    object, instead of evicting the object directly, but this will skip
    copying the CCS aux state, since we don't allocate the extra storage for
    the CCS pages as part of the ttm_tt construction. Since we can already
    deal with pinned objects just fine, it doesn't seem too nasty to just
    extend to support dealing with the CCS aux state, if the object is a
    pinned framebuffer. This fixes display corruption (like in gnome-shell)
    seen on DG2 when returning from suspend.
    
    Fixes: da0595ae ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj")
    Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Nirmoy Das <nirmoy.das@intel.com>
    Cc: Andrzej Hajda <andrzej.hajda@intel.com>
    Cc: Shuicheng Lin <shuicheng.lin@intel.com>
    Cc: <stable@vger.kernel.org> # v5.19+
    Tested-by: default avatarNirmoy Das <nirmoy.das@intel.com>
    Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221212171958.82593-2-matthew.auld@intel.com
    95df9cc2
i915_gem_ttm_pm.c 6.19 KB