Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Add has_64k_pages flag

Add a new platform flag, has_64k_pages, to mark the requirement of 64K
GTT page sizes or larger for device local memory access.

Also implies that we require or at least support the compact PT layout
for the ppGTT when using 64K GTT pages.

v2: More explanation for the flag [Thomas]

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211208141613.7251-2-ramalingam.c@intel.com

authored by

Stuart Summers and committed by
Ramalingam C
c83125bb 20cddfcc

+11
+8
drivers/gpu/drm/i915/i915_drv.h
··· 1717 1717 #define HAS_MSLICES(dev_priv) \ 1718 1718 (INTEL_INFO(dev_priv)->has_mslices) 1719 1719 1720 + /* 1721 + * Set this flag, when platform requires 64K GTT page sizes or larger for 1722 + * device local memory access. Also this flag implies that we require or 1723 + * at least support the compact PT layout for the ppGTT when using the 64K 1724 + * GTT pages. 1725 + */ 1726 + #define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages) 1727 + 1720 1728 #define HAS_IPC(dev_priv) (INTEL_INFO(dev_priv)->display.has_ipc) 1721 1729 1722 1730 #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
+2
drivers/gpu/drm/i915/i915_pci.c
··· 1015 1015 DGFX_FEATURES, 1016 1016 PLATFORM(INTEL_XEHPSDV), 1017 1017 .display = { }, 1018 + .has_64k_pages = 1, 1018 1019 .pipe_mask = 0, 1019 1020 .platform_engine_mask = 1020 1021 BIT(RCS0) | BIT(BCS0) | ··· 1034 1033 .graphics.rel = 55, 1035 1034 .media.rel = 55, 1036 1035 PLATFORM(INTEL_DG2), 1036 + .has_64k_pages = 1, 1037 1037 .platform_engine_mask = 1038 1038 BIT(RCS0) | BIT(BCS0) | 1039 1039 BIT(VECS0) | BIT(VECS1) |
+1
drivers/gpu/drm/i915/intel_device_info.h
··· 123 123 func(is_dgfx); \ 124 124 /* Keep has_* in alphabetical order */ \ 125 125 func(has_64bit_reloc); \ 126 + func(has_64k_pages); \ 126 127 func(gpu_reset_clobbers_display); \ 127 128 func(has_reset_engine); \ 128 129 func(has_global_mocs); \