[Intel-gfx] [PATCH 3/4] drm/i915/gt: Always send a pulse down the engine after disabling heartbeat
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Sep 24 13:43:08 UTC 2020
On 16/09/2020 10:42, Chris Wilson wrote:
> Currently, we check we can send a pulse prior to disabling the
> heartbeat to verify that we can change the heartbeat, but since we may
> re-evaluate execution upon changing the heartbeat interval we need another
> pulse afterwards to refresh execution.
>
> Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: <stable at vger.kernel.org> # v5.7+
> ---
> drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> index 8ffdf676c0a0..d09df370f7cd 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
> @@ -192,10 +192,12 @@ int intel_engine_set_heartbeat(struct intel_engine_cs *engine,
> WRITE_ONCE(engine->props.heartbeat_interval_ms, delay);
>
> if (intel_engine_pm_get_if_awake(engine)) {
> - if (delay)
> + if (delay) {
> intel_engine_unpark_heartbeat(engine);
> - else
> + } else {
> intel_engine_park_heartbeat(engine);
> + intel_engine_pulse(engine); /* recheck execution */
> + }
> intel_engine_pm_put(engine);
> }
>
>
I did not immediately get this one. Do we really need two pulses or
maybe we could re-order the code a bit and just undo the heartbeat park
if pulse after parking did not work?
Regards,
Tvrtko
More information about the Intel-gfx
mailing list