]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use ktime on wait_for
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 23 Apr 2018 11:37:53 +0000 (14:37 +0300)
committerMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 24 Apr 2018 12:46:26 +0000 (15:46 +0300)
commite2f684ad0e45dc9001304cf45225d446efd07b49
tree052105559b6a4a95c0c5305ea3397102971a0db5
parent16eb947e5edca82137daeab016c36f4b59a3c4b3
drm/i915: Use ktime on wait_for

We use jiffies to determine when wait expires. However
Imre did find out that jiffies can and will do a >1
increments on certain situations [1]. When this happens
in a wait_for loop, we return timeout errorneously
much earlier than what the real wallclock would say.

We can't afford our waits to timeout prematurely.
Discard jiffies and change to ktime to detect timeouts.

v2: added bugzilla entry (Imre), added stable (Chris)

Reported-by: Imre Deak <imre.deak@intel.com>
References: https://lkml.org/lkml/2018/4/18/798 [1]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105771
Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180423113754.28424-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/intel_drv.h