]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/xehpsdv: Add has_flat_ccs to device info
authorCQ Tang <cq.tang@intel.com>
Fri, 18 Feb 2022 18:47:50 +0000 (00:17 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sun, 20 Feb 2022 06:26:49 +0000 (22:26 -0800)
Platforms of XeHP and beyond support 3D surface (buffer) compression and
various compression formats. This is accomplished by an additional
compression control state (CCS) stored for each surface.

Gen 12 devices(TGL family and DG1) stores compression states in a separate
region of memory. It is managed by user-space and has an associated set of
user-space managed page tables used by hardware for address translation.

In Xe HP and beyond (XEHPSDV, DG2, etc), there is a new feature introduced
i.e Flat CCS. It replaced AUX page tables with a flat indexed region of
device memory for storing compression states.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: CQ Tang <cq.tang@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218184752.7524-14-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 12173d86f75291eb7e8d87cf4e7f4cb203550428..6ffadf4b3f1ab2589ea8ebc1a134c0fe53548bbe 100644 (file)
@@ -1551,6 +1551,12 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define HAS_REGION(i915, i) (INTEL_INFO(i915)->memory_regions & (i))
 #define HAS_LMEM(i915) HAS_REGION(i915, REGION_LMEM)
 
+/*
+ * Platform has the dedicated compression control state for each lmem surfaces
+ * stored in lmem to support the 3D and media compression formats.
+ */
+#define HAS_FLAT_CCS(dev_priv)   (INTEL_INFO(dev_priv)->has_flat_ccs)
+
 #define HAS_GT_UC(dev_priv)    (INTEL_INFO(dev_priv)->has_gt_uc)
 
 #define HAS_POOLED_EU(dev_priv)        (INTEL_INFO(dev_priv)->has_pooled_eu)
index 5252b8030af9012d19f686c7d3535f883ebb243c..c1a3f1107022900f309b9718d22cded300f4bddb 100644 (file)
@@ -1003,6 +1003,7 @@ static const struct intel_device_info adl_p_info = {
        XE_HP_PAGE_SIZES, \
        .dma_mask_size = 46, \
        .has_64bit_reloc = 1, \
+       .has_flat_ccs = 1, \
        .has_global_mocs = 1, \
        .has_gt_uc = 1, \
        .has_llc = 1, \
index 47ffd9a1bfa6b721487dbe715716c6160c69cc1c..d3cce0220018c22abc5a4dc45bd6b56d77bcd296 100644 (file)
@@ -131,6 +131,7 @@ enum intel_ppgtt_type {
        func(needs_compact_pt); \
        func(gpu_reset_clobbers_display); \
        func(has_reset_engine); \
+       func(has_flat_ccs); \
        func(has_global_mocs); \
        func(has_gt_uc); \
        func(has_guc_deprivilege); \