[Intel-gfx] [PATCH 2/2] drm/i915/guc: handle GuC messages received with CTB disabled

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Thu Jun 20 17:55:58 UTC 2019



On 6/20/19 6:48 AM, Chris Wilson wrote:
> Quoting Daniele Ceraolo Spurio (2019-06-19 22:43:51)
>> +/*
>> + * Events triggered while CT buffers are disabled are logged in the SCRATCH_15
>> + * register using the same bits used in the CT message payload. Since our
>> + * communication channel with guc is turned off at this point, we can save the
>> + * message and handle it after we turn it back on.
>> + */
>> +static void guc_clear_mmio_msg(struct intel_guc *guc)
>> +{
>> +       intel_uncore_write(&guc_to_i915(guc)->uncore, SOFT_SCRATCH(15), 0);
> 
> Should the register be cleared on intel_guc_reset()? Otherwise, we would
> be associating the stale msg from an earlier guc instance with the
> current one.
> 
> That would mean clear_mmio_msg would want to be called from
> guc_stop_communication not just guc_disable_communication.
> -Chris
> 

The register is reset by the HW as part of GuC reset (I've verified this 
on SKL). Still, explicitly clearing it won't hurt and it'll cover us if 
HW reset fails, so no problem in adding the call in.

Daniele


More information about the Intel-gfx mailing list