Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1706245lqb; Sun, 26 May 2024 13:21:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWlo9QzakKNej4z1GH0dzT+hEwYpKD9/HZGdM1gD7/eP/e/1y7LWa5UUMSNKvnCwQHEQFUZdGprO3U4fPFh1S2FCjjbpTTO6c65P6aGOQ== X-Google-Smtp-Source: AGHT+IHHZzqyiHkR9QXyuh6EkMloUs7bw4OtAwhS+49PMCK3MO3qi3zFEuGKtGGVa+i3a4qqp22l X-Received: by 2002:a05:6a21:920b:b0:1b1:ebf2:d767 with SMTP id adf61e73a8af0-1b212df0c74mr13185850637.43.1716754917111; Sun, 26 May 2024 13:21:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716754917; cv=pass; d=google.com; s=arc-20160816; b=GLif8wjBRm/iQE9YWKao/dPufs+fhMY0A4nsqeslw5+YYeq6WuK16hBq0Yt1aa5o80 YaBtcUiflM2Fr1WN3h6xACzp3itk0IZy0hX5iKza/D9QszhJ9lkMFM8VcQrnhsCHE65R BpPvaXxAIAeJHgYagopYuBF7lLZ+pbZmkyeVQTJV6Jd98/ixt9lxkU2AWNieHMq2/7JH 7d+KwpcvD3LMb5YdZKBNl9dITcgAjorhufjc5c5v9zgHFm7c1D9MA2nQ98yuG2ke3lOm Ciww/OEoXvSVZcT6/HiID2m+o1kWTn59rxbSn8qBxIXp8j7PLg2IYDBIHd+ceLAw0MKg 9T+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=GyqCBg/CJHjL1uDi9eGBGDlBz622MYKQ4wKZcqbZn/0=; fh=+9pjvWy/sQxAY6MxG8mZV2fAo+vnxCF8rB7oqMHgJRU=; b=W1l7ikjpEjsuaywUf4mLwYMdYnxqT3tbYFlSpTU6i/DnDtbXKWYfSQLSW1gpEXbDew oBc0XoQiwATiuOHO+fJSB7sfMDVzIJGCPzJ9s/wVzonoG8gWbjRixyhlsH9VfwjzYtYW E6YVVgEd4nHGlIQ4CRe0njVCNhHiGzScVPNsuq+LeCSeWSW8az3svpJ5hEtT/BQeqWPQ EapL16MtxX8kCVqKiovvCh8syZ5RiXwP2lwtZ62EE7MPmYF0TLSuNX4VgdQCcatt2Xsi 9uRhbIV49i934SzTotQLQPZlPyw/igGcS+6XQIDUD2xmLPjj33xekFmbZSd1EqwpOZYi c6Gg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wObpxQXN; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229a3044bsi5192905a12.652.2024.05.26.13.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 13:21:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wObpxQXN; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-189855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F3F46B20C5C for ; Sun, 26 May 2024 20:21:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31B9B139569; Sun, 26 May 2024 20:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wObpxQXN" Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 AC120138493 for ; Sun, 26 May 2024 20:21:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716754906; cv=none; b=bvLUu7U2hQy4+p0+O2a/PUb3cKRBH+m2irjPmB9Pr+3PjT410ZATdDscJYXufYlkYmD3cgv69sQ+n3v0Fk4N6n/ShNchS6+QB6CH+uVwQCHda5KAhleip85+aqkNkGrV21Z7MpCM9COjTIkmHVOlj9vi3pSEkThwr6hwoMwNHYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716754906; c=relaxed/simple; bh=eEXyqEF2xDXBMfpcWeHey4NR2VDQOK8iwEQXHLZN+nc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qzx0lNpbY2qbqakPrkf5w9WV9d7fNZmE063jZZlctpNeiih4B9Jel+K/CUN98jh5q60vTXMPsXCKRGfVdjI5gHCIYSrXHDALSbviXjm/uzoszu1QdcsgNh0JGEACLPSuGzgtpRFb2MCV5JaN32ZpsGgPUaLutkbIkNfcJ6HXIXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=wObpxQXN; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: rfoss@kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716754901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GyqCBg/CJHjL1uDi9eGBGDlBz622MYKQ4wKZcqbZn/0=; b=wObpxQXNzmb2+e4fVfKNiI2Iv2hR1kY42nzdWOZuiQpTCeMb+Gkv4v26HbEByCqoJB0yPy VypWT+FySjbae+OirPEjtYhB3ox+32730WKl0531X7XpRyqutqw3FMSxnUzuAqju711BA5 sOpEqWyscS4Vg72Z8qgL/Mqah3Px7WU= X-Envelope-To: laurent.pinchart@ideasonboard.com X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: sui.jingfeng@linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng To: Robert Foss , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sui Jingfeng Subject: [PATCH v6 00/10] drm/bridge: Allow using fwnode API to get the next bridge Date: Mon, 27 May 2024 04:21:05 +0800 Message-Id: <20240526202115.129049-1-sui.jingfeng@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Currently, the various display bridge drivers rely on OF infrastructures to works very well, yet there are platforms and/or devices absence of 'OF' support. Such as virtual display drivers, USB display apapters and ACPI based systems etc. Add fwnode based helpers to fill the niche, this allows part of the display bridge drivers to work across systems. As the fwnode API has wider coverage than DT counterpart and the fwnode graphs are compatible with the OF graph, so the provided helpers can be used on all systems in theory. Assumed that fwnode graphs are well established on the system. Tested on TI BeaglePlay board. v1 -> v2: * Modify it66121 to switch togather * Drop the 'side-by-side' implement * Add drm_bridge_find_next_bridge_by_fwnode() helper * Add drm_bridge_set_node() helper v2 -> v3: * Read kernel-doc and improve function comments (Dmitry) * Drop the 'port' argument of it66121_read_bus_width() (Dmitry) * drm-bridge: sii902x get nuked v3 -> v4: * drm-bridge: tfp410 get nuked * Add platform module alias * Rebase and improve commit message and function comments v4 -> v5: * Modify sii9234, ch7033 and ANX7688 * Trivial fixes v5 -> v6: * Implement the same thing with no boilerplate introduced * Add 'struct device *' field to the drm_bridge structure * Re-implement of_drm_find_bridge() with drm_bridge_find_by_fwnode() Sui Jingfeng (10): drm/bridge: Allow using fwnode APIs to get the next bridge drm/bridge: Set firmware node of drm_bridge instances automatically drm/bridge: Implement of_drm_find_bridge() on the top of drm_bridge_find_by_fwnode() drm/bridge: simple-bridge: Use fwnode APIs to acquire device properties drm/bridge: display-connector: Use fwnode APIs to acquire device properties drm/bridge: sii902x: Switch to use fwnode APIs to acquire device properties drm-bridge: it66121: Use fwnode APIs to acquire device properties drm/bridge: tfp410: Use fwnode APIs to acquire device properties drm/bridge: sii9234: Use fwnode APIs to abstract DT dependent API away drm/bridge: ch7033: Switch to use fwnode based APIs drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 +- .../drm/bridge/analogix/analogix-anx6345.c | 4 +- .../drm/bridge/analogix/analogix-anx78xx.c | 4 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 3 +- .../gpu/drm/bridge/cadence/cdns-dsi-core.c | 3 +- .../drm/bridge/cadence/cdns-mhdp8546-core.c | 3 +- drivers/gpu/drm/bridge/chipone-icn6211.c | 5 +- drivers/gpu/drm/bridge/chrontel-ch7033.c | 15 ++-- drivers/gpu/drm/bridge/cros-ec-anx7688.c | 4 +- drivers/gpu/drm/bridge/display-connector.c | 26 +++--- drivers/gpu/drm/bridge/fsl-ldb.c | 3 +- drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 3 +- drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c | 3 +- .../drm/bridge/imx/imx8qxp-pixel-combiner.c | 3 +- .../gpu/drm/bridge/imx/imx8qxp-pixel-link.c | 3 +- drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c | 3 +- drivers/gpu/drm/bridge/ite-it6505.c | 3 +- drivers/gpu/drm/bridge/ite-it66121.c | 58 ++++++++----- drivers/gpu/drm/bridge/lontium-lt8912b.c | 3 +- drivers/gpu/drm/bridge/lontium-lt9211.c | 3 +- drivers/gpu/drm/bridge/lontium-lt9611.c | 3 +- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 3 +- drivers/gpu/drm/bridge/lvds-codec.c | 3 +- .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 3 +- drivers/gpu/drm/bridge/microchip-lvds.c | 3 +- drivers/gpu/drm/bridge/nwl-dsi.c | 3 +- drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 +- drivers/gpu/drm/bridge/panel.c | 3 +- drivers/gpu/drm/bridge/parade-ps8622.c | 3 +- drivers/gpu/drm/bridge/parade-ps8640.c | 1 - drivers/gpu/drm/bridge/samsung-dsim.c | 3 +- drivers/gpu/drm/bridge/sii902x.c | 46 ++++------ drivers/gpu/drm/bridge/sii9234.c | 8 +- drivers/gpu/drm/bridge/sil-sii8620.c | 3 +- drivers/gpu/drm/bridge/simple-bridge.c | 24 +++-- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +- drivers/gpu/drm/bridge/tc358762.c | 3 +- drivers/gpu/drm/bridge/tc358764.c | 3 +- drivers/gpu/drm/bridge/tc358767.c | 3 +- drivers/gpu/drm/bridge/tc358768.c | 3 +- drivers/gpu/drm/bridge/tc358775.c | 3 +- drivers/gpu/drm/bridge/thc63lvd1024.c | 3 +- drivers/gpu/drm/bridge/ti-dlpc3433.c | 3 +- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 3 +- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 +- drivers/gpu/drm/bridge/ti-tfp410.c | 42 ++++----- drivers/gpu/drm/bridge/ti-tpd12s015.c | 3 +- drivers/gpu/drm/drm_bridge.c | 87 +++++++++++++++---- drivers/gpu/drm/exynos/exynos_drm_mic.c | 3 +- drivers/gpu/drm/i2c/tda998x_drv.c | 5 +- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 3 +- drivers/gpu/drm/meson/meson_encoder_cvbs.c | 3 +- drivers/gpu/drm/meson/meson_encoder_dsi.c | 3 +- drivers/gpu/drm/meson/meson_encoder_hdmi.c | 3 +- drivers/gpu/drm/omapdrm/dss/dpi.c | 3 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +- drivers/gpu/drm/omapdrm/dss/sdi.c | 3 +- drivers/gpu/drm/omapdrm/dss/venc.c | 3 +- drivers/gpu/drm/renesas/rcar-du/rcar_lvds.c | 3 +- .../gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 3 +- .../gpu/drm/renesas/rcar-du/rzg2l_mipi_dsi.c | 3 +- drivers/gpu/drm/sti/sti_dvo.c | 3 +- drivers/gpu/drm/vc4/vc4_dsi.c | 5 +- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 2 +- include/drm/drm_bridge.h | 21 +++-- 70 files changed, 256 insertions(+), 260 deletions(-) -- 2.34.1