mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i2c: tda998x: drop support for platform_data
Date: Sun, 15 Dec 2024 14:35:05 +0200	[thread overview]
Message-ID: <20241215123505.GA25852@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20241215-drm-move-tda998x-v1-1-7817122b1d73@linaro.org>

Hi Dmitry,

Thank you for the patch.

On Sun, Dec 15, 2024 at 01:09:07PM +0200, Dmitry Baryshkov wrote:
> After the commit 0fb2970b4b6b ("drm/armada: remove non-component
> support") there are no remaining users of the struct
> tda998x_encoder_params. Drop the header and corresponding API from the
> TDA998x driver.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  MAINTAINERS                       |  1 -
>  drivers/gpu/drm/i2c/tda998x_drv.c | 49 ++++-----------------------------------
>  include/drm/i2c/tda998x.h         | 40 --------------------------------
>  3 files changed, 4 insertions(+), 86 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 81348dbce8ca7c877bd9c2d88cb093368eca5a0a..9a23e80abf309cbd918a74683895f8dbe0507a6e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -16983,7 +16983,6 @@ S:	Maintained
>  T:	git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
>  T:	git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
>  F:	drivers/gpu/drm/i2c/tda998x_drv.c
> -F:	include/drm/i2c/tda998x.h
>  F:	include/dt-bindings/display/tda998x.h
>  K:	"nxp,tda998x"
>  
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
> index 2160f05bbd16d2346e27365e5549b75ad26fdcb9..67480dcbbfde4da68ffaeaf20935af467d4da92a 100644
> --- a/drivers/gpu/drm/i2c/tda998x_drv.c
> +++ b/drivers/gpu/drm/i2c/tda998x_drv.c
> @@ -21,10 +21,11 @@
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
>  #include <drm/drm_simple_kms_helper.h>
> -#include <drm/i2c/tda998x.h>
>  
>  #include <media/cec-notifier.h>
>  
> +#include <dt-bindings/display/tda998x.h>
> +
>  #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__)
>  
>  enum {
> @@ -1717,10 +1718,10 @@ static int tda998x_get_audio_ports(struct tda998x_priv *priv,
>  		u8 ena_ap = be32_to_cpup(&port_data[2*i+1]);
>  
>  		switch (afmt) {
> -		case AFMT_I2S:
> +		case TDA998x_I2S:
>  			route = AUDIO_ROUTE_I2S;
>  			break;
> -		case AFMT_SPDIF:
> +		case TDA998x_SPDIF:
>  			route = AUDIO_ROUTE_SPDIF;
>  			break;
>  		default:
> @@ -1746,44 +1747,6 @@ static int tda998x_get_audio_ports(struct tda998x_priv *priv,
>  	return 0;
>  }
>  
> -static int tda998x_set_config(struct tda998x_priv *priv,
> -			      const struct tda998x_encoder_params *p)
> -{
> -	priv->vip_cntrl_0 = VIP_CNTRL_0_SWAP_A(p->swap_a) |
> -			    (p->mirr_a ? VIP_CNTRL_0_MIRR_A : 0) |
> -			    VIP_CNTRL_0_SWAP_B(p->swap_b) |
> -			    (p->mirr_b ? VIP_CNTRL_0_MIRR_B : 0);
> -	priv->vip_cntrl_1 = VIP_CNTRL_1_SWAP_C(p->swap_c) |
> -			    (p->mirr_c ? VIP_CNTRL_1_MIRR_C : 0) |
> -			    VIP_CNTRL_1_SWAP_D(p->swap_d) |
> -			    (p->mirr_d ? VIP_CNTRL_1_MIRR_D : 0);
> -	priv->vip_cntrl_2 = VIP_CNTRL_2_SWAP_E(p->swap_e) |
> -			    (p->mirr_e ? VIP_CNTRL_2_MIRR_E : 0) |
> -			    VIP_CNTRL_2_SWAP_F(p->swap_f) |
> -			    (p->mirr_f ? VIP_CNTRL_2_MIRR_F : 0);
> -
> -	if (p->audio_params.format != AFMT_UNUSED) {
> -		unsigned int ratio, route;
> -		bool spdif = p->audio_params.format == AFMT_SPDIF;
> -
> -		route = AUDIO_ROUTE_I2S + spdif;
> -
> -		priv->audio.route = &tda998x_audio_route[route];
> -		priv->audio.cea = p->audio_params.cea;
> -		priv->audio.sample_rate = p->audio_params.sample_rate;
> -		memcpy(priv->audio.status, p->audio_params.status,
> -		       min(sizeof(priv->audio.status),
> -			   sizeof(p->audio_params.status)));
> -		priv->audio.ena_ap = p->audio_params.config;
> -		priv->audio.i2s_format = I2S_FORMAT_PHILIPS;
> -
> -		ratio = spdif ? 64 : p->audio_params.sample_width * 2;
> -		return tda998x_derive_cts_n(priv, &priv->audio, ratio);
> -	}
> -
> -	return 0;
> -}
> -
>  static void tda998x_destroy(struct device *dev)
>  {
>  	struct tda998x_priv *priv = dev_get_drvdata(dev);
> @@ -1982,10 +1945,6 @@ static int tda998x_create(struct device *dev)
>  		if (priv->audio_port_enable[AUDIO_ROUTE_I2S] ||
>  		    priv->audio_port_enable[AUDIO_ROUTE_SPDIF])
>  			tda998x_audio_codec_init(priv, &client->dev);
> -	} else if (dev->platform_data) {
> -		ret = tda998x_set_config(priv, dev->platform_data);
> -		if (ret)
> -			goto fail;
>  	}
>  
>  	priv->bridge.funcs = &tda998x_bridge_funcs;
> diff --git a/include/drm/i2c/tda998x.h b/include/drm/i2c/tda998x.h
> deleted file mode 100644
> index 3cb25ccbe5e68bf95ce13249f15549b7e2582281..0000000000000000000000000000000000000000
> --- a/include/drm/i2c/tda998x.h
> +++ /dev/null
> @@ -1,40 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#ifndef __DRM_I2C_TDA998X_H__
> -#define __DRM_I2C_TDA998X_H__
> -
> -#include <linux/hdmi.h>
> -#include <dt-bindings/display/tda998x.h>
> -
> -enum {
> -	AFMT_UNUSED =	0,
> -	AFMT_SPDIF =	TDA998x_SPDIF,
> -	AFMT_I2S =	TDA998x_I2S,
> -};
> -
> -struct tda998x_audio_params {
> -	u8 config;
> -	u8 format;
> -	unsigned sample_width;
> -	unsigned sample_rate;
> -	struct hdmi_audio_infoframe cea;
> -	u8 status[5];
> -};
> -
> -struct tda998x_encoder_params {
> -	u8 swap_b:3;
> -	u8 mirr_b:1;
> -	u8 swap_a:3;
> -	u8 mirr_a:1;
> -	u8 swap_d:3;
> -	u8 mirr_d:1;
> -	u8 swap_c:3;
> -	u8 mirr_c:1;
> -	u8 swap_f:3;
> -	u8 mirr_f:1;
> -	u8 swap_e:3;
> -	u8 mirr_e:1;
> -
> -	struct tda998x_audio_params audio_params;
> -};
> -
> -#endif

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-12-15 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 11:09 [PATCH 0/2] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
2024-12-15 11:09 ` [PATCH 1/2] drm/i2c: tda998x: drop support for platform_data Dmitry Baryshkov
2024-12-15 12:35   ` Laurent Pinchart [this message]
2024-12-15 11:09 ` [PATCH 2/2] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge Dmitry Baryshkov
2024-12-15 12:38   ` Laurent Pinchart
2024-12-15 13:12     ` Dmitry Baryshkov
2025-01-05 22:52     ` Dmitry Baryshkov
2025-01-05 23:20       ` Laurent Pinchart
2025-01-06  8:42         ` Hans Verkuil
2024-12-18 10:22   ` Neil Armstrong
2025-01-05 22:48     ` Dmitry Baryshkov
2024-12-19 19:57   ` Liviu Dudau

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=20241215123505.GA25852@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.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

all inboxes | Powered by JetHome®