]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gt: Always reschedule the new heartbeat
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Mar 2020 16:32:08 +0000 (16:32 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Mar 2020 18:26:15 +0000 (18:26 +0000)
In order to better respond to new heartbeat intervals given via sysfs,
always reprogramme an active heartbeat upon change (i.e. use
mod_delayed_work to reschedule rather than queue_delayed_work which
ignores an already active work.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200317163208.30010-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c

index dd825718e4e5504b5d62e4a66f3b16ebc0685387..5136c8bf112d14b87ccece929002a9838e19e5ec 100644 (file)
@@ -31,7 +31,7 @@ static bool next_heartbeat(struct intel_engine_cs *engine)
        delay = msecs_to_jiffies_timeout(delay);
        if (delay >= HZ)
                delay = round_jiffies_up_relative(delay);
-       schedule_delayed_work(&engine->heartbeat.work, delay);
+       mod_delayed_work(system_wq, &engine->heartbeat.work, delay);
 
        return true;
 }