Skip to contentSkip to conversation

drm/gma500: Do not clear framebuffer GEM objects during cleanup

PATCH In review Thomas Zimmermann 2 participants 2 messages Sep 4, 2025 – Sep 9, 2025

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/gma500: Do not clear framebuffer GEM objects during cleanup

Gma500 unnecessarily clears the framebuffer's GEM-object pointer before calling drm_framebuffer_cleanup(). Remove this code to make gma500 consistent with the rest of the drivers.

The change is cosmetic, as drm_framebuffer_cleanup() does not touch the object pointer on gma500.

---
This change was first tested and submitted as part of the patch at
https://lore.kernel.org/dri-devel/[email protected]/ . It didn't get merged because it wasn't strictly required for that fix.

---
 drivers/gpu/drm/gma500/fbdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/gma500/fbdev.c +0 -2
index 4a37136f90f4..32d31e5f5f1a 100644
@@ -120,7 +120,6 @@ static void psb_fbdev_fb_destroy(struct fb_info *info)
 	drm_fb_helper_fini(fb_helper);
 
 	drm_framebuffer_unregister_private(fb);
-	fb->obj[0] = NULL;
 	drm_framebuffer_cleanup(fb);
 	kfree(fb);
 
@@ -245,7 +244,6 @@ int psb_fbdev_driver_fbdev_probe(struct drm_fb_helper *fb_helper,
 
 err_drm_framebuffer_unregister_private:
 	drm_framebuffer_unregister_private(fb);
-	fb->obj[0] = NULL;
 	drm_framebuffer_cleanup(fb);
 	kfree(fb);
 err_drm_gem_object_put:
Signature · 1 line
2.50.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thomas Zimmermann

Gma500 unnecessarily clears the framebuffer's GEM-object pointer before calling drm_framebuffer_cleanup(). Remove this code to make gma500 consistent with the rest of the drivers.

The change is cosmetic, as drm_framebuffer_cleanup() does not touch the object pointer on gma500.

Hi Thomas, looks good.

Quoted 31 lines

---
This change was first tested and submitted as part of the patch at
https://lore.kernel.org/dri-devel/[email protected]/ . It didn't get merged because it wasn't strictly required for that fix.

---
 drivers/gpu/drm/gma500/fbdev.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/gma500/fbdev.c +0 -3
index 4a37136f90f4..32d31e5f5f1a 100644
@@ -120,7 +120,6 @@ static void psb_fbdev_fb_destroy(struct fb_info *info)
        drm_fb_helper_fini(fb_helper);
 
        drm_framebuffer_unregister_private(fb);
-       fb->obj[0] = NULL;
        drm_framebuffer_cleanup(fb);
        kfree(fb);
 
@@ -245,7 +244,6 @@ int psb_fbdev_driver_fbdev_probe(struct drm_fb_helper *fb_helper,
 
 err_drm_framebuffer_unregister_private:
        drm_framebuffer_unregister_private(fb);
-       fb->obj[0] = NULL;
        drm_framebuffer_cleanup(fb);
        kfree(fb);
 err_drm_gem_object_put:
--

2.50.1