From nobody Fri Dec 19 09:47:55 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B950A3074B1 for ; Thu, 23 Oct 2025 10:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761215568; cv=none; b=k9MlJSa+Fjho5OP7dL48sHiQ1JHAGjPj3w18+y5Ue0Du7fB1fzs5YKU/ElwowSzMa23ur+fls4/vNsrWNjB4f+f6h+YhRt0CSfPZMvVtXMa164mfUcI3Sv/mXZS4D9IG5TXwOMnFrZ4iel3/yTj/U/igm9oy5R8FFuKRdVEN+0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761215568; c=relaxed/simple; bh=w4n9a/salkEEKluJYQOfyIQy0yuv7hx8mUa6k3VOwTQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AQDEtpTlylaQvqczMZN5hYmJ3rdWU0PRrvlGVTTzDiZ64Ap1gqW1Juohso+ZegDOCDNmN0O0d2XZR2TtmpeR/2zS/iB7DwH+3jNNWuycLlGTeD76wr2es2BAIp0v9GuSVVZj0VnvfQqFm6DlENTi4mbV40jFxf5KJY34Tx91csE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Mgg+BK/V; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Mgg+BK/V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1761215563; bh=w4n9a/salkEEKluJYQOfyIQy0yuv7hx8mUa6k3VOwTQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Mgg+BK/V64LlWD5QG1Ompp2iyNwg73uvWTmrcWtWGrz1AAkxsZSmIQ11D3C0IMv8Q Tth/AE02JKo/iTesUWJLmV07xJxHJNwMBRxwqbyXGIYcE0LamaHOCbfEpbzlY5twFS rE3PDSfXlQjMsRJxEPDB8mxElrbGHwMLPHzpJaC/M5svOJKnRQalLGt/xpJL4u9rQ6 XDDan31Qe0WtfsxoMubutjmMqWnLeXA+7+MuWMXCkQJKndDeKgyFkX40lIumorEU83 fZGgYtz2sufgoiHn3ZgNKzP2BPa1M3bc2qFEbFfD/SQzTZut3EhdCDwcnGNHE+Shjw 7PZti7mB6Z+kA== Received: from yukiji.home (amontpellier-657-1-116-247.w83-113.abo.wanadoo.fr [83.113.51.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laeyraud) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3BC4F17E1418; Thu, 23 Oct 2025 12:32:43 +0200 (CEST) From: Louis-Alexis Eyraud Date: Thu, 23 Oct 2025 12:32:33 +0200 Subject: [PATCH v11 07/11] drm/mediatek: mtk_hdmi_common: Add OP_HDMI if helper funcs assigned Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251023-mediatek-drm-hdmi-v2-v11-7-7873ec4a1edf@collabora.com> References: <20251023-mediatek-drm-hdmi-v2-v11-0-7873ec4a1edf@collabora.com> In-Reply-To: <20251023-mediatek-drm-hdmi-v2-v11-0-7873ec4a1edf@collabora.com> To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , CK Hu Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Louis-Alexis Eyraud X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1761215558; l=1902; i=louisalexis.eyraud@collabora.com; s=20250113; h=from:subject:message-id; bh=MmtKKEPK3SAo1T3vitymGts9yNll1+ssz6BWi4wYaAA=; b=g0mrAs0ZyzneTfRiB3MQVb0WMnrfMGm6tM1Nx4QLcfzYPqEE6pZ+HLrZO8kaboSnnf464hJ3c gvfzNotS+jCBVwaCy3xGHjxqSa3O0qIUA1D5mELo62Ctjxm+Gy4Nyck X-Developer-Key: i=louisalexis.eyraud@collabora.com; a=ed25519; pk=CHFBDB2Kqh4EHc6JIqFn69GhxJJAzc0Zr4e8QxtumuM= From: AngeloGioacchino Del Regno In preparation for adding the HDMI TX v2 driver, and to allow a future modernization of the HDMI v1 one, perform changes that enable the usage of the HDMI Helpers provided by DRM. Check if the HDMI driver provides the function pointers to hdmi_{clear,write}_infoframe used by the HDMI Helper API and, if present, add DRM_BRIDGE_OP_HDMI to the drm_bridge ops, enabling the drm API to register the bridge as HDMI and to use the HDMI Helper functions. If the hdmi_{write,clear}_infoframe pointers are not assigned, vendor and product strings and HDMI helpers will not be used, hence this commit brings no functional changes to drivers that have not been refactored to use the new helpers. This also means that, in the current state, there is effectively no functional change to mtk_hdmi and its other components. Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Louis-Alexis Eyraud --- drivers/gpu/drm/mediatek/mtk_hdmi_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c b/drivers/gpu/drm/m= ediatek/mtk_hdmi_common.c index 3b589706d61b1e0e4aa66d0c81253b8aeb70c0d3..be63f33d39bfd4625a5f1edd83c= 873cc20ac0018 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_common.c @@ -413,6 +413,10 @@ struct mtk_hdmi *mtk_hdmi_common_probe(struct platform= _device *pdev) hdmi->bridge.ops =3D DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | DRM_BRIDGE_OP_HPD; =20 + if (ver_conf->bridge_funcs->hdmi_write_infoframe && + ver_conf->bridge_funcs->hdmi_clear_infoframe) + hdmi->bridge.ops |=3D DRM_BRIDGE_OP_HDMI; + hdmi->bridge.type =3D DRM_MODE_CONNECTOR_HDMIA; hdmi->bridge.ddc =3D hdmi->ddc_adpt; hdmi->bridge.vendor =3D "MediaTek"; --=20 2.51.0