diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-07 17:56:47 +0000 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-22 21:26:33 +0200 |
commit | ecd9caa0522db5a6b03ac8858c42067ef9d8323b (patch) | |
tree | 026c26d2b14dd392e12034d5d9f38356c7df8ada /drivers/gpu/drm/i915/intel_overlay.c | |
parent | 330afdb1df0f3fb48583105493a8f4f8d9e3af36 (diff) | |
download | op-kernel-dev-ecd9caa0522db5a6b03ac8858c42067ef9d8323b.zip op-kernel-dev-ecd9caa0522db5a6b03ac8858c42067ef9d8323b.tar.gz |
drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff
The i915_gem_active stuff doesn't like a NULL ->retire hook, but
the overlay code can set it to NULL. That obviously ends up oopsing.
Fix it by introducing a new helper to assign the retirement callback
that will switch out the NULL function pointer with
i915_gem_retire_noop.
Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Fixes: 0d9bdd886f29 ("drm/i915: Convert intel_overlay to request tracking")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20161207175647.10018-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index bcfb60c..d513a05 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -216,7 +216,8 @@ static void intel_overlay_submit_request(struct intel_overlay *overlay, { GEM_BUG_ON(i915_gem_active_peek(&overlay->last_flip, &overlay->i915->drm.struct_mutex)); - overlay->last_flip.retire = retire; + i915_gem_active_set_retire_fn(&overlay->last_flip, retire, + &overlay->i915->drm.struct_mutex); i915_gem_active_set(&overlay->last_flip, req); i915_add_request(req); } |