diff options
author | Dave Airlie <airlied@redhat.com> | 2022-05-14 08:34:01 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-05-14 08:34:07 +1000 |
commit | eb7bac3973d209e5227d1783676362ee5a8a7127 (patch) | |
tree | 8a9af4c39dbf271f671aa82c2d156174f795806b /drivers/video/fbdev/simplefb.c | |
parent | 30c60ba354ce28e2953e0d3c50580aa67fb863cd (diff) | |
parent | 6fed53de560768bde6d701a7c79c253b45b259e3 (diff) | |
download | linux-eb7bac3973d209e5227d1783676362ee5a8a7127.tar.bz2 |
Merge tag 'drm-misc-fixes-2022-05-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Multiple fixes to fbdev to address a regression at unregistration, an
iommu detection improvement for nouveau, a memory leak fix for nouveau,
pointer dereference fix for dma_buf_file_release(), and a build breakage
fix for vc4
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220513073044.ymayac7x7bzatrt7@houat
Diffstat (limited to 'drivers/video/fbdev/simplefb.c')
-rw-r--r-- | drivers/video/fbdev/simplefb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c index 94fc9c6d0411..2c198561c338 100644 --- a/drivers/video/fbdev/simplefb.c +++ b/drivers/video/fbdev/simplefb.c @@ -84,6 +84,10 @@ struct simplefb_par { static void simplefb_clocks_destroy(struct simplefb_par *par); static void simplefb_regulators_destroy(struct simplefb_par *par); +/* + * fb_ops.fb_destroy is called by the last put_fb_info() call at the end + * of unregister_framebuffer() or fb_release(). Do any cleanup here. + */ static void simplefb_destroy(struct fb_info *info) { struct simplefb_par *par = info->par; @@ -94,6 +98,8 @@ static void simplefb_destroy(struct fb_info *info) if (info->screen_base) iounmap(info->screen_base); + framebuffer_release(info); + if (mem) release_mem_region(mem->start, resource_size(mem)); } @@ -545,8 +551,8 @@ static int simplefb_remove(struct platform_device *pdev) { struct fb_info *info = platform_get_drvdata(pdev); + /* simplefb_destroy takes care of info cleanup */ unregister_framebuffer(info); - framebuffer_release(info); return 0; } |