dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: hamohammed.sa@gmail.com, alexandre.belloni@bootlin.com,
	airlied@linux.ie, linux@armlinux.org.uk, paul@crapouillou.net,
	thierry.reding@gmail.com, krzk@kernel.org,
	sebastian.reichel@collabora.com,
	linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com,
	hjc@rock-chips.com, tomi.valkeinen@ti.com, abrodkin@synopsys.com,
	kong.kongxinwei@hisilicon.com, jonathanh@nvidia.com,
	xinliang.liu@linaro.org, ludovic.desroches@microchip.com,
	kgene@kernel.org, linux-imx@nxp.com,
	linux-rockchip@lists.infradead.org,
	virtualization@lists.linux-foundation.org,
	linux-tegra@vger.kernel.org, puck.chen@hisilicon.com,
	s.hauer@pengutronix.de, alison.wang@nxp.com, jsarha@ti.com,
	matthias.bgg@gmail.com, wens@csie.org, kernel@pengutronix.de,
	jernej.skrabec@siol.net, kraxel@redhat.com,
	rodrigosiqueiramelo@gmail.com, bbrezillon@kernel.org,
	jingoohan1@gmail.com, dri-devel@lists.freedesktop.org,
	sw0312.kim@samsung.com, nicolas.ferre@microchip.com,
	kyungmin.park@samsung.com,
	kieran.bingham+renesas@ideasonboard.com, zourongrong@gmail.com,
	linux-mediatek@lists.infradead.org, shawnguo@kernel.org,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 03/22] drm/exynos: Use simple encoder
Date: Fri, 6 Mar 2020 22:28:09 +0100	[thread overview]
Message-ID: <20200306212809.GC17369@ravnborg.org> (raw)
In-Reply-To: <20200305155950.2705-4-tzimmermann@suse.de>

