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

Commit 28cf798f authored by Chris Wilson's avatar Chris Wilson Committed by Eric Anholt
Browse files

drm/i915: Don't update the render-clock for every bo.



Only update the render-clock on transition from busy to idle and vice
versa, or else we burn a significant percentage of the cpu just rewriting
the register -- not quite as power-friendly as intended ;-)

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 38b3037e
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -4052,8 +4052,13 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj)
	if (!drm_core_check_feature(dev, DRIVER_MODESET))
	if (!drm_core_check_feature(dev, DRIVER_MODESET))
		return;
		return;


	if (!dev_priv->busy) {
		dev_priv->busy = true;
		dev_priv->busy = true;
		intel_increase_renderclock(dev, true);
		intel_increase_renderclock(dev, true);
	} else {
		mod_timer(&dev_priv->idle_timer, jiffies +
			  msecs_to_jiffies(GPU_IDLE_TIMEOUT));
	}


	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
		if (!crtc->fb)
		if (!crtc->fb)