]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Convert the forcewake worker into a timer func
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Mar 2014 12:00:39 +0000 (12:00 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 5 Mar 2014 20:30:12 +0000 (21:30 +0100)
commit59a358370950f64e0dbec237fd3528a7e2d33a9e
tree206e45915b0ff0df98ab4db7eae1c136a7af654f
parent6d2afdda806e6ff77a6e2bfdd425ae4b7a59ecd4
drm/i915: Convert the forcewake worker into a timer func

We don't want to suffer scheduling delay when turning off the GPU after
waking it up to touch registers. Ideally, we only want to keep the GPU
awake for the register access sequence, with a single forcewake dance on
the first access and release immediately after the last. We set a timer
on the first access so that we only dance once and on the next scheduler
tick, we drop the forcewake again.

This moves the cleanup routine from the common i915 workqueue to a timer
func so that we don't anger powertop, and drop the forcewake again
quicker.

v2: Enable the deferred force_wake_put for regular register reads as
    well.
v3: Beautification and make sure we disable forcewake when shutting
    down.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_uncore.c