summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
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 01:48:28 +0200
commit25c8b5c3048cb6c98d402ca8d4735ccf910f727c (patch)
tree31a7fe1abcded36ca269adb54e5229962951c1d7 /drivers/gpu
parentMerge branch 'vmwgfx-fixes-3.15' of git://people.freedesktop.org/~thomash/lin... (diff)
downloadlinux-25c8b5c3048cb6c98d402ca8d4735ccf910f727c.tar.xz
linux-25c8b5c3048cb6c98d402ca8d4735ccf910f727c.zip
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/gpu')
-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;
}