[Intel-gfx] [PATCH v9 6/7] drm/i915/guc: Check the locking status of GuC WOPCM registers
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 8 23:31:37 UTC 2018
Quoting Jackie Li (2018-02-08 23:03:54)
> @@ -95,7 +97,11 @@ struct intel_guc_wopcm {
> u32 offset;
> u32 size;
> u32 top;
> - u32 valid;
> +
> + /* GuC WOPCM flags below. */
> + u32 valid:1;
> + u32 hw_updated:1;
> + u32 need_load_huc_fw:1;
bool need_load_huc_fw:1; etc
> @@ -147,6 +211,8 @@ int intel_guc_wopcm_init(struct intel_guc_wopcm *guc_wopcm, u32 guc_fw_size,
> guc->wopcm.offset = offset;
> guc->wopcm.size = size;
> guc->wopcm.top = top;
> + /* Use GuC to load HuC firmware if HuC firmware is present. */
> + guc->wopcm.need_load_huc_fw = huc_fw_size ? 1 : 0;
Then the compiler will do the right thing with
guc->wopcm.need_load_huc_fw = huc_fw_size;
bools, use them ;)
-Chris
More information about the Intel-gfx
mailing list