diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-04 16:39:59 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-04 17:39:10 +0300 |
commit | 274cbf20fd108fa26d0497282b102e00371210fd (patch) | |
tree | 6aa8f12665f337ac9ea94d0198be2f33ee214d3c /drivers/gpu/drm/i915/display/intel_frontbuffer.c | |
parent | 2850748ef8763ab46958e43a4d1c445f29eeb37d (diff) | |
download | linux-274cbf20fd108fa26d0497282b102e00371210fd.tar.xz |
drm/i915: Push the i915_active.retire into a worker
As we need to use a mutex to serialise i915_active activation
(because we want to allow the callback to sleep), we need to push the
i915_active.retire into a worker callback in case we get need to retire
from an atomic context.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191004134015.13204-5-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_frontbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_frontbuffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c index fc40dc1fdbcc..6428b8dd70d3 100644 --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c @@ -206,6 +206,7 @@ static int frontbuffer_active(struct i915_active *ref) return 0; } +__i915_active_call static void frontbuffer_retire(struct i915_active *ref) { struct intel_frontbuffer *front = @@ -257,7 +258,8 @@ intel_frontbuffer_get(struct drm_i915_gem_object *obj) kref_init(&front->ref); atomic_set(&front->bits, 0); i915_active_init(i915, &front->write, - frontbuffer_active, frontbuffer_retire); + frontbuffer_active, + i915_active_may_sleep(frontbuffer_retire)); spin_lock(&i915->fb_tracking.lock); if (obj->frontbuffer) { |