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: 13889371 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 2CF7318E3F for ; Sun, 1 Dec 2024 00:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733013867; cv=none; b=HFcH0ffl2cmAAqvry/cCImmXIrcWNlEjWttvmGF/ghR6u8dKRelo0RegRhL3Czab5ICJX02EqL1p1KbQxX94ZCGScP7tmjOL1ucpAarnEoHjeVUwAVHjczjApU5XGNYGpFsV+sPtnnHDDdBo1xpIWk4qqt/ovtzFAnQY+YnjBRI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733013867; c=relaxed/simple; bh=Q2weCM4AXGG9FokUe/Pnniy4EwvTBWOcgeDLe4MFxtM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZAWHjFZdVlAB9+f3eViQ8GzDfD3PhQjZutAtE+JVwEtSxSVep4tMtidrTnsBBkx2+MMVKQO6H/3GkUGLJ7mnDyoY4MG7rCZP6wQO55QSH6gKSjsZ+Ev238Yyi5Rm0jpgncgxJ5WZ3C7ipThgsHkbKR/9qYI+vPH33cse3wkKft8= 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.42 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-f42.google.com with SMTP id 4fb4d7f45d1cf-5d0cfb9fecaso1017365a12.2 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=heHllZT84+Jln2hjYHrbyVPV8x+Owx38fR+tE1EnS+zblUZ47v//lbLl+sYGKOPBAg +e/jTDg8YlPGbjQULOWvwVEze699ZASNdETdRll3JDb/XPO+s7PZ23F6JGse4dU9nSbc QKZqpZzEe43xgpkQ/GRJNOkk4aZMxBfCj+GQuV7HTqlbEvjyuIy7XnRYf1D25/MFWo3y 49Do+qCET+TQgd1HpsxJnnDp5mJV/Oyd9TcaE+85ckg2fuBUiieWR8d+Kn+ochHJX1wG dS71ZzCUWgugh2jFSUQA4TEfj7596oJXz486z1w/csrckvsCPqEG0iqLKHQUiLG79vBz b1Gw== X-Forwarded-Encrypted: i=1; AJvYcCXbjKLO8s4HfU7HaCQhCyaPKvF/kjoSxa+nRqddW7oekBiV7nB6U1/zE+XVpTgt6cthCmsjh/YfbL//WA==@vger.kernel.org X-Gm-Message-State: AOJu0YwOJXGKjBBoxpmLC9lcarbuVRkaCRNmyDEoi/1i3q8FN8lt/LhD XBq/WMAXCSaqNgbYrB/La6KMjugE02fE7p9UcaCyy0CRhs+XSJ2Y4QaWFc9vfQw= X-Gm-Gg: ASbGncvMBbO4dGIfao0AuwrP7YBY2ZgKj7Bho0tiA0Jnu8xTONGfbW38zVxf4KBku3w WLaV49iBuLuhllLUCYd+SOlOHc7S/5DZw1dV0lCdhJDl64tlgDkCb52tS/+VGCpMRkXmZlGPpeH 2bORu1Y6YdoLmU5r0fZTN0pX4OTyZz2f3aHqS4+tXrg0OBqenQSn+ewwrIzi5+yNgX1mSnEN5iR jzY2dLhlXXBGZfCIbFjKrNwXT58AVsYofGY9i+tsJDzp2erbHYsQa2f9w== 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-sound@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