[Intel-gfx] [PATCH] drm/i915: Honor i915_min_freq post resume
james.ausmus at intel.com
james.ausmus at intel.com
Fri Aug 16 02:30:31 CEST 2013
From: Sameer Nanda <snanda at chromium.org>
The i915_min_freq setting was not getting honored on the resume path.
Fixed it.
BUG=chrome-os-partner:16439
TEST="cat /sys/kernel/debug/dri/0/i915_min_freq" and remember the value
returned. Do a suspend/resume cycle. cat the i915_min_freq file again,
it must return the same value as read earlier.
Change-Id: Ie3cc8e8794a59c154b511e24e468daef94a44765
Signed-off-by: Sameer Nanda <snanda at chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41461
[marcheu: fixup for 3.8]
Signed-off-by: Stéphane Marchesin <marcheu at chromium.org>
---
drivers/gpu/drm/i915/intel_pm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9ff2285..7e1c629 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -30,6 +30,7 @@
#include "intel_drv.h"
#include "../../../platform/x86/intel_ips.h"
#include <linux/module.h>
+#include <linux/kernel.h>
#define FORCEWAKE_ACK_TIMEOUT_MS 2
@@ -2637,7 +2638,7 @@ static void gen6_enable_rps(struct drm_device *dev)
DRM_DEBUG_DRIVER("Failed to set the min frequency\n");
}
- gen6_set_rps(dev_priv->dev, (gt_perf_status & 0xff00) >> 8);
+ gen6_set_rps(dev_priv->dev, (u8)max((gt_perf_status & 0xff00) >> 8, 10u));
/* requires MSI enabled */
I915_WRITE(GEN6_PMIER, GEN6_PM_DEFERRED_EVENTS);
--
1.8.3.2
More information about the Intel-gfx
mailing list