]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Set adjustment to zero on Up/Down interrupts if freq is already max/min
authorSagar Arun Kamble <sagar.a.kamble@intel.com>
Fri, 20 Jan 2017 03:48:24 +0000 (09:18 +0530)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Jan 2017 09:32:47 +0000 (09:32 +0000)
commit48a94cfa0cba2fe30bdbcb79354b7a1ab56f2b44
tree4822ce51525e1316362e0e5c12b033e627b99ea3
parent27deb73f7174e0d10e5a6ee0639b41e9a8fb0579
drm/i915: Set adjustment to zero on Up/Down interrupts if freq is already max/min

When we reach the user's RPS limits, stop requesting an adjustment. Even
though we will clamp the requested frequency later, we rely on interrupt
masking to disable further adjustments in the same direction. Even
though it is unlikely (one scenario is a bug in the driver, another is
careful manipulation through the uAPI) if we keep exponentially
increasing the adjustment value, it will wrap and cause a negative
adjustment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484884104-28134-2-git-send-email-sagar.a.kamble@intel.com
drivers/gpu/drm/i915/i915_irq.c