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: 13889386 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 65558D7361B for ; Sun, 1 Dec 2024 00:47:24 +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=R5LiBAdbB1hlgtmMDbUhuFL82B DMLOaZxcIMQtw9pQj5EZhV/X+32dKl4RJoe4hRvEKTuC51O7oTI7RcIliC7CSLfiUPH/Az8l6XT/L z8NcOcDKH1k1AKIv5NPxVdUL08FasUWD2w6JpLeoln70u0ubKkR7KXK7EK3vYvOChk0GDxAVxBgUy j4nDw8rgPgKeLsltUz5NeF+byzrrMZee2TFoKvD5iUC1ZjRz+4qoRmfrqXZ3OxdjOtedRbBZRXmcp wCy3BxHOC186U9/qnyz3X+m1IZ9QzEJIQTwTcN0NSlW/QQAt/SeRC4zPZBYOioSmI2DUvQqeMh2pR xX9N39Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tHY7P-00000002pPs-2BGr; Sun, 01 Dec 2024 00:47:23 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tHY4X-00000002oUG-0rzU for linux-mediatek@lists.infradead.org; Sun, 01 Dec 2024 00:44:26 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5d0b922a637so2237409a12.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=sLrtJV2BkeOsxq/4+J+QTaYwKLO2hD8ZEUI6C0R7qHm3B5IdhZl5/V6r0ZhsrJHjru rOhHJpslI8w23yFh54CQrGXSUh5mVcIuiElY6Hjq5+hpd0n02DmgLtt7ZFFEY4zS9o79 r1Kj+0j/SCX/iLD2J3LHRPOCNwIfSX67azhxbqc3YKOg7/G9WzK13ZxTDNTkEZc7ZqHd +yCfcyYcuettD7sbC3X+FHk4APD7EDHDw8AUYwDVUl7L39Idu2PvP962Bt1Iibz8JMFn RJIUB/taUDZ5aG+68/2ah4RNN+dmQcmfUqmlF7t4ZuRZBdLlgy5wvvy70plQWT1SQlLS p3fA== X-Forwarded-Encrypted: i=1; AJvYcCXDEUW5JSX4KKrMlRklHLZUhkR+0pBOh/AmDr3AohQ2m6Tuozs/2N0g9WaXfUAtLD6G6duoZjXLkmx+rSHabQ==@lists.infradead.org X-Gm-Message-State: AOJu0Yzse8qyZPhOitkmmNSIBDOJE5Tc6WZzDSfAKYTQP/64j2sjNSl5 oaug1lD9YscKhKlYfLn3oyui3Jwioodk1xysWsuvKmjiXBk+YYypmaugmv6/tvM= X-Gm-Gg: ASbGncte+6GswFsNZ2BTWjv0Mo+nF2IcohJ3mVgsKhsXIbf+sMKY4lni8cRhSMIceHm m+hlHk308AT++1KdXqPqS3v2cav5E4vghR2TKi3PR00qSTlUAlkPiCQKYc174sgQhZv7Xtp+GtC YDbm/uRygwAlPUReaOSSqoH5szKHiwqrtuAezGaK8QpScr5L0lhE85BVt06cze8rJZyfSujTI6P qisRSQtgyrGHijoHh81xLXyPcBspNiu6T4RVN+gLJoPcrZllrgRj3ZFhg== 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_251230_923702A8 X-CRM114-Status: GOOD ( 24.81 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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