Commit 25c8b5c3048cb6c98d402ca8d4735ccf910f727c

Authored by Andrzej Hajda
Committed by Dave Airlie
1 parent d8af20bcae

drm/exynos: balance framebuffer refcount

exynos_drm_crtc_mode_set assigns primary framebuffer to plane without
taking reference. Then during framebuffer removal it is dereferenced twice,
causing oops. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/gpu/drm/exynos/exynos_drm_crtc.c
... ... @@ -145,6 +145,7 @@
145 145  
146 146 plane->crtc = crtc;
147 147 plane->fb = crtc->primary->fb;
  148 + drm_framebuffer_reference(plane->fb);
148 149  
149 150 return 0;
150 151 }