drm/msm: Free fb helper resources in msm_unload
authorArchit Taneja <architt@codeaurora.org>
Thu, 25 Feb 2016 05:49:45 +0000 (11:19 +0530)
committerRob Clark <robdclark@gmail.com>
Wed, 2 Mar 2016 21:19:45 +0000 (16:19 -0500)
We have a msm_fbev_free function to uninit fb_helper stuff, but we aren't
using it. Call it in msm_unload.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h

index 9a30807b900b1b4fe12ae2e32d152ee0b6e89c18..c1053d634e9158e7022932bed2506cc320f5851c 100644 (file)
@@ -196,6 +196,11 @@ static int msm_unload(struct drm_device *dev)
        }
 
        drm_kms_helper_poll_fini(dev);
+
+#ifdef CONFIG_DRM_FBDEV_EMULATION
+       if (fbdev && priv->fbdev)
+               msm_fbdev_free(dev);
+#endif
        drm_mode_config_cleanup(dev);
        drm_vblank_cleanup(dev);
 
index c1e7bba2fdb7f6aac791da4c62de61b4fd5e8231..1aff485e4bb70c364ea1db4316dc82953a1466b7 100644 (file)
@@ -240,6 +240,7 @@ struct drm_framebuffer *msm_framebuffer_create(struct drm_device *dev,
                struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd);
 
 struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev);
+void msm_fbdev_free(struct drm_device *dev);
 
 struct hdmi;
 int hdmi_modeset_init(struct hdmi *hdmi, struct drm_device *dev,