From 94e30d93f9360051b76e8e2a4b61753cde5e16c8 Mon Sep 17 00:00:00 2001 From: Joonyoung Shim Date: Tue, 1 Sep 2015 16:22:47 +0900 Subject: drm/exynos: remove exynos_drm_fb_set_buf_cnt() The exynos_drm_fb_set_buf_cnt() is used to set buffer count only in exynos_drm_fbdev_update(). This patch sets directly buffer count in exynos_drm_framebuffer_init() without using exynos_drm_fb_set_buf_cnt(), so there is no any reason to keep exynos_drm_fb_set_buf_cnt(). Signed-off-by: Joonyoung Shim Reviewed-by: Gustavo Padovan Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_fb.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/drm/exynos/exynos_drm_fb.c') diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index 59ebbe547290..9cf1701e6bba 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c @@ -122,16 +122,6 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = { .dirty = exynos_drm_fb_dirty, }; -void exynos_drm_fb_set_buf_cnt(struct drm_framebuffer *fb, - unsigned int cnt) -{ - struct exynos_drm_fb *exynos_fb; - - exynos_fb = to_exynos_fb(fb); - - exynos_fb->buf_cnt = cnt; -} - unsigned int exynos_drm_fb_get_buf_cnt(struct drm_framebuffer *fb) { struct exynos_drm_fb *exynos_fb; @@ -163,6 +153,9 @@ exynos_drm_framebuffer_init(struct drm_device *dev, drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd); exynos_fb->exynos_gem_obj[0] = exynos_gem_obj; + /* buffer count to framebuffer always is 1 at booting time. */ + exynos_fb->buf_cnt = 1; + ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs); if (ret) { kfree(exynos_fb); -- cgit v1.2.3