drm/exynos: remove exynos_drm_fb_get_buf_cnt()
authorJoonyoung Shim <jy0922.shim@samsung.com>
Tue, 1 Sep 2015 07:22:54 +0000 (16:22 +0900)
committerInki Dae <daeinki@gmail.com>
Wed, 2 Sep 2015 14:10:34 +0000 (23:10 +0900)
We can get buffer count of framebuffer using drm_format_num_planes(), so
keeping exynos_drm_fb_get_buf_cnt() is unnecessary.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fb.c
drivers/gpu/drm/exynos/exynos_drm_fb.h
drivers/gpu/drm/exynos/exynos_drm_plane.c

index 849925ca0cdd6471efc7b3dac003936d5609d289..5087f60985f5562131653a316325b057fbc2fd8a 100644 (file)
@@ -121,15 +121,6 @@ static struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
        .dirty          = exynos_drm_fb_dirty,
 };
 
-unsigned int exynos_drm_fb_get_buf_cnt(struct drm_framebuffer *fb)
-{
-       struct exynos_drm_fb *exynos_fb;
-
-       exynos_fb = to_exynos_fb(fb);
-
-       return exynos_fb->buf_cnt;
-}
-
 struct drm_framebuffer *
 exynos_drm_framebuffer_init(struct drm_device *dev,
                            struct drm_mode_fb_cmd2 *mode_cmd,
index 8900f6baf315313cec51a5d353343b5e88e23fca..85e4445b920e30673bb7f3ae38591c5a29a5f902 100644 (file)
@@ -28,7 +28,4 @@ struct exynos_drm_gem_obj *exynos_drm_fb_gem_obj(struct drm_framebuffer *fb,
 
 void exynos_drm_mode_config_init(struct drm_device *dev);
 
-/* get a buffer count to drm framebuffer. */
-unsigned int exynos_drm_fb_get_buf_cnt(struct drm_framebuffer *fb);
-
 #endif
index 865d6eb0c8458e4f5e7f6df80ec5e1d495d9db69..7148224414672c37ef96a562b5f0d7f91931411a 100644 (file)
@@ -126,7 +126,7 @@ static int exynos_plane_atomic_check(struct drm_plane *plane,
        if (!state->fb)
                return 0;
 
-       nr = exynos_drm_fb_get_buf_cnt(state->fb);
+       nr = drm_format_num_planes(state->fb->pixel_format);
        for (i = 0; i < nr; i++) {
                struct exynos_drm_gem_obj *obj =
                                        exynos_drm_fb_gem_obj(state->fb, i);