]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
drm/fsl-dcu: disable outputs before unloading driver
[karo-tx-linux.git] / drivers / gpu / drm / fsl-dcu / fsl_dcu_drm_drv.c
index e04efbed1a54f89e4277186405c2b46d59604d52..f8313f2b113aebbc7e088d4ff77e5c79ae4b2b1a 100644 (file)
@@ -108,6 +108,7 @@ static int fsl_dcu_unload(struct drm_device *dev)
 {
        struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
 
+       drm_crtc_force_disable_all(dev);
        drm_kms_helper_poll_fini(dev);
 
        if (fsl_dev->fbdev)
@@ -180,9 +181,7 @@ static const struct file_operations fsl_dcu_drm_fops = {
        .open           = drm_open,
        .release        = drm_release,
        .unlocked_ioctl = drm_ioctl,
-#ifdef CONFIG_COMPAT
        .compat_ioctl   = drm_compat_ioctl,
-#endif
        .poll           = drm_poll,
        .read           = drm_read,
        .llseek         = no_llseek,
@@ -430,9 +429,9 @@ static int fsl_dcu_drm_remove(struct platform_device *pdev)
 {
        struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev);
 
+       drm_put_dev(fsl_dev->drm);
        clk_disable_unprepare(fsl_dev->clk);
        clk_unregister(fsl_dev->pix_clk);
-       drm_put_dev(fsl_dev->drm);
 
        return 0;
 }