mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge
@ 2025-01-10 12:31 Dmitry Baryshkov
  2025-01-10 12:31 ` [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data Dmitry Baryshkov
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-01-10 12:31 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Liviu Dudau, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Russell King, Hans Verkuil,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media, Laurent Pinchart

TDA998x is the HDMI bridge driver, incorporating drm_connector and
optional drm_encoder (created via the component bind API by the TICLDC
and HDLCD drivers). TDA9950 is an I2C-CEC translator, being present
on-die on the TDA9989 and TDA19989 chips.

Move TDA9950 driver to drivers/media/cec/i2c and TDA998x driver to
drivers/gpu/drm/bridge/.

Note to Hans and Mauro: I'd ask for all patches to be merged through
drm-misc tree rather than splitting them between drm-misc and media
trees. The patchset depends on the patches that are a part of
drm-misc-next, but are not going to hit 6.14. Please specify if you are
fine with that proposal and  if you'd need an immutable branch for
linux-media.

Note to RMK: I didn't change that, but I'd like to propose to use
drm-misc tree for this bridge.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v2:
- Moved TDA9950 driver to drivers/media/cec/i2c (Hans, Laurent)
- Moved TDA998x driver to drivers/gpu/drm/bridges istead of tda/ subdir
  (Laurent)
- Link to v1: https://lore.kernel.org/r/20241215-drm-move-tda998x-v1-0-7817122b1d73@linaro.org

---
Dmitry Baryshkov (3):
      drm/i2c: tda998x: drop support for platform_data
      media: cec: move driver for TDA9950 from drm/i2c
      drm/i2c: move TDA drivers under drivers/gpu/drm/bridge

 MAINTAINERS                                   |  3 +-
 drivers/gpu/drm/arm/Kconfig                   |  1 +
 drivers/gpu/drm/bridge/Kconfig                |  8 +++++
 drivers/gpu/drm/bridge/Makefile               |  4 +++
 drivers/gpu/drm/{i2c => bridge}/tda998x_drv.c | 49 +++------------------------
 drivers/gpu/drm/i2c/Kconfig                   | 18 ----------
 drivers/gpu/drm/i2c/Makefile                  |  4 ---
 drivers/media/cec/i2c/Kconfig                 |  9 +++++
 drivers/media/cec/i2c/Makefile                |  1 +
 drivers/{gpu/drm => media/cec}/i2c/tda9950.c  |  0
 include/drm/i2c/tda998x.h                     | 40 ----------------------
 11 files changed, 28 insertions(+), 109 deletions(-)
---
base-commit: e91570cf7c1b3e406878e7b1efbe823d039d1659
change-id: 20241214-drm-move-tda998x-8fb4321434d2

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data
  2025-01-10 12:31 [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
@ 2025-01-10 12:31 ` Dmitry Baryshkov
  2025-01-10 12:31 ` [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c Dmitry Baryshkov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-01-10 12:31 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Liviu Dudau, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Russell King, Hans Verkuil,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media, Laurent Pinchart

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.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 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 a3566163f1cbd583b8fdb7f2f18d5289263adc31..223eb6bfd0579768c246dcc51831048627fb8d02 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17046,7 +17046,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 82d4a4e206a584e045a8fcd593fc12b7c1257bfe..ebc758c72891188e236d4da0cde283f108d80aca 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

-- 
2.39.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c
  2025-01-10 12:31 [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
  2025-01-10 12:31 ` [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data Dmitry Baryshkov
@ 2025-01-10 12:31 ` Dmitry Baryshkov
  2025-01-10 12:42   ` Hans Verkuil
  2025-01-10 12:31 ` [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge Dmitry Baryshkov
  2025-01-10 12:45 ` [PATCH v2 0/3] drm/i2c: tda998x: move " Hans Verkuil
  3 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-01-10 12:31 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Liviu Dudau, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Russell King, Hans Verkuil,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media

Move the driver for NXP TDA9950 / CEC part of TDA998x together to
drivers/media/i2c, close to other CEC drivers. Specify 'default
DRM_I2C_NXP_TDA998X' in order to simplify migration from old config
files as the Kconfig name has been changed to follow media/cec style.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/i2c/Kconfig                  | 5 -----
 drivers/gpu/drm/i2c/Makefile                 | 1 -
 drivers/media/cec/i2c/Kconfig                | 9 +++++++++
 drivers/media/cec/i2c/Makefile               | 1 +
 drivers/{gpu/drm => media/cec}/i2c/tda9950.c | 0
 5 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
index d5200f67958e68a8ec73401f1d3b79cbe0aa303d..1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1 100644
--- a/drivers/gpu/drm/i2c/Kconfig
+++ b/drivers/gpu/drm/i2c/Kconfig
@@ -10,9 +10,4 @@ config DRM_I2C_NXP_TDA998X
 	help
 	  Support for NXP Semiconductors TDA998X HDMI encoders.
 
-config DRM_I2C_NXP_TDA9950
-	tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC"
-	select CEC_NOTIFIER
-	select CEC_CORE
-
 endmenu
diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
index 31fd35527d99d7eb23851d290175a3ff0c756772..45791fbfae983eecf58565109cf8eecb6431643b 100644
--- a/drivers/gpu/drm/i2c/Makefile
+++ b/drivers/gpu/drm/i2c/Makefile
@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
 tda998x-y := tda998x_drv.o
 obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
-obj-$(CONFIG_DRM_I2C_NXP_TDA9950) += tda9950.o
diff --git a/drivers/media/cec/i2c/Kconfig b/drivers/media/cec/i2c/Kconfig
index d912d143fb3129c6b3d0133dbfceffdd48bd543d..b9d21643eef1892ccff508b1864db30e83570212 100644
--- a/drivers/media/cec/i2c/Kconfig
+++ b/drivers/media/cec/i2c/Kconfig
@@ -13,3 +13,12 @@ config CEC_CH7322
 	  generic CEC framework interface.
 	  CEC bus is present in the HDMI connector and enables communication
 	  between compatible devices.
+
+config CEC_NXP_TDA9950
+	tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC"
+	select CEC_NOTIFIER
+	select CEC_CORE
+	default DRM_I2C_NXP_TDA998X
+	help
+	  This is a driver for the NXP TDA9950 CEC controller and for the CEC
+	  controller block integrated into several NXP TDA998x HDMI encoders.
diff --git a/drivers/media/cec/i2c/Makefile b/drivers/media/cec/i2c/Makefile
index d7496dfd0fa49631299ff56c20e946757e50cdb2..95c9eda5258361c4d9196acb527e0c1b4351dbe0 100644
--- a/drivers/media/cec/i2c/Makefile
+++ b/drivers/media/cec/i2c/Makefile
@@ -3,3 +3,4 @@
 # Makefile for the CEC I2C device drivers.
 #
 obj-$(CONFIG_CEC_CH7322) += ch7322.o
+obj-$(CONFIG_CEC_NXP_TDA9950) += tda9950.o
diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/media/cec/i2c/tda9950.c
similarity index 100%
rename from drivers/gpu/drm/i2c/tda9950.c
rename to drivers/media/cec/i2c/tda9950.c

-- 
2.39.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge
  2025-01-10 12:31 [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
  2025-01-10 12:31 ` [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data Dmitry Baryshkov
  2025-01-10 12:31 ` [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c Dmitry Baryshkov
@ 2025-01-10 12:31 ` Dmitry Baryshkov
  2025-01-10 12:44   ` Hans Verkuil
  2025-01-10 12:45 ` [PATCH v2 0/3] drm/i2c: tda998x: move " Hans Verkuil
  3 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-01-10 12:31 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Liviu Dudau, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Russell King, Hans Verkuil,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media, Laurent Pinchart

TDA998x is the HDMI bridge driver, incorporating drm_connector and
optional drm_encoder (created via the component bind API by the TICLDC
and HDLCD drivers). Thus it should be residing together with the other
DRM bridge drivers under drivers/gpu/drm/bridge/.

TDA9950 is an I2C-CEC translator, being present on-die on the TDA9989
and TDA19989 chips, so it is being instantiated by the TDA998x driver.
Move it together with the TDA998x under bridge drivers subdir.

Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 MAINTAINERS                                   |  2 +-
 drivers/gpu/drm/arm/Kconfig                   |  1 +
 drivers/gpu/drm/bridge/Kconfig                |  8 ++++++++
 drivers/gpu/drm/bridge/Makefile               |  4 ++++
 drivers/gpu/drm/{i2c => bridge}/tda998x_drv.c |  0
 drivers/gpu/drm/i2c/Kconfig                   | 13 -------------
 drivers/gpu/drm/i2c/Makefile                  |  3 ---
 7 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 223eb6bfd0579768c246dcc51831048627fb8d02..7a15fb49c2905dcba7bc08f03abe12bd7f493f84 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17045,7 +17045,7 @@ M:	Russell King <linux@armlinux.org.uk>
 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:	drivers/gpu/drm/bridge/tda998x_drv.c
 F:	include/dt-bindings/display/tda998x.h
 K:	"nxp,tda998x"
 
diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
index c901ac00c0c3a8f356bd53d97305c6b39b3e6662..ed3ed617c6884876368c8bd072c53f1b710df443 100644
--- a/drivers/gpu/drm/arm/Kconfig
+++ b/drivers/gpu/drm/arm/Kconfig
@@ -9,6 +9,7 @@ config DRM_HDLCD
 	select DRM_CLIENT_SELECTION
 	select DRM_KMS_HELPER
 	select DRM_GEM_DMA_HELPER
+	select DRM_BRIDGE # for TDA998x
 	help
 	  Choose this option if you have an ARM High Definition Colour LCD
 	  controller.
diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 6b4664d91faa80f096ac6a0548ed342e802ae68b..d20f1646dac27898ecb7599a9a06663357dcca14 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -90,6 +90,14 @@ config DRM_FSL_LDB
 	help
 	  Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
 
+config DRM_I2C_NXP_TDA998X
+       tristate "NXP Semiconductors TDA998X HDMI encoder"
+       default m if DRM_TILCDC
+       select CEC_CORE if CEC_NOTIFIER
+       select SND_SOC_HDMI_CODEC if SND_SOC
+       help
+         Support for NXP Semiconductors TDA998X HDMI encoders.
+
 config DRM_ITE_IT6263
 	tristate "ITE IT6263 LVDS/HDMI bridge"
 	depends on OF
diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
index 97304b429a530c108dcbff906965cda091b0a7a2..245e8a27e3fc525ffe02103e4436c71313f55d9a 100644
--- a/drivers/gpu/drm/bridge/Makefile
+++ b/drivers/gpu/drm/bridge/Makefile
@@ -6,6 +6,10 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o
 obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o
 obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o
 obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o
+
+tda998x-y := tda998x_drv.o
+obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
+
 obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o
 obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o
 obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
similarity index 100%
rename from drivers/gpu/drm/i2c/tda998x_drv.c
rename to drivers/gpu/drm/bridge/tda998x_drv.c
diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
deleted file mode 100644
index 1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1..0000000000000000000000000000000000000000
--- a/drivers/gpu/drm/i2c/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-menu "I2C encoder or helper chips"
-     depends on DRM && DRM_KMS_HELPER && I2C
-
-config DRM_I2C_NXP_TDA998X
-	tristate "NXP Semiconductors TDA998X HDMI encoder"
-	default m if DRM_TILCDC
-	select CEC_CORE if CEC_NOTIFIER
-	select SND_SOC_HDMI_CODEC if SND_SOC
-	help
-	  Support for NXP Semiconductors TDA998X HDMI encoders.
-
-endmenu
diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
deleted file mode 100644
index 45791fbfae983eecf58565109cf8eecb6431643b..0000000000000000000000000000000000000000
--- a/drivers/gpu/drm/i2c/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-tda998x-y := tda998x_drv.o
-obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o

-- 
2.39.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c
  2025-01-10 12:31 ` [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c Dmitry Baryshkov
@ 2025-01-10 12:42   ` Hans Verkuil
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2025-01-10 12:42 UTC (permalink / raw)
  To: Dmitry Baryshkov, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Liviu Dudau,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Russell King,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media

On 10/01/2025 13:31, Dmitry Baryshkov wrote:
> Move the driver for NXP TDA9950 / CEC part of TDA998x together to
> drivers/media/i2c, close to other CEC drivers. Specify 'default
> DRM_I2C_NXP_TDA998X' in order to simplify migration from old config
> files as the Kconfig name has been changed to follow media/cec style.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Acked-by: Hans Verkuil <hverkuil@xs4all.nl>

Regards,

	Hans

> ---
>  drivers/gpu/drm/i2c/Kconfig                  | 5 -----
>  drivers/gpu/drm/i2c/Makefile                 | 1 -
>  drivers/media/cec/i2c/Kconfig                | 9 +++++++++
>  drivers/media/cec/i2c/Makefile               | 1 +
>  drivers/{gpu/drm => media/cec}/i2c/tda9950.c | 0
>  5 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
> index d5200f67958e68a8ec73401f1d3b79cbe0aa303d..1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1 100644
> --- a/drivers/gpu/drm/i2c/Kconfig
> +++ b/drivers/gpu/drm/i2c/Kconfig
> @@ -10,9 +10,4 @@ config DRM_I2C_NXP_TDA998X
>  	help
>  	  Support for NXP Semiconductors TDA998X HDMI encoders.
>  
> -config DRM_I2C_NXP_TDA9950
> -	tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC"
> -	select CEC_NOTIFIER
> -	select CEC_CORE
> -
>  endmenu
> diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
> index 31fd35527d99d7eb23851d290175a3ff0c756772..45791fbfae983eecf58565109cf8eecb6431643b 100644
> --- a/drivers/gpu/drm/i2c/Makefile
> +++ b/drivers/gpu/drm/i2c/Makefile
> @@ -1,4 +1,3 @@
>  # SPDX-License-Identifier: GPL-2.0
>  tda998x-y := tda998x_drv.o
>  obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
> -obj-$(CONFIG_DRM_I2C_NXP_TDA9950) += tda9950.o
> diff --git a/drivers/media/cec/i2c/Kconfig b/drivers/media/cec/i2c/Kconfig
> index d912d143fb3129c6b3d0133dbfceffdd48bd543d..b9d21643eef1892ccff508b1864db30e83570212 100644
> --- a/drivers/media/cec/i2c/Kconfig
> +++ b/drivers/media/cec/i2c/Kconfig
> @@ -13,3 +13,12 @@ config CEC_CH7322
>  	  generic CEC framework interface.
>  	  CEC bus is present in the HDMI connector and enables communication
>  	  between compatible devices.
> +
> +config CEC_NXP_TDA9950
> +	tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC"
> +	select CEC_NOTIFIER
> +	select CEC_CORE
> +	default DRM_I2C_NXP_TDA998X
> +	help
> +	  This is a driver for the NXP TDA9950 CEC controller and for the CEC
> +	  controller block integrated into several NXP TDA998x HDMI encoders.
> diff --git a/drivers/media/cec/i2c/Makefile b/drivers/media/cec/i2c/Makefile
> index d7496dfd0fa49631299ff56c20e946757e50cdb2..95c9eda5258361c4d9196acb527e0c1b4351dbe0 100644
> --- a/drivers/media/cec/i2c/Makefile
> +++ b/drivers/media/cec/i2c/Makefile
> @@ -3,3 +3,4 @@
>  # Makefile for the CEC I2C device drivers.
>  #
>  obj-$(CONFIG_CEC_CH7322) += ch7322.o
> +obj-$(CONFIG_CEC_NXP_TDA9950) += tda9950.o
> diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/media/cec/i2c/tda9950.c
> similarity index 100%
> rename from drivers/gpu/drm/i2c/tda9950.c
> rename to drivers/media/cec/i2c/tda9950.c
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge
  2025-01-10 12:31 ` [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge Dmitry Baryshkov
@ 2025-01-10 12:44   ` Hans Verkuil
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2025-01-10 12:44 UTC (permalink / raw)
  To: Dmitry Baryshkov, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Liviu Dudau,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Russell King,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media

On 10/01/2025 13:31, Dmitry Baryshkov wrote:
> TDA998x is the HDMI bridge driver, incorporating drm_connector and
> optional drm_encoder (created via the component bind API by the TICLDC
> and HDLCD drivers). Thus it should be residing together with the other
> DRM bridge drivers under drivers/gpu/drm/bridge/.
> 
> TDA9950 is an I2C-CEC translator, being present on-die on the TDA9989
> and TDA19989 chips, so it is being instantiated by the TDA998x driver.
> Move it together with the TDA998x under bridge drivers subdir.

This last paragraph is no longer correct since the tda9950 is now moved
to media cec.

Regards,

	Hans

> 
> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  MAINTAINERS                                   |  2 +-
>  drivers/gpu/drm/arm/Kconfig                   |  1 +
>  drivers/gpu/drm/bridge/Kconfig                |  8 ++++++++
>  drivers/gpu/drm/bridge/Makefile               |  4 ++++
>  drivers/gpu/drm/{i2c => bridge}/tda998x_drv.c |  0
>  drivers/gpu/drm/i2c/Kconfig                   | 13 -------------
>  drivers/gpu/drm/i2c/Makefile                  |  3 ---
>  7 files changed, 14 insertions(+), 17 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 223eb6bfd0579768c246dcc51831048627fb8d02..7a15fb49c2905dcba7bc08f03abe12bd7f493f84 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -17045,7 +17045,7 @@ M:	Russell King <linux@armlinux.org.uk>
>  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:	drivers/gpu/drm/bridge/tda998x_drv.c
>  F:	include/dt-bindings/display/tda998x.h
>  K:	"nxp,tda998x"
>  
> diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig
> index c901ac00c0c3a8f356bd53d97305c6b39b3e6662..ed3ed617c6884876368c8bd072c53f1b710df443 100644
> --- a/drivers/gpu/drm/arm/Kconfig
> +++ b/drivers/gpu/drm/arm/Kconfig
> @@ -9,6 +9,7 @@ config DRM_HDLCD
>  	select DRM_CLIENT_SELECTION
>  	select DRM_KMS_HELPER
>  	select DRM_GEM_DMA_HELPER
> +	select DRM_BRIDGE # for TDA998x
>  	help
>  	  Choose this option if you have an ARM High Definition Colour LCD
>  	  controller.
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> index 6b4664d91faa80f096ac6a0548ed342e802ae68b..d20f1646dac27898ecb7599a9a06663357dcca14 100644
> --- a/drivers/gpu/drm/bridge/Kconfig
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -90,6 +90,14 @@ config DRM_FSL_LDB
>  	help
>  	  Support for i.MX8MP DPI-to-LVDS on-SoC encoder.
>  
> +config DRM_I2C_NXP_TDA998X
> +       tristate "NXP Semiconductors TDA998X HDMI encoder"
> +       default m if DRM_TILCDC
> +       select CEC_CORE if CEC_NOTIFIER
> +       select SND_SOC_HDMI_CODEC if SND_SOC
> +       help
> +         Support for NXP Semiconductors TDA998X HDMI encoders.
> +
>  config DRM_ITE_IT6263
>  	tristate "ITE IT6263 LVDS/HDMI bridge"
>  	depends on OF
> diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
> index 97304b429a530c108dcbff906965cda091b0a7a2..245e8a27e3fc525ffe02103e4436c71313f55d9a 100644
> --- a/drivers/gpu/drm/bridge/Makefile
> +++ b/drivers/gpu/drm/bridge/Makefile
> @@ -6,6 +6,10 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o
>  obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o
>  obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o
>  obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o
> +
> +tda998x-y := tda998x_drv.o
> +obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
> +
>  obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o
>  obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o
>  obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
> similarity index 100%
> rename from drivers/gpu/drm/i2c/tda998x_drv.c
> rename to drivers/gpu/drm/bridge/tda998x_drv.c
> diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig
> deleted file mode 100644
> index 1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1..0000000000000000000000000000000000000000
> --- a/drivers/gpu/drm/i2c/Kconfig
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0-only
> -menu "I2C encoder or helper chips"
> -     depends on DRM && DRM_KMS_HELPER && I2C
> -
> -config DRM_I2C_NXP_TDA998X
> -	tristate "NXP Semiconductors TDA998X HDMI encoder"
> -	default m if DRM_TILCDC
> -	select CEC_CORE if CEC_NOTIFIER
> -	select SND_SOC_HDMI_CODEC if SND_SOC
> -	help
> -	  Support for NXP Semiconductors TDA998X HDMI encoders.
> -
> -endmenu
> diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile
> deleted file mode 100644
> index 45791fbfae983eecf58565109cf8eecb6431643b..0000000000000000000000000000000000000000
> --- a/drivers/gpu/drm/i2c/Makefile
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0
> -tda998x-y := tda998x_drv.o
> -obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge
  2025-01-10 12:31 [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  2025-01-10 12:31 ` [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge Dmitry Baryshkov
@ 2025-01-10 12:45 ` Hans Verkuil
  3 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2025-01-10 12:45 UTC (permalink / raw)
  To: Dmitry Baryshkov, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Liviu Dudau,
	Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Russell King,
	Mauro Carvalho Chehab
  Cc: linux-kernel, dri-devel, linux-media

On 10/01/2025 13:31, Dmitry Baryshkov wrote:
> TDA998x is the HDMI bridge driver, incorporating drm_connector and
> optional drm_encoder (created via the component bind API by the TICLDC
> and HDLCD drivers). TDA9950 is an I2C-CEC translator, being present
> on-die on the TDA9989 and TDA19989 chips.
> 
> Move TDA9950 driver to drivers/media/cec/i2c and TDA998x driver to
> drivers/gpu/drm/bridge/.
> 
> Note to Hans and Mauro: I'd ask for all patches to be merged through
> drm-misc tree rather than splitting them between drm-misc and media
> trees. The patchset depends on the patches that are a part of
> drm-misc-next, but are not going to hit 6.14. Please specify if you are
> fine with that proposal and  if you'd need an immutable branch for
> linux-media.

I'm fine that this goes through drm-misc. I don't see a need for an
immutable branch.

Regards,

	Hans

> 
> Note to RMK: I didn't change that, but I'd like to propose to use
> drm-misc tree for this bridge.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Changes in v2:
> - Moved TDA9950 driver to drivers/media/cec/i2c (Hans, Laurent)
> - Moved TDA998x driver to drivers/gpu/drm/bridges istead of tda/ subdir
>   (Laurent)
> - Link to v1: https://lore.kernel.org/r/20241215-drm-move-tda998x-v1-0-7817122b1d73@linaro.org
> 
> ---
> Dmitry Baryshkov (3):
>       drm/i2c: tda998x: drop support for platform_data
>       media: cec: move driver for TDA9950 from drm/i2c
>       drm/i2c: move TDA drivers under drivers/gpu/drm/bridge
> 
>  MAINTAINERS                                   |  3 +-
>  drivers/gpu/drm/arm/Kconfig                   |  1 +
>  drivers/gpu/drm/bridge/Kconfig                |  8 +++++
>  drivers/gpu/drm/bridge/Makefile               |  4 +++
>  drivers/gpu/drm/{i2c => bridge}/tda998x_drv.c | 49 +++------------------------
>  drivers/gpu/drm/i2c/Kconfig                   | 18 ----------
>  drivers/gpu/drm/i2c/Makefile                  |  4 ---
>  drivers/media/cec/i2c/Kconfig                 |  9 +++++
>  drivers/media/cec/i2c/Makefile                |  1 +
>  drivers/{gpu/drm => media/cec}/i2c/tda9950.c  |  0
>  include/drm/i2c/tda998x.h                     | 40 ----------------------
>  11 files changed, 28 insertions(+), 109 deletions(-)
> ---
> base-commit: e91570cf7c1b3e406878e7b1efbe823d039d1659
> change-id: 20241214-drm-move-tda998x-8fb4321434d2
> 
> Best regards,


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-10 12:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10 12:31 [PATCH v2 0/3] drm/i2c: tda998x: move under drivers/gpu/drm/bridge Dmitry Baryshkov
2025-01-10 12:31 ` [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data Dmitry Baryshkov
2025-01-10 12:31 ` [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c Dmitry Baryshkov
2025-01-10 12:42   ` Hans Verkuil
2025-01-10 12:31 ` [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge Dmitry Baryshkov
2025-01-10 12:44   ` Hans Verkuil
2025-01-10 12:45 ` [PATCH v2 0/3] drm/i2c: tda998x: move " Hans Verkuil

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®