diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-21 12:55:39 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-05 15:30:10 -0500 |
commit | f62a007603f86d36b920265bbf6ae0c698d882d8 (patch) | |
tree | d6402d144cd65f0dd50cdee0ee204e591f8c7193 /drivers/gpu/drm/i915/i915_drv.h | |
parent | e9dbd2b20201b49b04476d2e5763faa822967913 (diff) |
drm/i915: Accurately track when we mark the hardware as idle/busy
We currently call intel_mark_idle() too often, as we do so as a
side-effect of processing the request queue. However, we the calls to
intel_mark_idle() are expected to be paired with a call to
intel_mark_busy() (or else we try to idle the hardware by accessing
registers that are already disabled). Make the idle/busy tracking
explicit to prevent the multiple calls.
v2: We can drop some of the complexity in __i915_add_request() as
queue_delayed_work() already behaves as we want (not requeuing the item
if it is already in the queue) and mark_busy/mark_idle imply that the
idle task is inactive.
v3: We do still need to cancel the pending idle task so that it is sent
again after the current busy load completes (not in the middle of it).
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 944c6174cd42..0d1e8bebaecd 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1124,6 +1124,14 @@ struct i915_gem_mm { | |||
1124 | */ | 1124 | */ |
1125 | bool interruptible; | 1125 | bool interruptible; |
1126 | 1126 | ||
1127 | /** | ||
1128 | * Is the GPU currently considered idle, or busy executing userspace | ||
1129 | * requests? Whilst idle, we attempt to power down the hardware and | ||
1130 | * display clocks. In order to reduce the effect on performance, there | ||
1131 | * is a slight delay before we do so. | ||
1132 | */ | ||
1133 | bool busy; | ||
1134 | |||
1127 | /** Bit 6 swizzling required for X tiling */ | 1135 | /** Bit 6 swizzling required for X tiling */ |
1128 | uint32_t bit_6_swizzle_x; | 1136 | uint32_t bit_6_swizzle_x; |
1129 | /** Bit 6 swizzling required for Y tiling */ | 1137 | /** Bit 6 swizzling required for Y tiling */ |