Patch "drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-fix-oopses-in-the-overlay-code-due-to-i915_gem_active-stuff.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b72eb5ffa6d8601d9ba72619d75fb5b27723743aMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Wed, 7 Dec 2016 17:56:47 +0000
Subject: drm/i915: Fix oopses in the overlay code due to i915_gem_active stuff
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ville Syrjälä <[email protected]>
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.
--- drivers/gpu/drm/i915/i915_gem_request.h | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_overlay.c | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_request.h +19 -0
@@ -344,6 +344,25 @@ i915_gem_active_set(struct i915_gem_actircu_assign_pointer (active->request, request); } +/** +* i915_gem_active_set_retire_fn - updates the retirement callback +* @active - the active tracker +* @fn - the routine called when the request is retired +* @mutex - struct_mutex used to guard retirements +* +* i915_gem_active_set_retire_fn() updates the function pointer that +* is called when the final request associated with the @active tracker +* is retired. +*/ +static inline void +i915_gem_active_set_retire_fn (struct i915_gem_active *active, +i915_gem_retire_fn fn, +struct mutex *mutex) +{ +lockdep_assert_held (mutex); + active->retire = fn ?: i915_gem_retire_noop; +} +static inline struct drm_i915_gem_request *__i915_gem_active_peek (const struct i915_gem_active *active) {
drivers/gpu/drm/i915/intel_overlay.c +2 -1
@@ -216,7 +216,8 @@ static void intel_overlay_submit_request {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); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/drm-i915-fix-oopses-in-the-overlay-code-due-to-i915_gem_active-stuff.patch queue-4.9/drm-i915-initialize-overlay-last_flip-properly.patch queue-4.9/drm-i915-force-vdd-off-on-the-new-power-seqeuencer-before-starting-to-use-it.patch queue-4.9/drm-i915-fix-oops-in-overlay-due-to-frontbuffer-tracking.patch