[Intel-gfx] [PATCH v3 4/5] drm/i915/guc: Add WOPCM partitioning support for CNL

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 8 23:03:28 UTC 2017


Quoting Jackie Li (2017-12-08 21:41:51)
> +static inline int cnl_a0_wopcm_size_check(struct drm_i915_private *i915)
> +{
> +       struct intel_guc_wopcm *wopcm = &i915->guc.wopcm;
> +       u32 huc_size = intel_uc_fw_get_size(&i915->huc.fw);
> +
> +       /*
> +        * On CNL A0, hardware requires guc size to be larger than or equal to
> +        * HuC kernel size.
> +        */

I couldn't find anything that told me that wopcm->size had to be greater
than GEN10_GUC_WOPCM_OFFSET. Either that is always true by construction,
in which case GEM_BUG_ON() here, or it may be too small in which case
add the test.

> +       if ((wopcm->size - GEN10_GUC_WOPCM_OFFSET) < huc_size)

((((Do) you) like) brackets)?
-Chris


More information about the Intel-gfx mailing list