Commit 385db982 authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/i915/cnl: Avoid ioremap_wc on Cannonlake as well.

Driver’s CPU access to GTT is via the GTTMMADR BAR.

The current HW implementation of that BAR is to only
support <= DW (and maybe QW) writes—not 16/32/64B writes
that could occur with WC and/or SSE/AVX moves.

GTTMMADR must be marked uncacheable (UC).
Accesses to GTTMMADR(GTT), must be 64 bits or less (ie. 1 GTT entry).

v2: Get clarification on the reasons and spec is getting
    updated to reflect it now.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Suggested-by: default avatarBen Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170829230907.21363-1-rodrigo.vivi@intel.com
parent 86ebb015
...@@ -2790,13 +2790,13 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size) ...@@ -2790,13 +2790,13 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
phys_addr = pci_resource_start(pdev, 0) + pci_resource_len(pdev, 0) / 2; phys_addr = pci_resource_start(pdev, 0) + pci_resource_len(pdev, 0) / 2;
/* /*
* On BXT writes larger than 64 bit to the GTT pagetable range will be * On BXT+/CNL+ writes larger than 64 bit to the GTT pagetable range
* dropped. For WC mappings in general we have 64 byte burst writes * will be dropped. For WC mappings in general we have 64 byte burst
* when the WC buffer is flushed, so we can't use it, but have to * writes when the WC buffer is flushed, so we can't use it, but have to
* resort to an uncached mapping. The WC issue is easily caught by the * resort to an uncached mapping. The WC issue is easily caught by the
* readback check when writing GTT PTE entries. * readback check when writing GTT PTE entries.
*/ */
if (IS_GEN9_LP(dev_priv)) if (IS_GEN9_LP(dev_priv) || INTEL_GEN(dev_priv) >= 10)
ggtt->gsm = ioremap_nocache(phys_addr, size); ggtt->gsm = ioremap_nocache(phys_addr, size);
else else
ggtt->gsm = ioremap_wc(phys_addr, size); ggtt->gsm = ioremap_wc(phys_addr, size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment