Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>, linux-samsung-soc@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, jy0922.shim@samsung.com,
	tjakobi@math.uni-bielefeld.de,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH 09/11] drm/exynos: remove exynos_drm_create_enc_conn()
Date: Tue, 04 Aug 2015 18:41:38 +0900	[thread overview]
Message-ID: <55C088D2.1090008@samsung.com> (raw)
In-Reply-To: <1438628998-3435-10-git-send-email-gustavo@padovan.org>

On 2015년 08월 04일 04:09, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> This functions was just hiding the encoder and connector creation in
> a way that was less clean than if we get rid of it. For example,
> exynos_encoder ops had .create_connector() defined only because we were
> handing off the encoder and connector creation to
> exynos_drm_create_enc_conn(). Without this function we can directly call
> the create_connector function internally in the code, without the need of
> any vtable access.
> 
> It also does some refactoring in the code like creating a bind function
> for dpi devices.
> 
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/gpu/drm/exynos/exynos7_drm_decon.c  |  3 +--
>  drivers/gpu/drm/exynos/exynos_dp_core.c     | 20 ++++++++++++++++---
>  drivers/gpu/drm/exynos/exynos_drm_core.c    | 30 -----------------------------
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c     | 26 +++++++++++++++++++++++--
>  drivers/gpu/drm/exynos/exynos_drm_drv.h     | 12 ++++++------
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c     | 20 ++++++++++++-------
>  drivers/gpu/drm/exynos/exynos_drm_encoder.c | 11 +++++++----
>  drivers/gpu/drm/exynos/exynos_drm_encoder.h |  4 +++-
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c    |  3 +--
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c    | 20 ++++++++++---------
>  drivers/gpu/drm/exynos/exynos_hdmi.c        | 21 +++++++++++++++++---
>  11 files changed, 101 insertions(+), 69 deletions(-)
> 

[-- SNIP --]

> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 11bac50..f72ceeb 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -44,6 +44,7 @@
>  
>  #include "exynos_drm_drv.h"
>  #include "exynos_drm_crtc.h"
> +#include "exynos_drm_encoder.h"
>  #include "exynos_mixer.h"
>  
>  #include <linux/gpio.h>
> @@ -1783,7 +1784,6 @@ static void hdmi_disable(struct exynos_drm_encoder *encoder)
>  }
>  
>  static struct exynos_drm_encoder_ops hdmi_encoder_ops = {
> -	.create_connector = hdmi_create_connector,
>  	.mode_fixup	= hdmi_mode_fixup,
>  	.mode_set	= hdmi_mode_set,
>  	.enable		= hdmi_enable,
> @@ -1917,11 +1917,26 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
>  {
>  	struct drm_device *drm_dev = data;
>  	struct hdmi_context *hdata = dev_get_drvdata(dev);
> +	struct exynos_drm_encoder *exynos_encoder = &hdata->encoder;
> +	int ret;
>  
>  	hdata->drm_dev = drm_dev;
>  
> -	return exynos_drm_create_enc_conn(drm_dev, &hdata->encoder,
> -					  EXYNOS_DISPLAY_TYPE_HDMI);
> +	ret = exynos_drm_encoder_create(drm_dev, exynos_encoder,
> +					EXYNOS_DISPLAY_TYPE_HDMI);
> +	if (ret) {
> +		DRM_ERROR("failed to create encoder\n");
> +		return ret;
> +	}
> +
> +	hdmi_create_connector(exynos_encoder);

ret = hdmi_create_connector(exynos_encoder);

> +	if (ret) {
> +		DRM_ERROR("failed to create connector ret = %d\n", ret);
> +		drm_encoder_cleanup(&exynos_encoder->base);
> +		return ret;
> +	}
> +
> +	return 0;
>  }
>  
>  static void hdmi_unbind(struct device *dev, struct device *master, void *data)
> 

  reply	other threads:[~2015-08-04  9:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 19:09 [PATCH 00/11] drm/exynos: remove exynos_drm_display and exynos_drm_encoder Gustavo Padovan
2015-08-03 19:09 ` [PATCH 01/11] drm/exynos: split display's .dpms() into .enable() and .disable() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 02/11] drm/exynos: remove wrappers for phy_power_{on,off} Gustavo Padovan
2015-08-03 19:09 ` [PATCH 03/11] drm/exynos: remove unused .remove() and .check_mode() ops from display Gustavo Padovan
2015-08-03 19:09 ` [PATCH 04/11] drm/exynos: simplify calculation of possible CRTCs Gustavo Padovan
2015-08-03 19:09 ` [PATCH 05/11] drm/exynos: remove struct exynos_drm_display Gustavo Padovan
2015-08-03 19:09 ` [PATCH 06/11] drm/exynos: remove extra call to hdmi_commit() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 07/11] drm/exynos: remove extra call to exynos_dp_commit() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 08/11] drm/exynos: remove exynos_encoder's .commit() op Gustavo Padovan
2015-08-03 19:09 ` [PATCH 09/11] drm/exynos: remove exynos_drm_create_enc_conn() Gustavo Padovan
2015-08-04  9:41   ` Inki Dae [this message]
2015-08-03 19:09 ` [PATCH 10/11] drm/exynos: fold encoder setup into exynos_drm_load() Gustavo Padovan
2015-08-03 19:09 ` [PATCH 11/11] drm/exynos: remove struct exynos_drm_encoder layer Gustavo Padovan
2015-08-04  9:53   ` Inki Dae
2015-08-04 14:47     ` Gustavo Padovan
2015-08-05  1:31       ` Inki Dae
2015-08-05 13:43         ` Gustavo Padovan

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=55C088D2.1090008@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=jy0922.shim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tjakobi@math.uni-bielefeld.de \
    /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