Commit 239bbb2f authored by Matt Roper's avatar Matt Roper
Browse files

drm/i915/gt: Remove GEN12_SFC_DONE_MAX from register defs header



We shouldn't really be keeping track of how many SFC_DONE registers
our platforms can have, but rather how many SFC hardware units there can
be (each SFC unit will have one corresponding SFC_DONE register).  So
drop the stray GEN12_SFC_DONE_MAX definition we had in the register
definition file and replace it with an I915_MAX_SFC that follows the
pattern we use for other hardware units.  Note that our hardware has a
2:1:1 ratio of VD:VE:SFC, and as far as we know that pattern should
carry forward to future platforms, so we'll define it as #VCS/2.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311062835.163744-1-matthew.d.roper@intel.com
parent 661412e3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ struct i915_ctx_workarounds {

#define I915_MAX_VCS	8
#define I915_MAX_VECS	4
#define I915_MAX_SFC	(I915_MAX_VCS / 2)
#define I915_MAX_CCS	4
#define I915_MAX_RCS	1

+2 −2
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ static void err_print_gt(struct drm_i915_error_state_buf *m,
	if (GRAPHICS_VER(m->i915) >= 12) {
		int i;

		for (i = 0; i < GEN12_SFC_DONE_MAX; i++) {
		for (i = 0; i < I915_MAX_SFC; i++) {
			/*
			 * SFC_DONE resides in the VD forcewake domain, so it
			 * only exists if the corresponding VCS engine is
@@ -1689,7 +1689,7 @@ static void gt_record_regs(struct intel_gt_coredump *gt)
		gt->aux_err = intel_uncore_read(uncore, GEN12_AUX_ERR_DBG);

	if (GRAPHICS_VER(i915) >= 12) {
		for (i = 0; i < GEN12_SFC_DONE_MAX; i++) {
		for (i = 0; i < I915_MAX_SFC; i++) {
			/*
			 * SFC_DONE resides in the VD forcewake domain, so it
			 * only exists if the corresponding VCS engine is
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ struct intel_gt_coredump {
	u32 gfx_mode;
	u32 gtt_cache;
	u32 aux_err; /* gen12 */
	u32 sfc_done[GEN12_SFC_DONE_MAX]; /* gen12 */
	u32 sfc_done[I915_MAX_SFC]; /* gen12 */
	u32 gam_done; /* gen12 */

	u32 nfence;
+0 −2
Original line number Diff line number Diff line
@@ -123,6 +123,4 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)

#define VLV_DISPLAY_BASE		0x180000

#define GEN12_SFC_DONE_MAX		4

#endif /* __I915_REG_DEFS__ */