Skip to content

Commit

Permalink
drm/i915: Don't update the render-clock for every bo.
Browse files Browse the repository at this point in the history
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: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Chris Wilson authored and Eric Anholt committed Dec 1, 2009
1 parent 38b3037 commit 28cf798
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
return;

dev_priv->busy = true;
intel_increase_renderclock(dev, true);
if (!dev_priv->busy) {
dev_priv->busy = 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) {
if (!crtc->fb)
Expand Down

0 comments on commit 28cf798

Please sign in to comment.