Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 197be2ae authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Disable waitboosting for mmioflips/semaphores



Since commit a6f766f3 ("drm/i915: Limit ring synchronisation (sw
sempahores) RPS boosts") and commit bcafc4e3 ("drm/i915: Limit mmio
flip RPS boosts") we have limited the waitboosting for semaphores and
flips. Ideally we do not want to boost in either of these instances as no
userspace consumer is waiting upon the results (though a userspace producer
may be stalled trying to submit an execbuf - but in this case the
producer is being throttled due to the engine being saturated with
work). With the introduction of NO_WAITBOOST in the previous patch, we
can finally disable these needless boosts.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469002875-2335-6-git-send-email-chris@chris-wilson.co.uk
parent 42df2714
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -2465,13 +2465,7 @@ static int i915_rps_boost_info(struct seq_file *m, void *data)
			   list_empty(&file_priv->rps.link) ? "" : ", active");
		rcu_read_unlock();
	}
	seq_printf(m, "Semaphore boosts: %d%s\n",
		   dev_priv->rps.semaphores.boosts,
		   list_empty(&dev_priv->rps.semaphores.link) ? "" : ", active");
	seq_printf(m, "MMIO flip boosts: %d%s\n",
		   dev_priv->rps.mmioflips.boosts,
		   list_empty(&dev_priv->rps.mmioflips.link) ? "" : ", active");
	seq_printf(m, "Kernel boosts: %d\n", dev_priv->rps.boosts);
	seq_printf(m, "Kernel (anonymous) boosts: %d\n", dev_priv->rps.boosts);
	spin_unlock(&dev_priv->rps.client_lock);
	mutex_unlock(&dev->filelist_mutex);

+0 −2
Original line number Diff line number Diff line
@@ -1195,8 +1195,6 @@ struct intel_gen6_power_mgmt {
	struct delayed_work autoenable_work;
	unsigned boosts;

	struct intel_rps_client semaphores, mmioflips;

	/* manual wa residency calculations */
	struct intel_rps_ei up_ei, down_ei;

+1 −1
Original line number Diff line number Diff line
@@ -2849,7 +2849,7 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj,
		ret = __i915_wait_request(from_req,
					  i915->mm.interruptible,
					  NULL,
					  &i915->rps.semaphores);
					  NO_WAITBOOST);
		if (ret)
			return ret;

+1 −1
Original line number Diff line number Diff line
@@ -11473,7 +11473,7 @@ static void intel_mmio_flip_work_func(struct work_struct *w)
	if (work->flip_queued_req)
		WARN_ON(__i915_wait_request(work->flip_queued_req,
					    false, NULL,
					    &dev_priv->rps.mmioflips));
					    NO_WAITBOOST));

	/* For framebuffer backed by dmabuf, wait for fence */
	resv = i915_gem_object_get_dmabuf_resv(obj);
+0 −2
Original line number Diff line number Diff line
@@ -7810,8 +7810,6 @@ void intel_pm_setup(struct drm_device *dev)
	INIT_DELAYED_WORK(&dev_priv->rps.autoenable_work,
			  __intel_autoenable_gt_powersave);
	INIT_LIST_HEAD(&dev_priv->rps.clients);
	INIT_LIST_HEAD(&dev_priv->rps.semaphores.link);
	INIT_LIST_HEAD(&dev_priv->rps.mmioflips.link);

	dev_priv->pm.suspended = false;
	atomic_set(&dev_priv->pm.wakeref_count, 0);