summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_drv.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2014-11-20 21:42:55 -0200
committerInki Dae <inki.dae@samsung.com>2014-11-24 18:02:56 +0900
commitb67139571ec0956eb94a354572df73cf24d4521c (patch)
treef6d7fabac9e8b9d8ac4835b9f3a96b967bc76643 /drivers/gpu/drm/exynos/exynos_drm_drv.c
parent5af3d9bb78f130819204ef44ac9d2b635e49fc35 (diff)
downloadop-kernel-dev-b67139571ec0956eb94a354572df73cf24d4521c.zip
op-kernel-dev-b67139571ec0956eb94a354572df73cf24d4521c.tar.gz
Revert "drm/exynos: fix null pointer dereference issue"
This reverts commit cea24824ab432f8acabb254d6805e9aa756de6af. Moving subdriver probe to exynos_drm_platform_probe() was making exynos_drm_device_subdrv_probe() fail because the platform data wasn't set yet. It only gets set in exynos_drm_load. We need to find a smarter way to fix this issue. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_drv.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index eab12f0..2ca0c5d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -108,6 +108,11 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
if (ret)
goto err_unbind_all;
+ /* Probe non kms sub drivers and virtual display driver. */
+ ret = exynos_drm_device_subdrv_probe(dev);
+ if (ret)
+ goto err_cleanup_vblank;
+
/*
* enable drm irq mode.
* - with irq_enabled = true, we can use the vblank feature.
@@ -133,6 +138,8 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
return 0;
+err_cleanup_vblank:
+ drm_vblank_cleanup(dev);
err_unbind_all:
component_unbind_all(dev->dev, dev);
err_mode_config_cleanup:
@@ -146,6 +153,8 @@ err_free_private:
static int exynos_drm_unload(struct drm_device *dev)
{
+ exynos_drm_device_subdrv_remove(dev);
+
exynos_drm_fbdev_fini(dev);
drm_kms_helper_poll_fini(dev);
@@ -614,14 +623,8 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
if (ret < 0)
goto err_unregister_non_kms_drivers;
- /* Probe non kms sub drivers and virtual display driver. */
- ret = exynos_drm_device_subdrv_probe(platform_get_drvdata(pdev));
- if (ret)
- goto err_unregister_resources;
-
return ret;
-err_unregister_resources:
#ifdef CONFIG_DRM_EXYNOS_IPP
exynos_platform_device_ipp_unregister();
#endif
@@ -643,8 +646,6 @@ static int exynos_drm_platform_remove(struct platform_device *pdev)
{
int i;
- exynos_drm_device_subdrv_remove(platform_get_drvdata(pdev));
-
#ifdef CONFIG_DRM_EXYNOS_IPP
exynos_platform_device_ipp_unregister();
#endif
OpenPOWER on IntegriCloud