From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Sep 2024 12:44:05 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1su8SC-003N7Q-1P for lore@lore.pengutronix.de; Fri, 27 Sep 2024 12:44:05 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1su8Rm-0006Cd-Ht for lore@pengutronix.de; Fri, 27 Sep 2024 12:44:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0O7B7eaJJX9WJsMH7vIwqlJsdEwxKGgFWRcIWXcJfjA=; b=PMlVWUyVFRIxhK4/pI0StGAkCS xrq/tK6kb+wUfJy+OPvCGYGFoa6SReZd/IKnEm6JN4O1N02k+4/q52vQWqXrlTI4QXjmCP7PT+0xX +UnLQih8qya4p9wIbAENIen7bGPUansEXJ9StBzRLOXfgaZfGAKc8zMlRXY40tin4yd9zIB51lwMI WY8YQOLpjlxAe8Z0EiG0ZnknZdmsS65DbeTJ85In8Fs67cRHFNu8eeSjxguxFcZrjVNbsyULVdtDW lVmW+5L6u/69YhHRx/o7A81iU8aexqXY5FP8LI4AbopVCfg63QEthoZCim0LACEkU5oOYs8Tn/W+4 NqieWDdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1su8QF-0000000Aqkf-0OxK; Fri, 27 Sep 2024 10:42:03 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1su8M9-0000000Aq0l-3DUd for barebox@bombadil.infradead.org; Fri, 27 Sep 2024 10:37:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=0O7B7eaJJX9WJsMH7vIwqlJsdEwxKGgFWRcIWXcJfjA=; b=GKcMKWEHjezmz6laUr64jDNK06 PZx8RH60UMawzA0gr7TdAKaHRCZ7uI+y7ZW4ByvWsiz+1YP2TMYXS9o2UHqXeZW3PKgR9fzeRBZMx 41rGTSswqpk/3ve4ALCyIsQhMo91giOpCOAI+WlNEPdxb6UCu9FoJjlN7TElc9WrcOORV6HerNqX7 nrnKYIRc+WKSJs90B7bmo0iiItjOfWAjs+0Qh4nBEYS52WZYSW72iB45+JUyKptt579yU5/Hw6aem 6Ovt76r/p0ro8e4bgGbb8p/g/gv9ylp1007gzGhLnvAvScaN17roe0UJEXHQ6lQKAmAr/mYaYnezM k8EtoJrA==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1su8M4-00000002KZO-0wjt for barebox@lists.infradead.org; Fri, 27 Sep 2024 10:37:48 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1su8Lv-0002d5-Py; Fri, 27 Sep 2024 12:37:35 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su8Lv-001tz5-2e; Fri, 27 Sep 2024 12:37:35 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1su8Lv-000PJg-1S; Fri, 27 Sep 2024 12:37:35 +0200 From: Sascha Hauer Date: Fri, 27 Sep 2024 12:37:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240927-vop2-v2-9-dc8dcfc651d5@pengutronix.de> References: <20240927-vop2-v2-0-dc8dcfc651d5@pengutronix.de> In-Reply-To: <20240927-vop2-v2-0-dc8dcfc651d5@pengutronix.de> To: "open list:BAREBOX" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1727433454; l=93827; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=F1BzYVpSzQOOfIK0aJvFV1R3G6y6F7J3bxy6rWf5zcE=; b=AZQxjeJVpb4lDlg+xHfXqCNSwFfqC+qiDP2LreWF8aG6tBkTAPIIdSFcRubWQ86hzYv9QRevw bEoDcIt3SlDDIj5pD9uSqhQhQFdRanu2RqohmtqnGIug1g9RsMVVPuf X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_113745_478844_3C8E68B8 X-CRM114-Status: GOOD ( 25.89 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH v2 09/15] video: i.MX ipuv3: switch to upstream hdmi driver X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) The Linux dw-hdmi driver is based on a driver which originally was written specifically for the i.MX and was converted later to a generic dw-hdmi driver. The barebox driver is still based on the original Linux driver. We just merged the dw-hdmi driver. With this patch we now get rid of the i.MX specific driver and use the generic one. Signed-off-by: Sascha Hauer --- drivers/video/imx-ipu-v3/Kconfig | 3 +- drivers/video/imx-ipu-v3/Makefile | 2 +- drivers/video/imx-ipu-v3/dw_hdmi-imx.c | 223 ++++++ drivers/video/imx-ipu-v3/imx-hdmi.c | 1360 -------------------------------- drivers/video/imx-ipu-v3/imx-hdmi.h | 1029 ------------------------ 5 files changed, 226 insertions(+), 2391 deletions(-) diff --git a/drivers/video/imx-ipu-v3/Kconfig b/drivers/video/imx-ipu-v3/Kconfig index 4429e815cd..fb65f8a85e 100644 --- a/drivers/video/imx-ipu-v3/Kconfig +++ b/drivers/video/imx-ipu-v3/Kconfig @@ -15,7 +15,8 @@ config DRIVER_VIDEO_IMX_IPUV3_LVDS config DRIVER_VIDEO_IMX_IPUV3_HDMI bool "IPUv3 HDMI support" - depends on DRIVER_VIDEO_EDID + select DRIVER_VIDEO_EDID + select DRIVER_VIDEO_DW_HDMI select OFDEVICE config DRIVER_VIDEO_IMX_IPUV3_PARALLEL diff --git a/drivers/video/imx-ipu-v3/Makefile b/drivers/video/imx-ipu-v3/Makefile index 709a9203a3..67a3f35603 100644 --- a/drivers/video/imx-ipu-v3/Makefile +++ b/drivers/video/imx-ipu-v3/Makefile @@ -3,5 +3,5 @@ obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3) += ipu-common.o ipu-dmfc.o ipu-di.o obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3) += ipu-dp.o ipuv3-plane.o ipufb.o obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3) += ipu-dc.o obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3_LVDS) += imx-ldb.o -obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3_HDMI) += imx-hdmi.o +obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3_HDMI) += dw_hdmi-imx.o obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3_PARALLEL) += imx-pd.o diff --git a/drivers/video/imx-ipu-v3/dw_hdmi-imx.c b/drivers/video/imx-ipu-v3/dw_hdmi-imx.c new file mode 100644 index 0000000000..b2a32c406c --- /dev/null +++ b/drivers/video/imx-ipu-v3/dw_hdmi-imx.c @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2011-2013 Freescale Semiconductor, Inc. + * + * derived from imx-hdmi.c(renamed to bridge/dw_hdmi.c now) + */ +#include +#include +#include +#include +#include +#include +#include