Adaptation for ARM64 support
To build current xe on Arm64, we need minor adaptation, as _PAGE* aren't existing in Arm64
#if defined(CONFIG_ARM64)
#define _PAGE_BIT_PRESENT 0 /* is present */
#define _PAGE_BIT_RW 1 /* writeable */
#define _PAGE_BIT_PWT 3 /* page write through */
#define _PAGE_BIT_PCD 4 /* page cache disabled */
#define _PAGE_BIT_PAT 7 /* on 4KB pages */
#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
#endif
(impacting xe_vm.c & xe_ggtt.c)
Current trend on DII was to use GEN8_ define
drivers/gpu/drm/i915/gt/gen8_ppgtt.c: u64 pde = addr | GEN8_PAGE_PRESENT | GEN8_PAGE_RW;
Minor change in Kconfig
diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 6c13932e855b..2d13267896c1 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -2,8 +2,7 @@
config DRM_XE
tristate "Intel Xe Graphics"
depends on DRM
- depends on X86 && PCI
- select INTEL_GTT
+ depends on (X86 || ARM64) && PCI
select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular
# the shmem_readpage() which depends upon tmpfs
@@ -18,7 +17,7 @@ config DRM_XE
# but for select to work, need to select ACPI_VIDEO's dependencies, ick
select BACKLIGHT_CLASS_DEVICE if ACPI
select INPUT if ACPI
- select ACPI_VIDEO if ACPI
+ select ACPI_VIDEO if (X86 && ACPI)
select ACPI_BUTTON if ACPI
select SYNC_FILE
select IOSF_MBI
Correct me if am wrong but there xe has no dependency to INTEL_GTT, so it can be simply removed.
With these local changes, it is building & loading on mt-jade/Ampere