Lines Matching +full:pre +full:- +full:programs
1 // SPDX-License-Identifier: MIT
3 * Copyright © 2017-2019 Intel Corporation
26 * | Size +--------------------+
28 * | | +--------------------+
30 * | | +------------------- +
34 * | +------------------- + <== HuC Firmware Top
73 * intel_wopcm_init_early() - Early initialization of the WOPCM.
86 wopcm->size = GEN11_WOPCM_SIZE; in intel_wopcm_init_early()
88 wopcm->size = GEN9_WOPCM_SIZE; in intel_wopcm_init_early()
90 drm_dbg(&i915->drm, "WOPCM: %uK\n", wopcm->size / 1024); in intel_wopcm_init_early()
115 (guc_wopcm_size - offset) < sizeof(u32)) { in gen9_check_dword_gap()
116 drm_err(&i915->drm, in gen9_check_dword_gap()
134 if (huc_fw_size > guc_wopcm_size - GUC_WOPCM_RESERVED) { in gen9_check_huc_fw_fits()
135 drm_err(&i915->drm, "WOPCM: no space for %s: %uK < %uK\n", in gen9_check_huc_fw_fits()
137 (guc_wopcm_size - GUC_WOPCM_RESERVED) / SZ_1K, in gen9_check_huc_fw_fits()
167 size = wopcm_size - ctx_rsvd; 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()
213 if (!HAS_GUC_DEPRIVILEGE(uncore->i915)) in __wopcm_regs_writable()
220 * intel_wopcm_init() - Initialize the WOPCM structure.
233 u32 guc_fw_size = intel_uc_fw_get_upload_size(>->uc.guc.fw); in intel_wopcm_init()
234 u32 huc_fw_size = intel_uc_fw_get_upload_size(>->uc.huc.fw); in intel_wopcm_init()
236 u32 wopcm_size = wopcm->size; in intel_wopcm_init()
244 GEM_BUG_ON(wopcm->guc.base); in intel_wopcm_init()
245 GEM_BUG_ON(wopcm->guc.size); in intel_wopcm_init()
253 if (__wopcm_regs_locked(gt->uncore, &guc_wopcm_base, &guc_wopcm_size)) { in intel_wopcm_init()
254 drm_dbg(&i915->drm, "GuC WOPCM is already locked [%uK, %uK)\n", in intel_wopcm_init()
260 * This is perfectly fine when i915 programs the registers, but in intel_wopcm_init()
262 * writable from i915 and are instead pre-programmed by the in intel_wopcm_init()
268 * were pre-programmed with an invalid value, we will still in intel_wopcm_init()
271 if (!__wopcm_regs_writable(gt->uncore)) in intel_wopcm_init()
288 guc_wopcm_base = min(guc_wopcm_base, wopcm_size - ctx_rsvd); in intel_wopcm_init()
291 guc_wopcm_size = wopcm_size - ctx_rsvd - guc_wopcm_base; in intel_wopcm_init()
294 drm_dbg(&i915->drm, "Calculated GuC WOPCM [%uK, %uK)\n", in intel_wopcm_init()
300 wopcm->guc.base = guc_wopcm_base; in intel_wopcm_init()
301 wopcm->guc.size = guc_wopcm_size; in intel_wopcm_init()
302 GEM_BUG_ON(!wopcm->guc.base); in intel_wopcm_init()
303 GEM_BUG_ON(!wopcm->guc.size); in intel_wopcm_init()