Re: [PATCH 2/6] drm/omapdrm: Remove fb from struct omap_fbdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/03/2023 11:32, Thomas Zimmermann wrote:
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: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
  drivers/gpu/drm/omapdrm/omap_fbdev.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index a6c8542087ec..b3d57fe4e6ac 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -25,7 +25,6 @@ module_param_named(ywrap, ywrap_enabled, bool, 0644);
struct omap_fbdev {
  	struct drm_fb_helper base;
-	struct drm_framebuffer *fb;
  	struct drm_gem_object *bo;
  	bool ywrap_enabled;
@@ -170,7 +169,6 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, DBG("fbi=%p, dev=%p", fbi, dev); - fbdev->fb = fb;
  	helper->fb = fb;
fbi->fbops = &omap_fb_ops;
@@ -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("allocated %dx%d fb", fbdev->fb->width, fbdev->fb->height);
+	DBG("allocated %dx%d fb", fb->width, fb->height);
return 0; @@ -266,6 +264,7 @@ void omap_fbdev_fini(struct drm_device *dev)
  {
  	struct omap_drm_private *priv = dev->dev_private;
  	struct drm_fb_helper *helper = priv->fbdev;
+	struct drm_framebuffer *fb;
  	struct omap_fbdev *fbdev;
DBG();
@@ -273,6 +272,8 @@ void omap_fbdev_fini(struct drm_device *dev)
  	if (!helper)
  		return;
+ fb = helper->fb;
+
  	drm_fb_helper_unregister_info(helper);
drm_fb_helper_fini(helper);
@@ -284,8 +285,8 @@ void omap_fbdev_fini(struct drm_device *dev)
  		omap_gem_unpin(fbdev->bo);
/* this will free the backing object */
-	if (fbdev->fb)
-		drm_framebuffer_remove(fbdev->fb);
+	if (fb)
+		drm_framebuffer_remove(fb);
drm_fb_helper_unprepare(helper);
  	kfree(fbdev);


Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>

 Tomi




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux