summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-04-15 15:33:01 +0200
committerDave Airlie <airlied@redhat.com>2014-04-30 09:48:28 +1000
commit25c8b5c3048cb6c98d402ca8d4735ccf910f727c (patch)
tree31a7fe1abcded36ca269adb54e5229962951c1d7 /drivers
parentd8af20bcae25e8792ccd8c94404e6e57e7db75f2 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index e930d4fe29c7..1ef5ab9c9d51 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -145,6 +145,7 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
plane->crtc = crtc;
plane->fb = crtc->primary->fb;
+ drm_framebuffer_reference(plane->fb);
return 0;
}