]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add has_64k_pages flag
authorStuart Summers <stuart.summers@intel.com>
Wed, 8 Dec 2021 14:16:10 +0000 (19:46 +0530)
committerRamalingam C <ramalingam.c@intel.com>
Thu, 9 Dec 2021 16:39:27 +0000 (22:09 +0530)
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
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/intel_device_info.h

index 8198d13347f689e0c11ad97790d56e9e633bbf19..e02becc680ec04d736b4cb6e2835f409374cbe50 100644 (file)
@@ -1717,6 +1717,14 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define HAS_MSLICES(dev_priv) \
        (INTEL_INFO(dev_priv)->has_mslices)
 
+/*
+ * Set this flag, when platform requires 64K GTT page sizes or larger for
+ * device local memory access. Also this flag implies that we require or
+ * at least support the compact PT layout for the ppGTT when using the 64K
+ * GTT pages.
+ */
+#define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages)
+
 #define HAS_IPC(dev_priv)               (INTEL_INFO(dev_priv)->display.has_ipc)
 
 #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
index 5e6795853dc312392e4f64e2e9eb6eaaaf351e8b..332cb8b25e494a1d7cc5c65399a2284084e436fc 100644 (file)
@@ -1015,6 +1015,7 @@ static const struct intel_device_info xehpsdv_info = {
        DGFX_FEATURES,
        PLATFORM(INTEL_XEHPSDV),
        .display = { },
+       .has_64k_pages = 1,
        .pipe_mask = 0,
        .platform_engine_mask =
                BIT(RCS0) | BIT(BCS0) |
@@ -1033,6 +1034,7 @@ static const struct intel_device_info dg2_info = {
        .graphics.rel = 55,
        .media.rel = 55,
        PLATFORM(INTEL_DG2),
+       .has_64k_pages = 1,
        .platform_engine_mask =
                BIT(RCS0) | BIT(BCS0) |
                BIT(VECS0) | BIT(VECS1) |
index 669f0d26c3c382ce4d4f2ec5d5c59cdb81b567dc..f38ac5bd837b9856e51bf1d2b43d320482da61a3 100644 (file)
@@ -123,6 +123,7 @@ enum intel_ppgtt_type {
        func(is_dgfx); \
        /* Keep has_* in alphabetical order */ \
        func(has_64bit_reloc); \
+       func(has_64k_pages); \
        func(gpu_reset_clobbers_display); \
        func(has_reset_engine); \
        func(has_global_mocs); \