[Intel-xe] ✓ CI.checkpatch: success for drm/xe/mmio: Make xe_mmio_wait32() aware of interrupts
Patchwork
patchwork at emeril.freedesktop.org
Tue Nov 14 23:29:17 UTC 2023
== Series Details ==
Series: drm/xe/mmio: Make xe_mmio_wait32() aware of interrupts
URL : https://patchwork.freedesktop.org/series/126428/
State : success
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
63c2b6b160bca2df6efc7bc4cea6f442097d7854
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 9f06bc1b63e7e2ccfd7814351c7574090258a1b0
Author: Gustavo Sousa <gustavo.sousa at intel.com>
Date: Tue Nov 14 19:09:22 2023 -0300
drm/xe/mmio: Make xe_mmio_wait32() aware of interrupts
With the current implementation, a preemption or other kind of interrupt
might happen between xe_mmio_read32() and ktime_get_raw(). Such an
interruption (specially in the case of preemption) might be long enough
to cause a timeout without giving a chance of a new check on the
register value on a next iteration, which would have happened otherwise.
This issue causes some sporadic timeouts in some code paths. As an
example, we were experiencing some rare timeouts when waiting for PLL
unlock for C10/C20 PHYs (see intel_cx0pll_disable()). After debugging,
we found out that the PLL unlock was happening within the expected time
period (20us), which suggested a bug in xe_mmio_wait32().
To fix the issue, ensure that we call ktime_get_raw() to get the current
time before we check the register value. This allows for a last check
after a timeout and covers the case where the it is caused by some
preemption/interrupt.
This change was tested with the aforementioned PLL unlocking code path.
Experiments showed that, before this change, we observed reported
timeouts in 54 of 5000 runs; and, after this change, no timeouts were
reported in 5000 runs.
Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
+ /mt/dim checkpatch 2fe82053d916d09ffcc92bc27294c9eed4e4804b drm-intel
9f06bc1b6 drm/xe/mmio: Make xe_mmio_wait32() aware of interrupts
More information about the Intel-xe
mailing list