Lines Matching refs:i915
79 struct drm_i915_private *i915 = wopcm_to_i915(wopcm); in intel_wopcm_init_early() local
81 if (!HAS_GT_UC(i915)) in intel_wopcm_init_early()
84 if (GRAPHICS_VER(i915) >= 11) in intel_wopcm_init_early()
89 drm_dbg(&i915->drm, "WOPCM: %uK\n", wopcm->size / 1024); in intel_wopcm_init_early()
92 static u32 context_reserved_size(struct drm_i915_private *i915) in context_reserved_size() argument
94 if (IS_GEN9_LP(i915)) in context_reserved_size()
96 else if (GRAPHICS_VER(i915) >= 11) in context_reserved_size()
102 static bool gen9_check_dword_gap(struct drm_i915_private *i915, in gen9_check_dword_gap() argument
115 drm_err(&i915->drm, in gen9_check_dword_gap()
125 static bool gen9_check_huc_fw_fits(struct drm_i915_private *i915, in gen9_check_huc_fw_fits() argument
134 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in gen9_check_huc_fw_fits()
144 static bool check_hw_restrictions(struct drm_i915_private *i915, in check_hw_restrictions() argument
148 if (GRAPHICS_VER(i915) == 9 && !gen9_check_dword_gap(i915, guc_wopcm_base, in check_hw_restrictions()
152 if (GRAPHICS_VER(i915) == 9 && in check_hw_restrictions()
153 !gen9_check_huc_fw_fits(i915, guc_wopcm_size, huc_fw_size)) in check_hw_restrictions()
159 static bool __check_layout(struct drm_i915_private *i915, u32 wopcm_size, in __check_layout() argument
163 const u32 ctx_rsvd = context_reserved_size(i915); in __check_layout()
168 drm_err(&i915->drm, in __check_layout()
177 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
185 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in __check_layout()
191 return check_hw_restrictions(i915, guc_wopcm_base, guc_wopcm_size, in __check_layout()
222 struct drm_i915_private *i915 = wopcm_to_i915(wopcm); in intel_wopcm_init() local
223 struct intel_gt *gt = &i915->gt; in intel_wopcm_init()
226 u32 ctx_rsvd = context_reserved_size(i915); in intel_wopcm_init()
240 if (i915_inject_probe_failure(i915)) in intel_wopcm_init()
244 drm_dbg(&i915->drm, "GuC WOPCM is already locked [%uK, %uK)\n", in intel_wopcm_init()
266 drm_dbg(&i915->drm, "Calculated GuC WOPCM [%uK, %uK)\n", in intel_wopcm_init()
270 if (__check_layout(i915, wopcm->size, guc_wopcm_base, guc_wopcm_size, in intel_wopcm_init()