From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 28 Oct 2024 15:41:37 +0100 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 1t5Qw4-001tmU-13 for lore@lore.pengutronix.de; Mon, 28 Oct 2024 15:41:37 +0100 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 1t5Qvy-0005J9-Hp for lore@pengutronix.de; Mon, 28 Oct 2024 15:41:37 +0100 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=SobI/OUYpW1nd22PWeWltA8AysOz2xy0+xsDCwTbhsI=; b=tWs9h/C3ScI/HzMszIswgjcPKy L2nFtiPrVqgHwUWEzvHGYAzBDGVSzhsu8IuK7aV0uedqQ9Bn9VC0tILFkgru4fo1KepcutxR3CqWQ MI40oiwLrYAyYGwz4jcpl/I5TW2l0qopd0JOdC2acQYNEWaP3MwkaknIwbJCkd23w30wEZiCiVjmM wS0nD9XpWiOsS30EUQR+hMP33Xc8Sx+DIccGvmkxvKv0AMkqbfEL4TjX7/PevPk2WBzXHlkjxX5p7 Z1UAEU44uahkZwcgdimLc68cOT8nMvic4TueyqOR0166dyvy0CRfCVkW+2m0M+LtMYP3hcAw7GuDP u5B7aDmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Qv3-0000000B9nZ-2MI1; Mon, 28 Oct 2024 14:40:33 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5QbU-0000000B5wP-25yt for barebox@lists.infradead.org; Mon, 28 Oct 2024 14:20:24 +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 1t5Qax-0002nl-2T; Mon, 28 Oct 2024 15:19:47 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t5Qaw-000s7M-28; Mon, 28 Oct 2024 15:19:46 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1t5Qaw-00EMX2-1s; Mon, 28 Oct 2024 15:19:46 +0100 From: Sascha Hauer Date: Mon, 28 Oct 2024 15:19:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241028-vop2-rk3588-v1-5-a54bf7c28adc@pengutronix.de> References: <20241028-vop2-rk3588-v1-0-a54bf7c28adc@pengutronix.de> In-Reply-To: <20241028-vop2-rk3588-v1-0-a54bf7c28adc@pengutronix.de> To: "open list:BAREBOX" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730125186; l=50759; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=WjRU5P7om9QZvH5PrWMqZcdPaSS/T1PU1Fi+r1W7/gc=; b=DjRCdndCnLlS0mb6dKN0O1oXRDhhZps9fNFJQJsO62fIkcOJDc09GTTStdfJ31Xf3qWG7/3rh W9n5HF0aokwCmM5+/C3Qg/Ebpd38C5ZMX9cq1doEj2FCllZzzmlMBd1 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-20241028_072021_082203_9B1D53BB X-CRM114-Status: GOOD ( 29.44 ) 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=-5.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 05/12] video: add support for dw-hdmi-qp 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) This adds support for a newer variant of the Synopsys HDMI TX controller, based on Linux commit: | commit f367bb862ab7d7b38ec4fbfe9f313696a6fe8cd9 | Author: Cristian Ciocaltea | Date: Mon May 20 14:49:50 2024 +0300 | | drm/bridge: synopsys: Add DW HDMI QP TX controller driver | | The Synopsys DesignWare HDMI 2.1 Quad-Pixel (QP) TX controller supports | the following features, among others: | | * Fixed Rate Link (FRL) | * 4K@120Hz and 8K@60Hz video modes | * Variable Refresh Rate (VRR) including Quick Media Switching (QMS), aka | Cinema VRR | * Fast Vactive (FVA), aka Quick Frame Transport (QFT) | * SCDC I2C DDC access | * TMDS Scrambler enabling 2160p@60Hz with RGB/YCbCr4:4:4 | * YCbCr4:2:0 enabling 2160p@60Hz at lower HDMI link speeds | * Multi-stream audio | * Enhanced Audio Return Channel (EARC) | | Add driver to enable basic support, i.e. RGB output up to 4K@60Hz, | without audio, CEC or any HDMI 2.1 specific features. | | Co-developed-by: Algea Cao | Signed-off-by: Algea Cao | Signed-off-by: Cristian Ciocaltea Signed-off-by: Sascha Hauer --- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/dw-hdmi-qp.c | 470 +++++++++++++++++++++++++ drivers/video/dw-hdmi-qp.h | 834 +++++++++++++++++++++++++++++++++++++++++++++ include/video/dw_hdmi_qp.h | 32 ++ 5 files changed, 1346 insertions(+) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 60adc7f30e..2fdc921b52 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -216,4 +216,13 @@ config DRIVER_VIDEO_DW_HDMI controller. To make use of this driver you need platform specific glue code to be selected as well. +config DRIVER_VIDEO_DW_HDMI_QP + tristate "Designware HDMI QP support" + select VIDEO_VPL + select OFTREE + help + Say Y here if you want to enable support for the Designware HDMI QP + controller. To make use of this driver you need platform specific + glue code to be selected as well. + endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 6aa5d50e5d..2a0d49716a 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -32,5 +32,6 @@ obj-$(CONFIG_DRIVER_VIDEO_EFI_GOP) += efi_gop.o obj-$(CONFIG_DRIVER_VIDEO_FB_SSD1307) += ssd1307fb.o obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o obj-$(CONFIG_DRIVER_VIDEO_DW_HDMI) += dw-hdmi.o +obj-$(CONFIG_DRIVER_VIDEO_DW_HDMI_QP) += dw-hdmi-qp.o obj-$(CONFIG_DRIVER_VIDEO_BOCHS) += bochs/ obj-$(CONFIG_DRIVER_VIDEO_ROCKCHIP) += rockchip/ diff --git a/drivers/video/dw-hdmi-qp.c b/drivers/video/dw-hdmi-qp.c new file mode 100644 index 0000000000..4a53b14c61 --- /dev/null +++ b/drivers/video/dw-hdmi-qp.c @@ -0,0 +1,470 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd. + * Copyright (c) 2024 Collabora Ltd. + * + * Author: Algea Cao + * Author: Cristian Ciocaltea + */ +#include +#include +#include +#include +#include +#include +#include +#include