drm/i915/gem: Prevent using pgprot_writecombine() if PAT is not supported
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Sep 2020 09:14:16 +0000 (10:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 15 Sep 2020 10:34:05 +0000 (11:34 +0100)
commit121ba69ffddc60df11da56f6d5b29bdb45c8eb80
treea4c7b803c965a8ce49570d21b4893475afad8261
parent060bb115c2d664f04db9c7613a104dfaef3fdd98
drm/i915/gem: Prevent using pgprot_writecombine() if PAT is not supported

Let's not try and use PAT attributes for I915_MAP_WC if the CPU doesn't
support PAT.

Fixes: 6056e50033d9 ("drm/i915/gem: Support discontiguous lmem object maps")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Cc: <stable@vger.kernel.org> # v5.6+
Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_pages.c