]> 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)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 25 Apr 2018 06:50:29 +0000 (09:50 +0300)
commit61a7162901903723248b71d389ef0f31f1f99309
tree15ec806107b0042afc12fe3e65826da27d8875b2
parent6c5eba3490d2c7e9fa6dc384e65c25be1f1481e7
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
(cherry picked from commit 3085982c6b45d7d22f76e3aa018affbc143a7370)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/intel_drv.h