Lines Matching refs:i915
80 struct drm_i915_private *i915 = wopcm_to_i915(wopcm); in intel_wopcm_init_early() local
82 if (!HAS_GT_UC(i915)) in intel_wopcm_init_early()
85 if (GRAPHICS_VER(i915) >= 11) in intel_wopcm_init_early()
90 drm_dbg(&i915->drm, "WOPCM: %uK\n", wopcm->size / 1024); in intel_wopcm_init_early()
93 static u32 context_reserved_size(struct drm_i915_private *i915) in context_reserved_size() argument
95 if (IS_GEN9_LP(i915)) in context_reserved_size()
97 else if (GRAPHICS_VER(i915) >= 11) in context_reserved_size()
103 static bool gen9_check_dword_gap(struct drm_i915_private *i915, in gen9_check_dword_gap() argument
116 drm_err(&i915->drm, in gen9_check_dword_gap()
126 static bool gen9_check_huc_fw_fits(struct drm_i915_private *i915, in gen9_check_huc_fw_fits() argument
135 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in gen9_check_huc_fw_fits()
145 static bool check_hw_restrictions(struct drm_i915_private *i915, in check_hw_restrictions() argument
149 if (GRAPHICS_VER(i915) == 9 && !gen9_check_dword_gap(i915, guc_wopcm_base, in check_hw_restrictions()
153 if (GRAPHICS_VER(i915) == 9 && in check_hw_restrictions()
154 !gen9_check_huc_fw_fits(i915, guc_wopcm_size, huc_fw_size)) in check_hw_restrictions()
160 static bool __check_layout(struct drm_i915_private *i915, u32 wopcm_size, in __check_layout() argument
164 const u32 ctx_rsvd = context_reserved_size(i915); in __check_layout()
169 drm_err(&i915->drm, in __check_layout()
178 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
186 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
192 return check_hw_restrictions(i915, guc_wopcm_base, guc_wopcm_size, in __check_layout()
213 if (!HAS_GUC_DEPRIVILEGE(uncore->i915)) in __wopcm_regs_writable()
231 struct drm_i915_private *i915 = wopcm_to_i915(wopcm); in intel_wopcm_init() local
232 struct intel_gt *gt = to_gt(i915); in intel_wopcm_init()
235 u32 ctx_rsvd = context_reserved_size(i915); in intel_wopcm_init()
250 if (i915_inject_probe_failure(i915)) in intel_wopcm_init()
254 drm_dbg(&i915->drm, "GuC WOPCM is already locked [%uK, %uK)\n", in intel_wopcm_init()
294 drm_dbg(&i915->drm, "Calculated GuC WOPCM [%uK, %uK)\n", in intel_wopcm_init()
298 if (__check_layout(i915, wopcm_size, guc_wopcm_base, guc_wopcm_size, in intel_wopcm_init()