From: John Harrison <john.c.harri...@intel.com>

GuC v46 partially increased the number of engine classes supported in
the ADS. GuC v48 then finished the change off by cleaning up the
per class engine mask fields.

Signed-off-by: John Harrison <john.c.harri...@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c  | 16 +++++++++-------
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 19 +++++++++----------
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
index 75fcce64fc57..7950d28beb8c 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
@@ -151,18 +151,20 @@ static void __guc_ads_init(struct intel_guc *guc)
        }
 
        /* System info */
-       blob->system_info.slice_enabled = hweight8(gt->info.sseu.slice_mask);
-       blob->system_info.rcs_enabled = 1;
-       blob->system_info.bcs_enabled = 1;
+       blob->system_info.engine_enabled_masks[RENDER_CLASS] = 1;
+       blob->system_info.engine_enabled_masks[COPY_ENGINE_CLASS] = 1;
+       blob->system_info.engine_enabled_masks[VIDEO_DECODE_CLASS] = 
VDBOX_MASK(gt);
+       blob->system_info.engine_enabled_masks[VIDEO_ENHANCEMENT_CLASS] = 
VEBOX_MASK(gt);
 
-       blob->system_info.vdbox_enable_mask = VDBOX_MASK(gt);
-       blob->system_info.vebox_enable_mask = VEBOX_MASK(gt);
-       blob->system_info.vdbox_sfc_support_mask = gt->info.vdbox_sfc_access;
+       
blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_SLICE_ENABLED] =
+               hweight8(gt->info.sseu.slice_mask);
+       
blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_VDBOX_SFC_SUPPORT_MASK]
 =
+               gt->info.vdbox_sfc_access;
 
        if (INTEL_GEN(i915) >= 12 && !IS_DGFX(i915)) {
                u32 distdbreg = intel_uncore_read(gt->uncore,
                                                  GEN12_DIST_DBS_POPULATED);
-               blob->system_info.num_of_doorbells_per_sqidi =
+               
blob->system_info.generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI]
 =
                        ((distdbreg >> GEN12_DOORBELLS_PER_SQIDI_SHIFT) &
                         GEN12_DOORBELLS_PER_SQIDI) + 1;
        }
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
index 3492fb0d5dec..391053118869 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
@@ -26,7 +26,7 @@
 #define GUC_VIDEO_ENGINE2              4
 #define GUC_MAX_ENGINES_NUM            (GUC_VIDEO_ENGINE2 + 1)
 
-#define GUC_MAX_ENGINE_CLASSES         5
+#define GUC_MAX_ENGINE_CLASSES         16
 #define GUC_MAX_INSTANCES_PER_CLASS    32
 
 #define GUC_DOORBELL_INVALID           256
@@ -98,6 +98,12 @@
 
 #define GUC_CTL_MAX_DWORDS             (SOFT_SCRATCH_COUNT - 2) /* [1..14] */
 
+/* Generic GT SysInfo data types */
+#define GUC_GENERIC_GT_SYSINFO_SLICE_ENABLED           0
+#define GUC_GENERIC_GT_SYSINFO_VDBOX_SFC_SUPPORT_MASK  1
+#define GUC_GENERIC_GT_SYSINFO_DOORBELL_COUNT_PER_SQIDI        2
+#define GUC_GENERIC_GT_SYSINFO_MAX                     16
+
 /*
  * The class goes in bits [0..2] of the GuC ID, the instance in bits [3..6].
  * Bit 7 can be used for operations that apply to all engine classes&instances.
@@ -376,16 +382,9 @@ struct guc_mmio_reg_set {
 
 /* HW info */
 struct guc_gt_system_info {
-       u32 slice_enabled;
-       u32 rcs_enabled;
-       u32 reserved0;
-       u32 bcs_enabled;
-       u32 vdbox_enable_mask;
-       u32 vdbox_sfc_support_mask;
-       u32 vebox_enable_mask;
-       u32 num_of_doorbells_per_sqidi;
        u8 mapping_table[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS];
-       u32 reserved2[8];
+       u32 engine_enabled_masks[GUC_MAX_ENGINE_CLASSES];
+       u32 generic_gt_sysinfo[GUC_GENERIC_GT_SYSINFO_MAX];
 } __packed;
 
 /* Clients info */
-- 
2.25.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to