drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 7 Dec 2016 17:56:47 +0000 (17:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:07 +0000 (11:39 +0100)
commit5652dd3f005d7947c588ced586e09c48d68be7ae
treeec81854e13aa8ca3b79d245d106a102b27afbea7
parent8f8157c2a72af9cbd0e868ef64b90565b818a445
drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff

commit b72eb5ffa6d8601d9ba72619d75fb5b27723743a upstream.

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: 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
(cherry picked from commit ecd9caa0522db5a6b03ac8858c42067ef9d8323b)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/i915_gem_request.h
drivers/gpu/drm/i915/intel_overlay.c