drm/i915: consider HAS_FLAT_CCS() in needs_ccs_pages
authorMatthew Auld <matthew.auld@intel.com>
Mon, 5 Sep 2022 10:53:29 +0000 (11:53 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 6 Sep 2022 08:35:14 +0000 (09:35 +0100)
commit873fef8833ea794526b7f4179088e565078fe0e8
tree97b00b3de38dd41d4261e9707ae399b6676b1a90
parentc2a6502f36248e9e17806d1342e4617d895960b0
drm/i915: consider HAS_FLAT_CCS() in needs_ccs_pages

Just move the HAS_FLAT_CCS() check into needs_ccs_pages. This also then
fixes i915_ttm_memcpy_allowed() which was incorrectly reporting true on
DG1, even though it doesn't have small-BAR or flat-CCS.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/6605
Fixes: efeb3caf4341 ("drm/i915/ttm: disallow CPU fallback mode for ccs pages")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220905105329.41455-1-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/i915_gem_ttm.c