On Thu, Mar 05, 2020 at 04:59:31PM +0100, Thomas Zimmermann wrote:
> The exynos driver uses empty implementations for its encoders. Replace
> the code with the generic simple encoder.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/exynos/exynos_dp.c       | 8 ++------
>  drivers/gpu/drm/exynos/exynos_drm_dpi.c  | 8 ++------
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c  | 8 ++------
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 ++------
>  drivers/gpu/drm/exynos/exynos_hdmi.c     | 8 ++------
>  5 files changed, 10 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c
> index d23d3502ca91..a61482af2998 100644
> --- a/drivers/gpu/drm/exynos/exynos_dp.c
> +++ b/drivers/gpu/drm/exynos/exynos_dp.c
> @@ -25,6 +25,7 @@
>  #include <drm/drm_panel.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_simple_kms_helper.h>
>  #include <drm/exynos_drm.h>
>  
>  #include "exynos_drm_crtc.h"
> @@ -135,10 +136,6 @@ static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = {
>  	.disable = exynos_dp_nop,
>  };
>  
> -static const struct drm_encoder_funcs exynos_dp_encoder_funcs = {
> -	.destroy = drm_encoder_cleanup,
> -};
> -
>  static int exynos_dp_dt_parse_panel(struct exynos_dp_device *dp)
>  {
>  	int ret;
> @@ -174,8 +171,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
>  			return ret;
>  	}
>  
> -	drm_encoder_init(drm_dev, encoder, &exynos_dp_encoder_funcs,
> -			 DRM_MODE_ENCODER_TMDS, NULL);
> +	drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
>  
>  	drm_encoder_helper_add(encoder, &exynos_dp_encoder_helper_funcs);
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 43fa0f26c052..7ba5354e7d94 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -14,6 +14,7 @@
>  #include <drm/drm_panel.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_simple_kms_helper.h>
>  
>  #include <video/of_videomode.h>
>  #include <video/videomode.h>
> @@ -149,10 +150,6 @@ static const struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = {
>  	.disable = exynos_dpi_disable,
>  };
>  
> -static const struct drm_encoder_funcs exynos_dpi_encoder_funcs = {
> -	.destroy = drm_encoder_cleanup,
> -};
> -
>  enum {
>  	FIMD_PORT_IN0,
>  	FIMD_PORT_IN1,
> @@ -201,8 +198,7 @@ int exynos_dpi_bind(struct drm_device *dev, struct drm_encoder *encoder)
>  {
>  	int ret;
>  
> -	drm_encoder_init(dev, encoder, &exynos_dpi_encoder_funcs,
> -			 DRM_MODE_ENCODER_TMDS, NULL);
> +	drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
>  
>  	drm_encoder_helper_add(encoder, &exynos_dpi_encoder_helper_funcs);
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 669d3857502a..2986c93382e0 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -30,6 +30,7 @@
>  #include <drm/drm_panel.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_simple_kms_helper.h>
>  
>  #include "exynos_drm_crtc.h"
>  #include "exynos_drm_drv.h"
> @@ -1524,10 +1525,6 @@ static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
>  	.disable = exynos_dsi_disable,
>  };
>  
> -static const struct drm_encoder_funcs exynos_dsi_encoder_funcs = {
> -	.destroy = drm_encoder_cleanup,
> -};
> -
>  MODULE_DEVICE_TABLE(of, exynos_dsi_of_match);
>  
>  static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
> @@ -1705,8 +1702,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
>  	struct drm_bridge *in_bridge;
>  	int ret;
>  
> -	drm_encoder_init(drm_dev, encoder, &exynos_dsi_encoder_funcs,
> -			 DRM_MODE_ENCODER_TMDS, NULL);
> +	drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
>  
>  	drm_encoder_helper_add(encoder, &exynos_dsi_encoder_helper_funcs);
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> index b320b3a21ad4..282467121699 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> @@ -14,6 +14,7 @@
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_simple_kms_helper.h>
>  #include <drm/drm_vblank.h>
>  #include <drm/exynos_drm.h>
>  
> @@ -369,10 +370,6 @@ static const struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs =
>  	.disable = exynos_vidi_disable,
>  };
>  
> -static const struct drm_encoder_funcs exynos_vidi_encoder_funcs = {
> -	.destroy = drm_encoder_cleanup,
> -};
> -
>  static int vidi_bind(struct device *dev, struct device *master, void *data)
>  {
>  	struct vidi_context *ctx = dev_get_drvdata(dev);
> @@ -406,8 +403,7 @@ static int vidi_bind(struct device *dev, struct device *master, void *data)
>  		return PTR_ERR(ctx->crtc);
>  	}
>  
> -	drm_encoder_init(drm_dev, encoder, &exynos_vidi_encoder_funcs,
> -			 DRM_MODE_ENCODER_TMDS, NULL);
> +	drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
>  
>  	drm_encoder_helper_add(encoder, &exynos_vidi_encoder_helper_funcs);
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 3e5f1a77286d..302ffda5f297 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -38,6 +38,7 @@
>  #include <drm/drm_edid.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
> +#include <drm/drm_simple_kms_helper.h>
>  
>  #include "exynos_drm_crtc.h"
>  #include "regs-hdmi.h"
> @@ -1559,10 +1560,6 @@ static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs =
>  	.disable	= hdmi_disable,
>  };
>  
> -static const struct drm_encoder_funcs exynos_hdmi_encoder_funcs = {
> -	.destroy = drm_encoder_cleanup,
> -};
> -
>  static void hdmi_audio_shutdown(struct device *dev, void *data)
>  {
>  	struct hdmi_context *hdata = dev_get_drvdata(dev);
> @@ -1851,8 +1848,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
>  
>  	hdata->phy_clk.enable = hdmiphy_clk_enable;
>  
> -	drm_encoder_init(drm_dev, encoder, &exynos_hdmi_encoder_funcs,
> -			 DRM_MODE_ENCODER_TMDS, NULL);
> +	drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
>  
>  	drm_encoder_helper_add(encoder, &exynos_hdmi_encoder_helper_funcs);
>  
> -- 
> 2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-03-06 21:28 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 15:59 [PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init() Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 01/22] drm/arc: Use simple encoder Thomas Zimmermann
2020-03-05 23:48   ` kbuild test robot
2020-03-06 21:18   ` Sam Ravnborg
2020-03-09  7:55     ` Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 02/22] drm/atmel-hlcdc: " Thomas Zimmermann
2020-03-06  0:32   ` kbuild test robot
2020-03-06 21:26   ` Sam Ravnborg
2020-03-05 15:59 ` [PATCH 03/22] drm/exynos: " Thomas Zimmermann
2020-03-06  0:55   ` kbuild test robot
2020-03-06  5:14   ` kbuild test robot
2020-03-06 21:28   ` Sam Ravnborg [this message]
2020-03-05 15:59 ` [PATCH 04/22] drm/fsl-dcu: " Thomas Zimmermann
2020-03-06  0:02   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 05/22] drm/gma500: " Thomas Zimmermann
2020-03-06  0:44   ` kbuild test robot
2020-03-06 21:35   ` Sam Ravnborg
2020-03-09  7:32     ` Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 06/22] drm/hisilicon/kirin: " Thomas Zimmermann
2020-03-06  6:16   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 07/22] drm/i2c/tda998x: " Thomas Zimmermann
2020-03-06  7:30   ` kbuild test robot
2020-03-07 15:40   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 08/22] drm/imx: " Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 09/22] drm/ingenic: " Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 10/22] drm/mediatek: " Thomas Zimmermann
2020-03-07 21:26   ` Matthias Brugger
2020-03-10  2:37   ` CK Hu
2020-03-05 15:59 ` [PATCH 11/22] drm/rcar-du: " Thomas Zimmermann
2020-03-06  8:43   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 12/22] drm/rockchip: " Thomas Zimmermann
2020-03-05 23:59   ` kbuild test robot
2020-03-06 10:05   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 13/22] drm/shmobile: " Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 14/22] drm/sun4i: " Thomas Zimmermann
2020-03-06 11:12   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 15/22] drm/tegra: " Thomas Zimmermann
2020-03-06 12:38   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 16/22] drm/tidss: " Thomas Zimmermann
2020-03-06 16:02   ` Jyri Sarha
2020-03-05 15:59 ` [PATCH 17/22] drm/tilcdc: " Thomas Zimmermann
2020-03-06 16:03   ` Jyri Sarha
2020-03-05 15:59 ` [PATCH 18/22] drm/vc4: " Thomas Zimmermann
2020-03-05 17:03   ` Eric Anholt
2020-03-06 13:54   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 19/22] drm/virtgpu: " Thomas Zimmermann
2020-03-07 15:40   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 20/22] drm/vkms: " Thomas Zimmermann
2020-03-06  0:24   ` kbuild test robot
2020-03-07 13:59   ` kbuild test robot
2020-03-24 11:59   ` Rodrigo Siqueira
2020-03-31  9:20     ` Thomas Zimmermann
2020-04-01  7:17     ` Thomas Zimmermann
2020-03-05 15:59 ` [PATCH 21/22] drm/writeback: " Thomas Zimmermann
2020-03-06  0:54   ` kbuild test robot
2020-03-06  1:17   ` kbuild test robot
2020-03-06 14:54   ` kbuild test robot
2020-03-05 15:59 ` [PATCH 22/22] drm/zte: " Thomas Zimmermann
2020-03-06 10:56 ` [PATCH 00/22] drm: Convert drivers to drm_simple_encoder_init() Daniel Vetter
2020-03-06 15:10   ` Thomas Zimmermann
2020-03-06 14:22 ` Laurent Pinchart
2020-03-06 15:18   ` Thomas Zimmermann
2020-03-07 20:08     ` Sam Ravnborg
2020-03-07 20:34       ` Laurent Pinchart
2020-03-07 20:51         ` Sam Ravnborg
2020-03-09  7:24       ` Thomas Zimmermann

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=20200306212809.GC17369@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=abrodkin@synopsys.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alison.wang@nxp.com \
    --cc=bbrezillon@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=hjc@rock-chips.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jingoohan1@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=jsarha@ti.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=kgene@kernel.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ludovic.desroches@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=paul@crapouillou.net \
    --cc=puck.chen@hisilicon.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastian.reichel@collabora.com \
    --cc=shawnguo@kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wens@csie.org \
    --cc=xinliang.liu@linaro.org \
    --cc=zourongrong@gmail.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;
as well as URLs for NNTP newsgroup(s).