mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drm/i915: Fix oops in overlay due to frontbuffer tracking
The vma will be NULL if the overlay was previously off, so dereferencing it will oops. Check for NULL before doing that. Cc: [email protected] Cc: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Fixes:9b3b7841b8("drm/i915/overlay: Use VMA as the primary tracker for images") Signed-off-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Chris Wilson <[email protected]> (cherry picked from commit4a15cdbbc5) Signed-off-by: Jani Nikula <[email protected]>
This commit is contained in:
parent
b72eb5ffa6
commit
9169757ae6
1 changed files with 2 additions and 2 deletions
|
|
@ -840,8 +840,8 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
|
|||
if (ret)
|
||||
goto out_unpin;
|
||||
|
||||
i915_gem_track_fb(overlay->vma->obj, new_bo,
|
||||
INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
i915_gem_track_fb(overlay->vma ? overlay->vma->obj : NULL,
|
||||
vma->obj, INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
overlay->old_vma = overlay->vma;
|
||||
overlay->vma = vma;
|
||||
|
|
|
|||
Loading…
Reference in a new issue