diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-09-01 16:22:49 +0900 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2015-09-02 23:10:30 +0900 |
commit | d76199609823ef0c5ab20ccdc8785df283241fd1 (patch) | |
tree | 7c0d3c8ab5e9591f020c4c86d6e12ce2e556c22f /drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |
parent | 39a839f2e65185bcde80f99b5ee5ccd649ba07a2 (diff) |
drm/exynos: cleanup exynos_drm_fbdev_update()
It can get exynos_gem object via function argument, so no need to call
exynos_drm_fb_gem_obj() in exynos_drm_fbdev_update.
It also can get struct drm_framebuffer *fb via helper->fb, so can remove
a function argument for it.
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>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fbdev.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index 25170e22e597..4ef87392f82f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -75,11 +75,11 @@ static struct fb_ops exynos_drm_fb_ops = { }; static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, - struct drm_fb_helper_surface_size *sizes, - struct drm_framebuffer *fb) + struct drm_fb_helper_surface_size *sizes, + struct exynos_drm_gem_obj *obj) { struct fb_info *fbi = helper->fbdev; - struct exynos_drm_gem_obj *obj; + struct drm_framebuffer *fb = helper->fb; unsigned int size = fb->width * fb->height * (fb->bits_per_pixel >> 3); unsigned int nr_pages; unsigned long offset; @@ -87,13 +87,6 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth); drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height); - /* RGB formats use only one buffer */ - obj = exynos_drm_fb_gem_obj(fb, 0); - if (!obj) { - DRM_DEBUG_KMS("gem object is null.\n"); - return -EFAULT; - } - nr_pages = obj->size >> PAGE_SHIFT; obj->kvaddr = (void __iomem *) vmap(obj->pages, nr_pages, VM_MAP, @@ -175,7 +168,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, fbi->flags = FBINFO_FLAG_DEFAULT; fbi->fbops = &exynos_drm_fb_ops; - ret = exynos_drm_fbdev_update(helper, sizes, helper->fb); + ret = exynos_drm_fbdev_update(helper, sizes, obj); if (ret < 0) goto err_destroy_framebuffer; |