diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-05-07 13:11:06 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-05-07 17:40:19 +0100 |
commit | ae2306315fe83ba2523d557a8fe472d7c587c1ca (patch) | |
tree | bb1f093f5d15fba6ab78128ea916a9595d02ed60 /drivers/gpu/drm/i915/selftests | |
parent | ba0001657f95332302bc6494d80ef9fae4e80283 (diff) | |
download | linux-stable-ae2306315fe83ba2523d557a8fe472d7c587c1ca.tar.gz linux-stable-ae2306315fe83ba2523d557a8fe472d7c587c1ca.tar.bz2 linux-stable-ae2306315fe83ba2523d557a8fe472d7c587c1ca.zip |
drm/i915: Remove delay for idle_work
The original intent for the delay before running the idle_work was to
provide a hysteresis to avoid ping-ponging the device runtime-pm. Since
then we have also pulled in some memory management and general device
management for parking. But with the inversion of the wakeref handling,
GEM is no longer responsible for the wakeref and by the time we call the
idle_work, the device is asleep. It seems appropriate now to drop the
delay and just run the worker immediately to flush the cached GEM state
before sleeping.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gem_device.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/selftests/i915_gem_object.c index 088b2aa05dcd..b926d1cd165d 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c @@ -509,7 +509,7 @@ static void disable_retire_worker(struct drm_i915_private *i915) intel_gt_pm_get(i915); cancel_delayed_work_sync(&i915->gem.retire_work); - cancel_delayed_work_sync(&i915->gem.idle_work); + flush_work(&i915->gem.idle_work); } static void restore_retire_worker(struct drm_i915_private *i915) diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index e4033d0576c4..d919f512042c 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -59,7 +59,7 @@ static void mock_device_release(struct drm_device *dev) mutex_unlock(&i915->drm.struct_mutex); drain_delayed_work(&i915->gem.retire_work); - drain_delayed_work(&i915->gem.idle_work); + flush_work(&i915->gem.idle_work); i915_gem_drain_workqueue(i915); mutex_lock(&i915->drm.struct_mutex); @@ -195,7 +195,7 @@ struct drm_i915_private *mock_gem_device(void) mock_init_contexts(i915); INIT_DELAYED_WORK(&i915->gem.retire_work, mock_retire_work_handler); - INIT_DELAYED_WORK(&i915->gem.idle_work, mock_idle_work_handler); + INIT_WORK(&i915->gem.idle_work, mock_idle_work_handler); i915->gt.awake = true; |