]> www.infradead.org Git - users/hch/configfs.git/commitdiff
drm/xe: Set mask bits for CCS_MODE register
authorBalasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Tue, 8 Oct 2024 07:36:27 +0000 (13:06 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 4 Nov 2024 16:03:40 +0000 (08:03 -0800)
CCS_MODE register requires setting mask bits from Xe2+ platforms. Set
the mask bits unconditionally, as those bits are unused for older
platforms.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: stable@vger.kernel.org # v6.11+
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241008073628.377433-2-balasubramani.vivekanandan@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 23ea2c7572d4735ef66beb1e4feb8ae510b78247)
[ Fix conflict with mmio refactors ]
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/regs/xe_gt_regs.h
drivers/gpu/drm/xe/xe_gt_ccs_mode.c

index 00ad34ed73a5fc7af997b40eaaefcdb363c0fde0..bd604b9f08e4fa35ed8b75dd27ed41bba3c10f3e 100644 (file)
  *   [4-6]     RSVD
  *   [7]       Disabled
  */
-#define CCS_MODE                               XE_REG(0x14804)
+#define CCS_MODE                               XE_REG(0x14804, XE_REG_OPTION_MASKED)
 #define   CCS_MODE_CSLICE_0_3_MASK             REG_GENMASK(11, 0) /* 3 bits per cslice */
 #define   CCS_MODE_CSLICE_MASK                 0x7 /* CCS0-3 + rsvd */
 #define   CCS_MODE_CSLICE_WIDTH                        ilog2(CCS_MODE_CSLICE_MASK + 1)
index d2e4dc3aaf613ad84f99b45c1e1a6b141fed6250..b8d832c8f9078df4f3f925c9078edddeb2147a72 100644 (file)
@@ -68,6 +68,12 @@ static void __xe_gt_apply_ccs_mode(struct xe_gt *gt, u32 num_engines)
                }
        }
 
+       /*
+        * Mask bits need to be set for the register. Though only Xe2+
+        * platforms require setting of mask bits, it won't harm for older
+        * platforms as these bits are unused there.
+        */
+       mode |= CCS_MODE_CSLICE_0_3_MASK << 16;
        xe_mmio_write32(gt, CCS_MODE, mode);
 
        xe_gt_dbg(gt, "CCS_MODE=%x config:%08x, num_engines:%d, num_slices:%d\n",