Commit 89c258b5 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Inki Dae

drm/exynos: Remove exynos_gem from struct exynos_drm_fbdev

Fbdev's framebuffer stores a pointer to the GEM object. Remove
struct exynos_drm_fbdev.exynos_gem, which contains the same value.
No functional changes.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent e82c98f2
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <drm/drm_fb_helper.h> #include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h> #include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_prime.h> #include <drm/drm_prime.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/exynos_drm.h> #include <drm/exynos_drm.h>
...@@ -32,17 +33,14 @@ ...@@ -32,17 +33,14 @@
struct exynos_drm_fbdev { struct exynos_drm_fbdev {
struct drm_fb_helper drm_fb_helper; struct drm_fb_helper drm_fb_helper;
struct exynos_drm_gem *exynos_gem;
}; };
static int exynos_drm_fb_mmap(struct fb_info *info, static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
struct vm_area_struct *vma)
{ {
struct drm_fb_helper *helper = info->par; struct drm_fb_helper *helper = info->par;
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper); struct drm_gem_object *obj = drm_gem_fb_get_obj(helper->fb, 0);
struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
return drm_gem_prime_mmap(&exynos_gem->base, vma); return drm_gem_prime_mmap(obj, vma);
} }
static const struct fb_ops exynos_drm_fb_ops = { static const struct fb_ops exynos_drm_fb_ops = {
...@@ -89,7 +87,6 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper, ...@@ -89,7 +87,6 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes) struct drm_fb_helper_surface_size *sizes)
{ {
struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
struct exynos_drm_gem *exynos_gem; struct exynos_drm_gem *exynos_gem;
struct drm_device *dev = helper->dev; struct drm_device *dev = helper->dev;
struct drm_mode_fb_cmd2 mode_cmd = { 0 }; struct drm_mode_fb_cmd2 mode_cmd = { 0 };
...@@ -113,8 +110,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -113,8 +110,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
if (IS_ERR(exynos_gem)) if (IS_ERR(exynos_gem))
return PTR_ERR(exynos_gem); return PTR_ERR(exynos_gem);
exynos_fbdev->exynos_gem = exynos_gem;
helper->fb = helper->fb =
exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1);
if (IS_ERR(helper->fb)) { if (IS_ERR(helper->fb)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment