From patchwork Sun Dec 1 00:44:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13889400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74F1ED7361B for ; Sun, 1 Dec 2024 00:48:33 +0000 (UTC) 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:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pC7u1TQzvRQC1A4e5XvGLZfvCGSbkGoiw1ILZXBCOZI=; b=YrZILMJRs/wxMOsDKkssk7p/Zg aNWKbLzRHObPiHIzskIQKxYtmNjb7nOeRj6GKr4cehqxDrpAKh2SBuNScEDGn1wAZ/XVGb50Yly5G R39BSBskjHoMEXJUWHgwy1QL4ApIUvB/v18u7Ldcz8oTa8dGHD5u8K3GMWwgsMiyqRao+BSaKkOSm G5l7oFZBj+tF6vbmQTF0GTabjmQLLSEXMvOJ7ZyRyzlAWbXX5equJ2VxrXRgQSFfy0LHE50k19eZj xKHz+65w9UcHOK6QowtzxyiLvXW4uN0NOENkgQm8Q/uMfT5/tpQ86rs2XpEklifcwtR26RnaEPG++ IXdZ4/ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tHY8L-00000002pZa-3khW; Sun, 01 Dec 2024 00:48:21 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tHY4X-00000002oUI-0qzj for linux-arm-kernel@lists.infradead.org; Sun, 01 Dec 2024 00:44:27 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5d0b922a637so2237412a12.1 for ; Sat, 30 Nov 2024 16:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733013863; x=1733618663; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pC7u1TQzvRQC1A4e5XvGLZfvCGSbkGoiw1ILZXBCOZI=; b=pUfihVoP3JEgTARlhGDMugq8CCa/eCdkXx2ZHhCs+O3hShibT6fEgBmHQpHxKCJoZj eEPTws+s1RBkJwinIxV0SoCUqQ8zLT1KGMZU01Dw0mW4ID+3TYdUsaO5bnB4JRzNBzFH rcG8yAhAZVapNPGbrpe5mLv3hYvjim5+kFL+ODYD+Mup/F3ldH3KYEIBixrN89b8dVeo HUncyYWPHvLntHNqB36aRHZn+IurDoPc/cIok1FCiaO2i3PMDiDLYhSnuEdLO01h3Ogu J2Q0xUWATEYdtOd94LsI3r3f43bURR7R8Xmm/all58+8pjItRp7v13ErZKQHsc4toMMu tD9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733013863; x=1733618663; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pC7u1TQzvRQC1A4e5XvGLZfvCGSbkGoiw1ILZXBCOZI=; b=oGDZhTAATWzPycKMZzaGSFYkNC+twtzGnHlqLRbW7DtLifBqgMCih1OAHfA5kR3KDK pd0ChsN67sICy2VQ5rJDaNN6DL5RiJZQCK13P5DDKtdKTaIypPGybo5yFNyoyDeJvBsk NBy+HuZyD/YrXmWIPztJRivmZbn5BQglh/BdntTbab+c6lUkg97QbMAhizLovNcSgjyv qLL2/KsU49Kjc/Lp91gTh17J9j1sQWlr506Q3lK2McalQCYytque1dbwHRiWnxjCQAE0 8E2aELe296gjZZMBsICgsppsv2IVMN2epVCbjb32qnN/aJ2L05ZK/J8Qg5mxIt4ATxX3 0Byg== X-Forwarded-Encrypted: i=1; AJvYcCVc7j/g/90cgjflHnBpB2t70CDmlHa67y4d2ir+g7/DQ+fXmUFIXyCq+COUy+YoduesMPwlczQkeBGm2eV3CR4s@lists.infradead.org X-Gm-Message-State: AOJu0YxC9V4xdUR2ux6WDKp/9raduLTzj/mVJSUQTX+rXHZP70+sa2hY tkroPm7CcSrNWEKXxVK2ZeAjVekLJkOTwQaZhkA+6FNR0wsZVFYvgPcV/MaDXOM= X-Gm-Gg: ASbGncsaiF7ilE1IUEZ3/CpbdWdZH05/SlSHTVHM85JfHZQ9CvH60E9TVeQMYmmw8RT Z4h2gV1J0oq8oceA93rsDOxMPyCyowU9CDmctLAyJ899mxbySajD/WsOo7d6WrSqNE3VSQ+QMvh 6WfvgOSFC/kopKQLqe04pAa9YROYDajAN+cU1s7yEyZSkieCGBgWZ7kJN22MBQcf0VqGz0aT+KN I5/E/xlRHibOaEK/i0/mlxrGX1pz3+/jl8F1AhwhWywFHb71v8Edmy4kA== X-Google-Smtp-Source: AGHT+IF/qOKvsTIvpjsO2rdx8+dnHjqM1lk/0IBBK4NiYEI+++S8oNCo0xAu5I1QF8LenN4SLlEGVw== X-Received: by 2002:a05:6402:3482:b0:5d0:214b:9d15 with SMTP id 4fb4d7f45d1cf-5d080b8c890mr16948576a12.5.1733013862530; Sat, 30 Nov 2024 16:44:22 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d097e8d817sm3400359a12.63.2024.11.30.16.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2024 16:44:22 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 01 Dec 2024 02:44:07 +0200 Subject: [PATCH v5 3/9] drm/connector: implement generic HDMI codec helpers MIME-Version: 1.0 Message-Id: <20241201-drm-bridge-hdmi-connector-v5-3-b5316e82f61a@linaro.org> References: <20241201-drm-bridge-hdmi-connector-v5-0-b5316e82f61a@linaro.org> In-Reply-To: <20241201-drm-bridge-hdmi-connector-v5-0-b5316e82f61a@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Phong LE , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , Russell King , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Alain Volmat , Raphael Gallais-Pou , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Cana?= =?utf-8?q?l?= , Raspberry Pi Kernel Maintenance Cc: Jani Nikula , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=14432; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Q2weCM4AXGG9FokUe/Pnniy4EwvTBWOcgeDLe4MFxtM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnS7FY9nXUnV+/Z9kzWEP1LgcipZ6qwSrNkxfL2 BJ6TpRSfpKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ0uxWAAKCRCLPIo+Aiko 1bTdB/9R7BAip+W3eQ7+u4/3iHpLjdEULIfi7KlfKfHyYbtTvdrMJJP+OkCflvoRd6BSXrtFvDF sI+LhulTy6a0iDjG6xEVd3bT33eTjidw2XhFxk76+QNfsN08423BFPJ6B51E/cNrwxSyzqrquUy w1zy82GRkPwXmXaoLsyIBJGE/PN2OOjJ4vveQtkmuu8N5RGcLQ+ET3Cl2jDDgg2Iffzcz1ZzsDb GhTyFZMGnri/WpQSWElGwbVuLCLq+ZE/MpiJjaNjgR4uOOXq4VWy7QHjwha2EGtbHNo4uowWwBk njer6h19N7HnbmQ/WCVTR1vNq5iCAzagf/R7P9ysoicNiti8 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241130_164425_253749_97E8A7CD X-CRM114-Status: GOOD ( 25.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Several DRM drivers implement HDMI codec support (despite its name it applies to both HDMI and DisplayPort drivers). Implement generic framework to be used by these drivers. This removes a requirement to implement get_eld() callback and provides default implementation for codec's plug handling. The framework is integrated with the DRM HDMI Connector framework, but can be used by DisplayPort drivers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_connector.c | 11 ++ drivers/gpu/drm/drm_connector_hdmi_codec.c | 187 +++++++++++++++++++++ .../gpu/drm/drm_connector_hdmi_codec_internal.h | 35 ++++ include/drm/drm_connector.h | 80 +++++++++ 5 files changed, 314 insertions(+) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 1677c1f335fbb0c6114bdb4cc0b12eb407d84564..afdd9268ca23ac7602e73bbe45f3f9cd090a3afd 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -42,6 +42,7 @@ drm-y := \ drm_cache.o \ drm_color_mgmt.o \ drm_connector.o \ + drm_connector_hdmi_codec.o \ drm_crtc.o \ drm_displayid.o \ drm_drv.o \ diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index bbdaaf7022b62d84594a29f1b60144920903a99a..e6252b13e4555125b69d19e0ca24f93b00cee74b 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -38,6 +38,7 @@ #include