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: 846589 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 276B718654 for ; Sun, 1 Dec 2024 00:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733013868; cv=none; b=lHz8dAqeXfL5W1S/9jDZ67+nQfr9rLt5eVsvwubQHC9gCLID0XBMGE28kigL6zLmBdEeeJqQrMUm7ICB9PMrngKoHKLIO5htokliyT8p3w/VNSKS4ZPdxO1IjWjcPmLoWN9QRp52TD/z9nkMHIUjFWb06QR2tdMnimD1h+saSNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733013868; c=relaxed/simple; bh=Q2weCM4AXGG9FokUe/Pnniy4EwvTBWOcgeDLe4MFxtM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gHmm6q+pa2rgLt8RAFNBcOevk1jkH7AoHZzi4TkvvVWTiglUD7OsK9LaTY2wUrHf3Df7MCRY8ct6KGJjHi55aY5demNNj2j0pkVwnuKE5VebCqlP3+kRcTDZ08GOtxi4DePsSNb+IRw8c6eATi6RIpZpocEo/Z8A4GsqQiALZpE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=W7aE4tfl; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W7aE4tfl" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5d0b922a637so2237408a12.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=vger.kernel.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=W7aE4tfl3x+aNaPbbENgSZkEwCDteHz+rEh86cKHG/Y53BjCQmnmtQ+uXReAzQ97io ePDi48tnZNiBTng8io4giFulnyZytJXUvkbzicFhomS8pD5NxP5e+5Kuff6jM+J4cLMU xTcwpPTIJ3jhrnviilDABXkat/3NH2wuSD96QB/Iri26ljiE7wFUBSXhNiGVb/qYQLrC D0LVNJWPL0yAaGjbuXLY7TEFKuc4JuzRfo/CFugXccqDmlGM4xnbIQ/1D8+16bsA9AUy xR/hGigHulQ+ihibE6B0StYHxHnsDL2rrrdLFBo9ok1J+LwmpTxQAPN2sIQcVSS+TpYw dxJw== 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=jUB0onjqTsWmznszVM/0pzLNPrnfP0rcLrlDguL4yFgul5I6S3t1v58K3LFAfRP1bR 1a9C7r9nII9OFKq4TERCQMi3A8rYwPvJV3GUTQvWwNQRyiFrUJojQHsygFc0K5nJDKLS k23vSmxqHUtbOkvJBfgmroO57bGqkOfFpYFkL0wPbl/KdGhV4Ay5ArdSjElljQ4vm4eU 39eK2MSrDM//SloMd/yW/Lkb8PxZ3b0CfoAA8kCi4nn2N6Fp4bFVbsnXP3GqGswouVcx DDTC/f//u5Pq95xEpepDA+uB1Ov3nkm3bwT8xt1ywENsVmRhvLNyTWndPUID1Hp49RI/ XSNw== X-Forwarded-Encrypted: i=1; AJvYcCW28B3htqoqH3J1CaEm193/r3opMsbaAbXvA8CSMetWBNH1QC1QKOZClBVd5Y/26kuzAh48zRwFOP54ASI6mvfwXA==@vger.kernel.org X-Gm-Message-State: AOJu0YxiKDxXHdFWy0Iw4ba5C40uDOPQUZjv5bHAxFtYjMga3gtUpj1R Lbgdkwywa9KJjG74OYCC4JzquvbzZVOxnDyVlN/Ewnh6YXCf4I0RQbNw9sof9Bw= X-Gm-Gg: ASbGncsR/oMPiL3YPI5Hg3q0idchCZm4O89mWE0AtfGCf3gFp0G19z2pgHjR/82YZ2L r5AxJN/KI+RpGQKnSuUmvblB53sf5ddvDAqw3aWgKKA55euqx0wsSd0zos9UNkrvYVr1ILA1drB Z1wSEytWZEsxw6L0yqTSD0p5BgabCrS+XXbkGZgZoS3L5K6BKjy3XJtrtEbFviJ5DkD+ix8FZ7k 8X+XcYUJhj/Z1DxvOjLOvq1kzJALRJ+3y1u9ixa0gJyFs9ddCejEcHDlw== 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 Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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