diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-30 10:36:31 +0300 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2023-04-17 10:47:54 +0300 |
commit | 89c258b5226d86a5d57b6df17eec00ab0f3d5b80 (patch) | |
tree | 20f798cf149d3b7d00ef95de30a342ecb018b247 /drivers | |
parent | e82c98f2ca439356d5595ba8c9cd782f993f6f8c (diff) | |
download | linux-89c258b5226d86a5d57b6df17eec00ab0f3d5b80.tar.xz |
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 <tzimmermann@suse.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index 4929ffe5a09a..f11895d32982 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -16,6 +16,7 @@ #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> +#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_prime.h> #include <drm/drm_probe_helper.h> #include <drm/exynos_drm.h> @@ -32,17 +33,14 @@ struct exynos_drm_fbdev { struct drm_fb_helper drm_fb_helper; - struct exynos_drm_gem *exynos_gem; }; -static int exynos_drm_fb_mmap(struct fb_info *info, - struct vm_area_struct *vma) +static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) { struct drm_fb_helper *helper = info->par; - struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper); - struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem; + struct drm_gem_object *obj = drm_gem_fb_get_obj(helper->fb, 0); - 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 = { @@ -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, struct drm_fb_helper_surface_size *sizes) { - struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); struct exynos_drm_gem *exynos_gem; struct drm_device *dev = helper->dev; struct drm_mode_fb_cmd2 mode_cmd = { 0 }; @@ -113,8 +110,6 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, if (IS_ERR(exynos_gem)) return PTR_ERR(exynos_gem); - exynos_fbdev->exynos_gem = exynos_gem; - helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); if (IS_ERR(helper->fb)) { |