treewide: Replace the use of mem_encrypt_active() with cc_platform_has()
[sfrench/cifs-2.6.git] / drivers / gpu / drm / drm_cache.c
index 30cc59fe6ef79a8eff16c2630104f0523d52b20e..f19d9acbe959363a7928f8e319f461ddddf3e4f4 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/dma-buf-map.h>
 #include <linux/export.h>
 #include <linux/highmem.h>
-#include <linux/mem_encrypt.h>
+#include <linux/cc_platform.h>
 #include <xen/xen.h>
 
 #include <drm/drm_cache.h>
@@ -204,7 +204,7 @@ bool drm_need_swiotlb(int dma_bits)
         * Enforce dma_alloc_coherent when memory encryption is active as well
         * for the same reasons as for Xen paravirtual hosts.
         */
-       if (mem_encrypt_active())
+       if (cc_platform_has(CC_ATTR_MEM_ENCRYPT))
                return true;
 
        for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling)