Skip to content

Commit 89c258b

Browse files
Thomas Zimmermanndaeinki
authored andcommitted
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: Thomas Zimmermann <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent e82c98f commit 89c258b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

drivers/gpu/drm/exynos/exynos_drm_fbdev.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <drm/drm_fb_helper.h>
1717
#include <drm/drm_fourcc.h>
1818
#include <drm/drm_framebuffer.h>
19+
#include <drm/drm_gem_framebuffer_helper.h>
1920
#include <drm/drm_prime.h>
2021
#include <drm/drm_probe_helper.h>
2122
#include <drm/exynos_drm.h>
@@ -32,17 +33,14 @@
3233

3334
struct exynos_drm_fbdev {
3435
struct drm_fb_helper drm_fb_helper;
35-
struct exynos_drm_gem *exynos_gem;
3636
};
3737

38-
static int exynos_drm_fb_mmap(struct fb_info *info,
39-
struct vm_area_struct *vma)
38+
static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
4039
{
4140
struct drm_fb_helper *helper = info->par;
42-
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper);
43-
struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem;
41+
struct drm_gem_object *obj = drm_gem_fb_get_obj(helper->fb, 0);
4442

45-
return drm_gem_prime_mmap(&exynos_gem->base, vma);
43+
return drm_gem_prime_mmap(obj, vma);
4644
}
4745

4846
static const struct fb_ops exynos_drm_fb_ops = {
@@ -89,7 +87,6 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
8987
static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
9088
struct drm_fb_helper_surface_size *sizes)
9189
{
92-
struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
9390
struct exynos_drm_gem *exynos_gem;
9491
struct drm_device *dev = helper->dev;
9592
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
@@ -113,8 +110,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
113110
if (IS_ERR(exynos_gem))
114111
return PTR_ERR(exynos_gem);
115112

116-
exynos_fbdev->exynos_gem = exynos_gem;
117-
118113
helper->fb =
119114
exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1);
120115
if (IS_ERR(helper->fb)) {

0 commit comments

Comments
 (0)