Skip to contentSkip to conversation

Patch "drm/i915: Stop using RP_DOWN_EI on Baytrail" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 12, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/i915: Stop using RP_DOWN_EI on Baytrail

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-i915-stop-using-rp_down_ei-on-baytrail.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 8f68d591d4765b2e1ce9d916ac7bc5583285c4ad Mon Sep 17 00:00:00 2001

From: Chris Wilson <[email protected]>
Date: Mon, 13 Mar 2017 17:06:17 +0000
Subject: drm/i915: Stop using RP_DOWN_EI on Baytrail

From: Chris Wilson <[email protected]>

commit 8f68d591d4765b2e1ce9d916ac7bc5583285c4ad upstream.

On Baytrail, we manually calculate busyness over the evaluation interval to avoid issues with miscaluations with RC6 enabled. However, it turns out that the DOWN_EI interrupt generator is completely bust - it operates in two modes, continuous or never. Neither of which are conducive to good behaviour. Stop unmask the DOWN_EI interrupt and just compute everything from the UP_EI which does seem to correspond to the desired interval.

v2: Fixup gen6_rps_pm_mask() as well
v3: Inline vlv_c0_above() to combine the now identical elapsed calculation for up/down and simplify the threshold testing

Fixes 43cf3bf084ba ("drm/i915: Improved w/a for rps on Baytrail")
Cc Mika Kuoppala <[email protected]>
(cherry picked from commit e0e8c7cb6eb68e9256de2d8cbeb481d3701c05ac)
---
 drivers/gpu/drm/i915/i915_drv.h |    2 -
 drivers/gpu/drm/i915/i915_irq.c |   73 +++++++++++++++-------------------------
 drivers/gpu/drm/i915/intel_pm.c |    5 +-
 3 files changed, 32 insertions(+), 48 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1225,7 +1225,7 @@ struct intel_gen6_power_mgmt {
 	unsigned boosts;
 
 	/* manual wa residency calculations */
-	struct intel_rps_ei up_ei, down_ei;
+	struct intel_rps_ei ei;
 
 	/*
 	 * Protects RPS/RC6 register access and PCU communication.
drivers/gpu/drm/i915/i915_irq.c +28 -45

103 lines not on this page · raw message

drivers/gpu/drm/i915/intel_pm.c +3 -2
@@ -4940,8 +4940,9 @@ static u32 gen6_rps_pm_mask(struct drm_i
 {
 	u32 mask = 0;
 
+	/* We use UP_EI_EXPIRED interupts for both up/down in manual mode */
 	if (val > dev_priv->rps.min_freq_softlimit)
-		mask |= GEN6_PM_RP_DOWN_EI_EXPIRED | GEN6_PM_RP_DOWN_THRESHOLD | GEN6_PM_RP_DOWN_TIMEOUT;
+		mask |= GEN6_PM_RP_UP_EI_EXPIRED | GEN6_PM_RP_DOWN_THRESHOLD | GEN6_PM_RP_DOWN_TIMEOUT;
 	if (val < dev_priv->rps.max_freq_softlimit)
 		mask |= GEN6_PM_RP_UP_EI_EXPIRED | GEN6_PM_RP_UP_THRESHOLD;
 
@@ -5041,7 +5042,7 @@ void gen6_rps_busy(struct drm_i915_priva
 {
 	mutex_lock(&dev_priv->rps.hw_lock);
 	if (dev_priv->rps.enabled) {
-		if (dev_priv->pm_rps_events & (GEN6_PM_RP_DOWN_EI_EXPIRED | GEN6_PM_RP_UP_EI_EXPIRED))
+		if (dev_priv->pm_rps_events & GEN6_PM_RP_UP_EI_EXPIRED)
 			gen6_rps_reset_ei(dev_priv);
 		I915_WRITE(GEN6_PMINTRMSK,
 			   gen6_rps_pm_mask(dev_priv, dev_priv->rps.cur_freq));

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/drm-i915-stop-using-rp_down_ei-on-baytrail.patch queue-4.9/drm-i915-only-enable-hotplug-interrupts-if-the-display-interrupts-are-enabled.patch queue-4.9/drm-i915-gen9-increase-pcode-request-timeout-to-50ms.patch queue-4.9/drm-i915-avoid-tweaking-evaluation-thresholds-on-baytrail-v3.patch queue-4.9/drm-i915-avoid-rcu_barrier-from-reclaim-paths-shrinker.patch queue-4.9/drm-i915-drop-support-for-i915_exec_constants_-execbuf-parameters.patch