Commit afb49e4d authored by Stefan Agner's avatar Stefan Agner

drm/fsl-dcu: deallocate fbdev CMA on unload

Free fbdev CMA using drm_fbdev_cma_fini on unload. This fixes
a warning when unloading the driver:
WARNING: CPU: 0 PID: 164 at drivers/gpu/drm/drm_crtc.c:5930 drm_mode_config_cleanup+0x204/0x208
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
parent b617966c
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <drm/drmP.h> #include <drm/drmP.h>
#include <drm/drm_crtc_helper.h> #include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_cma_helper.h>
#include "fsl_dcu_drm_crtc.h" #include "fsl_dcu_drm_crtc.h"
...@@ -90,6 +91,9 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) ...@@ -90,6 +91,9 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)
return 0; return 0;
done: done:
if (fsl_dev->fbdev)
drm_fbdev_cma_fini(fsl_dev->fbdev);
drm_mode_config_cleanup(dev); drm_mode_config_cleanup(dev);
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
drm_irq_uninstall(dev); drm_irq_uninstall(dev);
...@@ -100,6 +104,11 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) ...@@ -100,6 +104,11 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags)
static int fsl_dcu_unload(struct drm_device *dev) static int fsl_dcu_unload(struct drm_device *dev)
{ {
struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
if (fsl_dev->fbdev)
drm_fbdev_cma_fini(fsl_dev->fbdev);
drm_mode_config_cleanup(dev); drm_mode_config_cleanup(dev);
drm_vblank_cleanup(dev); drm_vblank_cleanup(dev);
drm_irq_uninstall(dev); drm_irq_uninstall(dev);
......
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