dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	dri-devel@lists.freedesktop.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chen Feng <puck.chen@hisilicon.com>
Subject: Re: [PATCH 4/4] drm/hisilicon: Remove custom FB helper deferred setup
Date: Fri, 3 Jun 2016 20:40:47 +0200	[thread overview]
Message-ID: <20160603184047.GA7231@phenom.ffwll.local> (raw)
In-Reply-To: <20160603161119.30528-4-thierry.reding@gmail.com>

On Fri, Jun 03, 2016 at 06:11:19PM +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.
> 
> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
> Cc: Chen Feng <puck.chen@hisilicon.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Compile-tested only.
> 
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> index 3f94785fbcca..0e0bd77e4499 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> @@ -54,15 +54,7 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev)
>  {
>  	struct kirin_drm_private *priv = dev->dev_private;
>  
> -	if (priv->fbdev) {
> -		drm_fbdev_cma_hotplug_event(priv->fbdev);
> -	} else {
> -		priv->fbdev = drm_fbdev_cma_init(dev, 32,
> -				dev->mode_config.num_crtc,
> -				dev->mode_config.num_connector);
> -		if (IS_ERR(priv->fbdev))
> -			priv->fbdev = NULL;
> -	}
> +	drm_fbdev_cma_hotplug_event(priv->fbdev);

btw spotted a pile more if (priv->fbdev) conditions which could all be
removed for drm_fbdev_cma_hotplug_event, since that has that check
already. Care to type those patches and throw it on top?

Otherwise didn't spot anything in the driver conversion, lgtm for patches
2-4.
-Daniel

>  }
>  #endif
>  
> @@ -129,11 +121,19 @@ static int kirin_drm_kms_init(struct drm_device *dev)
>  	/* init kms poll for handling hpd */
>  	drm_kms_helper_poll_init(dev);
>  
> -	/* force detection after connectors init */
> -	(void)drm_helper_hpd_irq_event(dev);
> +	priv->fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc,
> +					 dev->mode_config.num_connector);
> +	if (IS_ERR(priv->fbdev)) {
> +		DRM_ERROR("failed to initialize fbdev.\n");
> +		ret = PTR_ERR(priv->fbdev);
> +		goto err_cleanup_poll;
> +	}
>  
>  	return 0;
>  
> +err_cleanup_poll:
> +	drm_kms_helper_poll_fini(dev);
> +	drm_vblank_cleanup(dev);
>  err_unbind_all:
>  	component_unbind_all(dev->dev, dev);
>  err_dc_cleanup:
> -- 
> 2.8.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-06-03 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 16:11 [PATCH 1/4] drm/fb-helper: Support deferred setup Thierry Reding
2016-06-03 16:11 ` [PATCH 2/4] drm/atmel-hlcdc: Remove custom FB helper " Thierry Reding
2016-06-03 16:11 ` [PATCH 3/4] drm/exynos: " Thierry Reding
2016-06-03 16:11 ` [PATCH 4/4] drm/hisilicon: " Thierry Reding
2016-06-03 18:40   ` Daniel Vetter [this message]
2016-06-03 18:33 ` [PATCH 1/4] drm/fb-helper: Support " Daniel Vetter
2016-06-04 10:46 ` Lukas Wunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160603184047.GA7231@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=puck.chen@hisilicon.com \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=z.liuxinliang@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox