We have a note that a PM interval value (e.g. for RPS EI) that is not a multiple of 25 causes missed interrupts on some Sandybridge machines. We are observing missed interrupts (which I speculate is due to some sort of internal rounding in the PCU) on more recent machines as well, so let's experiment with applying the empirical rounding of yore. References: https://gitlab.freedesktop.org/drm/intel/-/issues/1791 Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c index 852a7d731b3b..400a3a916931 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c @@ -87,6 +87,8 @@ u32 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u32 ns) { u32 val; + val = DIV_ROUND_UP(intel_gt_ns_to_clock_interval(gt, ns), 16); + /* * Make these a multiple of magic 25 to avoid SNB (eg. Dell XPS * 8300) freezing up around GPU hangs. Looks as if even @@ -94,9 +96,6 @@ u32 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u32 ns) * EI/thresholds are "bad", leading to a very sluggish or even * frozen machine. */ - val = DIV_ROUND_UP(intel_gt_ns_to_clock_interval(gt, ns), 16); - if (IS_GEN(gt->i915, 6)) - val = roundup(val, 25); + return roundup(val, 25); - return val; } -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx