CHROMIUM: drm/i915: Disable boost and waitboost

The GT frequency should ideally scale as per the load,
but on making a Hangouts call or opening the camera
preview it is pegged to max frequency. This leads to higher than
expected power consumption(2W+).

The camera stack is probably doing some heavy handed sync operations
which causes the GPU to be always stuck at max frequency.
This is a temporary fix until the userspace(camera) is either
fixed or optimized because we may incur a performance penalty due to
this change.

This bug is discussed here[1].

1. https://bugs.freedesktop.org/show_bug.cgi?id=110750

BUG=b:130638275, b:131723850
TEST=Build and boot on nocturne. Make sure GPU frequency is low when
     running camera app.

Change-Id: I662fada3093ccd5a3424b90dca48deb176a9c313
Signed-off-by: Ricky Liang <jcliang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1657492
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 4dd4902..0921964 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1081,9 +1081,14 @@
 
 	/* Make sure we didn't queue anything we're not going to process. */
 	WARN_ON(pm_iir & ~dev_priv->pm_rps_events);
-
+	/*
+	 * FIXME: This is temporary change to improve power consumption
+	 * in hangouts use case. (See: b/130638275)
+	 */
+	/*
 	if ((pm_iir & dev_priv->pm_rps_events) == 0 && !client_boost)
 		return;
+	*/
 
 	mutex_lock(&dev_priv->rps.hw_lock);
 
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 23dc6822..5b84ce7 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5468,6 +5468,11 @@
 	if (!i915->rps.enabled)
 		return;
 	boost = false;
+	/*
+	 * FIXME: This is temporary change to improve power consumption
+	 * in hangouts use case. (See: b/130638275)
+	 */
+	/*
 	spin_lock_irq(&rq->lock);
 	if (!rq->waitboost && !i915_gem_request_completed(rq)) {
 		atomic_inc(&i915->rps.num_waiters);
@@ -5475,6 +5480,7 @@
 		boost = true;
 	}
 	spin_unlock_irq(&rq->lock);
+	*/
 	if (!boost)
 		return;