diff mbox

[9/9] drm/exynos: remove buf_cnt from struct exynos_drm_fb

Message ID 1441092175-18187-9-git-send-email-jy0922.shim@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joonyoung Shim Sept. 1, 2015, 7:22 a.m. UTC
Looking other drm drivers, there is no the restriction that framebuffer
has only one buffer in .create_handle() callback. They use just first
buffer.

If this limitation is removed, there is no reason keeping buffer count
for framebuffer, so we can remove buf_cnt from struct exynos_drm_fb.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fb.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Gustavo Padovan Sept. 1, 2015, 8:55 p.m. UTC | #1
Hi Joonyoung,

2015-09-01 Joonyoung Shim <jy0922.shim@samsung.com>:

> Looking other drm drivers, there is no the restriction that framebuffer
> has only one buffer in .create_handle() callback. They use just first
> buffer.
> 
> If this limitation is removed, there is no reason keeping buffer count
> for framebuffer, so we can remove buf_cnt from struct exynos_drm_fb.
> 
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fb.c | 9 ---------
>  1 file changed, 9 deletions(-)

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

	Gustavo
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index d2e746e..6d1b70e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -32,12 +32,10 @@ 
  * exynos specific framebuffer structure.
  *
  * @fb: drm framebuffer obejct.
- * @buf_cnt: a buffer count to drm framebuffer.
  * @exynos_gem_obj: array of exynos specific gem object containing a gem object.
  */
 struct exynos_drm_fb {
 	struct drm_framebuffer		fb;
-	unsigned int			buf_cnt;
 	struct exynos_drm_gem_obj	*exynos_gem_obj[MAX_FB_BUFFER];
 };
 
@@ -97,10 +95,6 @@  static int exynos_drm_fb_create_handle(struct drm_framebuffer *fb,
 {
 	struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb);
 
-	/* This fb should have only one gem object. */
-	if (WARN_ON(exynos_fb->buf_cnt != 1))
-		return -EINVAL;
-
 	return drm_gem_handle_create(file_priv,
 			&exynos_fb->exynos_gem_obj[0]->base, handle);
 }
@@ -135,9 +129,6 @@  exynos_drm_framebuffer_init(struct drm_device *dev,
 	if (!exynos_fb)
 		return ERR_PTR(-ENOMEM);
 
-	exynos_fb->buf_cnt = count;
-	DRM_DEBUG_KMS("buf_cnt = %d\n", exynos_fb->buf_cnt);
-
 	for (i = 0; i < count; i++) {
 		ret = check_fb_gem_memory_type(dev, gem_obj[i]);
 		if (ret < 0)