diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 91891cf..cb3ed9b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -548,6 +548,38 @@ static const struct component_master_ops exynos_drm_ops = {
 	.unbind		= exynos_drm_unbind,
 };
 
+static int exynos_drm_platform_probe(struct platform_device *pdev)
+{
+	struct component_match *match;
+
+	pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+	exynos_drm_driver.num_ioctls = ARRAY_SIZE(exynos_ioctls);
+
+	match = exynos_drm_match_add(&pdev->dev);
+	if (IS_ERR(match)) {
+		return PTR_ERR(match);
+	}
+
+	return component_master_add_with_match(&pdev->dev, &exynos_drm_ops,
+					       match);
+}
+
+static int exynos_drm_platform_remove(struct platform_device *pdev)
+{
+	component_master_del(&pdev->dev, &exynos_drm_ops);
+	return 0;
+}
+
+static struct platform_driver exynos_drm_platform_driver = {
+	.probe	= exynos_drm_platform_probe,
+	.remove	= exynos_drm_platform_remove,
+	.driver	= {
+		.owner	= THIS_MODULE,
+		.name	= "exynos-drm",
+		.pm	= &exynos_drm_pm_ops,
+	},
+};
+
 static struct platform_driver *const exynos_drm_kms_drivers[] = {
 #ifdef CONFIG_DRM_EXYNOS_FIMD
 	&fimd_driver,
@@ -582,13 +614,24 @@ static struct platform_driver *const exynos_drm_non_kms_drivers[] = {
 #endif
 };
 
-static int exynos_drm_platform_probe(struct platform_device *pdev)
+static int exynos_drm_init(void)
 {
-	struct component_match *match;
 	int ret, i, j;
 
-	pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-	exynos_drm_driver.num_ioctls = ARRAY_SIZE(exynos_ioctls);
+	exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1,
+								NULL, 0);
+	if (IS_ERR(exynos_drm_pdev))
+		return PTR_ERR(exynos_drm_pdev);
+
+#ifdef CONFIG_DRM_EXYNOS_VIDI
+	ret = exynos_drm_probe_vidi();
+	if (ret < 0)
+		goto err_unregister_pd;
+#endif
+
+	ret = platform_driver_register(&exynos_drm_platform_driver);
+	if (ret)
+		goto err_remove_vidi;
 
 	for (i = 0; i < ARRAY_SIZE(exynos_drm_kms_drivers); ++i) {
 		ret = platform_driver_register(exynos_drm_kms_drivers[i]);
@@ -596,26 +639,17 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
 			goto err_unregister_kms_drivers;
 	}
 
-	match = exynos_drm_match_add(&pdev->dev);
-	if (IS_ERR(match)) {
-		ret = PTR_ERR(match);
-		goto err_unregister_kms_drivers;
-	}
-
-	ret = component_master_add_with_match(&pdev->dev, &exynos_drm_ops,
-						match);
-	if (ret < 0)
-		goto err_unregister_kms_drivers;
-
 	for (j = 0; j < ARRAY_SIZE(exynos_drm_non_kms_drivers); ++j) {
 		ret = platform_driver_register(exynos_drm_non_kms_drivers[j]);
 		if (ret < 0)
-			goto err_del_component_master;
+			goto err_unregister_non_kms_drivers;
 	}
 
+#ifdef CONFIG_DRM_EXYNOS_IPP
 	ret = exynos_platform_device_ipp_register();
 	if (ret < 0)
 		goto err_unregister_non_kms_drivers;
+#endif
 
 	return ret;
 
@@ -626,17 +660,22 @@ err_unregister_non_kms_drivers:
 	while (--j >= 0)
 		platform_driver_unregister(exynos_drm_non_kms_drivers[j]);
 
-err_del_component_master:
-	component_master_del(&pdev->dev, &exynos_drm_ops);
-
 err_unregister_kms_drivers:
 	while (--i >= 0)
 		platform_driver_unregister(exynos_drm_kms_drivers[i]);
 
+err_remove_vidi:
+#ifdef CONFIG_DRM_EXYNOS_VIDI
+	exynos_drm_remove_vidi();
+
+err_unregister_pd:
+#endif
+	platform_device_unregister(exynos_drm_pdev);
+
 	return ret;
 }
 
-static int exynos_drm_platform_remove(struct platform_device *pdev)
+static void exynos_drm_exit(void)
 {
 	int i;
 
@@ -647,54 +686,9 @@ static int exynos_drm_platform_remove(struct platform_device *pdev)
 	for (i = ARRAY_SIZE(exynos_drm_non_kms_drivers) - 1; i >= 0; --i)
 		platform_driver_unregister(exynos_drm_non_kms_drivers[i]);
 
-	component_master_del(&pdev->dev, &exynos_drm_ops);
-
 	for (i = ARRAY_SIZE(exynos_drm_kms_drivers) - 1; i >= 0; --i)
 		platform_driver_unregister(exynos_drm_kms_drivers[i]);
 
-	return 0;
-}
-
-static struct platform_driver exynos_drm_platform_driver = {
-	.probe	= exynos_drm_platform_probe,
-	.remove	= exynos_drm_platform_remove,
-	.driver	= {
-		.owner	= THIS_MODULE,
-		.name	= "exynos-drm",
-		.pm	= &exynos_drm_pm_ops,
-	},
-};
-
-static int exynos_drm_init(void)
-{
-	int ret;
-
-	exynos_drm_pdev = platform_device_register_simple("exynos-drm", -1,
-								NULL, 0);
-	if (IS_ERR(exynos_drm_pdev))
-		return PTR_ERR(exynos_drm_pdev);
-
-	ret = exynos_drm_probe_vidi();
-	if (ret < 0)
-		goto err_unregister_pd;
-
-	ret = platform_driver_register(&exynos_drm_platform_driver);
-	if (ret)
-		goto err_remove_vidi;
-
-	return 0;
-
-err_remove_vidi:
-	exynos_drm_remove_vidi();
-
-err_unregister_pd:
-	platform_device_unregister(exynos_drm_pdev);
-
-	return ret;
-}
-
-static void exynos_drm_exit(void)
-{
 	platform_driver_unregister(&exynos_drm_platform_driver);
 
 	exynos_drm_remove_vidi();
