diff mbox

[v2,8/9] drm/exynos: Remove custom FB helper deferred setup

Message ID 20160607152625.9511-9-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding June 7, 2016, 3:26 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

The FB helper core now supports deferred setup, so the driver's custom
implementation can be removed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c   | 8 ++++++--
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 --
 2 files changed, 6 insertions(+), 4 deletions(-)

Comments

Daniel Vetter June 7, 2016, 7:49 p.m. UTC | #1
On Tue, Jun 07, 2016 at 05:26:24PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The FB helper core now supports deferred setup, so the driver's custom
> implementation can be removed.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c   | 8 ++++++--
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 --
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 2dd820e23b0c..259c2585c703 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -215,11 +215,15 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
>  	/* init kms poll for handling hpd */
>  	drm_kms_helper_poll_init(dev);
>  
> -	/* force connectors detection */
> -	drm_helper_hpd_irq_event(dev);
> +	ret = exynos_drm_fbdev_init(dev);
> +	if (ret)
> +		goto err_cleanup_poll;
>  
>  	return 0;
>  
> +err_cleanup_poll:
> +	drm_kms_helper_poll_fini(dev);
> +	exynos_drm_device_subdrv_remove(dev);
>  err_cleanup_vblank:
>  	drm_vblank_cleanup(dev);
>  err_unbind_all:
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index 67dcd6831291..83a277946200 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -319,6 +319,4 @@ void exynos_drm_output_poll_changed(struct drm_device *dev)
>  
>  	if (fb_helper)
>  		drm_fb_helper_hotplug_event(fb_helper);

I think you can drop that if now too, since we always init the structure
(just not register the fbdev instance itself).
-Daniel

> -	else
> -		exynos_drm_fbdev_init(dev);
>  }
> -- 
> 2.8.3
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 2dd820e23b0c..259c2585c703 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -215,11 +215,15 @@  static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 	/* init kms poll for handling hpd */
 	drm_kms_helper_poll_init(dev);
 
-	/* force connectors detection */
-	drm_helper_hpd_irq_event(dev);
+	ret = exynos_drm_fbdev_init(dev);
+	if (ret)
+		goto err_cleanup_poll;
 
 	return 0;
 
+err_cleanup_poll:
+	drm_kms_helper_poll_fini(dev);
+	exynos_drm_device_subdrv_remove(dev);
 err_cleanup_vblank:
 	drm_vblank_cleanup(dev);
 err_unbind_all:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 67dcd6831291..83a277946200 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -319,6 +319,4 @@  void exynos_drm_output_poll_changed(struct drm_device *dev)
 
 	if (fb_helper)
 		drm_fb_helper_hotplug_event(fb_helper);
-	else
-		exynos_drm_fbdev_init(dev);
 }