Commit 38129bc9 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Tomi Valkeinen

drm/omapdrm: Remove fb from struct omap_fbdev

Fbdev's struct fb_helper stores a pointer to the framebuffer. Remove
struct omap_fbdev.fb, which contains the same value. No functional
changes.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-3-tzimmermann@suse.de
parent 6fe30712
...@@ -25,7 +25,6 @@ module_param_named(ywrap, ywrap_enabled, bool, 0644); ...@@ -25,7 +25,6 @@ module_param_named(ywrap, ywrap_enabled, bool, 0644);
struct omap_fbdev { struct omap_fbdev {
struct drm_fb_helper base; struct drm_fb_helper base;
struct drm_framebuffer *fb;
struct drm_gem_object *bo; struct drm_gem_object *bo;
bool ywrap_enabled; bool ywrap_enabled;
...@@ -170,7 +169,6 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, ...@@ -170,7 +169,6 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
DBG("fbi=%p, dev=%p", fbi, dev); DBG("fbi=%p, dev=%p", fbi, dev);
fbdev->fb = fb;
helper->fb = fb; helper->fb = fb;
fbi->fbops = &omap_fb_ops; fbi->fbops = &omap_fb_ops;
...@@ -193,7 +191,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, ...@@ -193,7 +191,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
DBG("par=%p, %dx%d", fbi->par, fbi->var.xres, fbi->var.yres); DBG("par=%p, %dx%d", fbi->par, fbi->var.xres, fbi->var.yres);
DBG("allocated %dx%d fb", fbdev->fb->width, fbdev->fb->height); DBG("allocated %dx%d fb", fb->width, fb->height);
return 0; return 0;
...@@ -266,6 +264,7 @@ void omap_fbdev_fini(struct drm_device *dev) ...@@ -266,6 +264,7 @@ void omap_fbdev_fini(struct drm_device *dev)
{ {
struct omap_drm_private *priv = dev->dev_private; struct omap_drm_private *priv = dev->dev_private;
struct drm_fb_helper *helper = priv->fbdev; struct drm_fb_helper *helper = priv->fbdev;
struct drm_framebuffer *fb;
struct omap_fbdev *fbdev; struct omap_fbdev *fbdev;
DBG(); DBG();
...@@ -273,6 +272,8 @@ void omap_fbdev_fini(struct drm_device *dev) ...@@ -273,6 +272,8 @@ void omap_fbdev_fini(struct drm_device *dev)
if (!helper) if (!helper)
return; return;
fb = helper->fb;
drm_fb_helper_unregister_info(helper); drm_fb_helper_unregister_info(helper);
drm_fb_helper_fini(helper); drm_fb_helper_fini(helper);
...@@ -284,8 +285,8 @@ void omap_fbdev_fini(struct drm_device *dev) ...@@ -284,8 +285,8 @@ void omap_fbdev_fini(struct drm_device *dev)
omap_gem_unpin(fbdev->bo); omap_gem_unpin(fbdev->bo);
/* this will free the backing object */ /* this will free the backing object */
if (fbdev->fb) if (fb)
drm_framebuffer_remove(fbdev->fb); drm_framebuffer_remove(fb);
drm_fb_helper_unprepare(helper); drm_fb_helper_unprepare(helper);
kfree(fbdev); kfree(fbdev);
......
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