From nobody Tue Feb 10 04:17:52 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 6330B3396FA for ; Wed, 3 Dec 2025 15:54:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777255; cv=none; b=l6lYff/xPvOJCpRxd+KHOzlTilb476ch0GCiHbwtmIg3nrKUnUEYTIyoVzEzC8YE+UjOC4AVQq2c9lTLxASirkM53jc7IsrlxbzlUety7/kKaOwKmaaRxzLC2gpQ5HNXcwYIIu+M5o0togN8eVfYxpZr6FLzeQezOMLpx1NQ41M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764777255; c=relaxed/simple; bh=RNLZlK3ZCHBGRd9kdE2qLK4mSIb9x6NAepsB8YXR4CM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UcPaPOhNAyQVes92ij5M0vk2p9x/joDTBmKgN+u6mwBaB1OkG6hMvAvfolcxwFkdE1KDGN63X3C+fknVmENH5iTen3ARvrkeeHVSBu3m8ki146JmWVtSevwlX6mpYzmxQCOmd4duY/U2VH8qGp88T5FOkc7A187rQF/w+Yt10no= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=peter.mobile.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vQpAe-0007dW-SI; Wed, 03 Dec 2025 16:53:36 +0100 From: =?utf-8?q?Sven_P=C3=BCschel?= Date: Wed, 03 Dec 2025 16:52:42 +0100 Subject: [PATCH v2 20/22] media: rockchip: rga: disable multi-core support 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: <20251203-spu-rga3-v2-20-989a67947f71@pengutronix.de> References: <20251203-spu-rga3-v2-0-989a67947f71@pengutronix.de> In-Reply-To: <20251203-spu-rga3-v2-0-989a67947f71@pengutronix.de> To: Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kernel@pengutronix.de, =?utf-8?q?Sven_P=C3=BCschel?= X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.pueschel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Disable multi-core support in preparation of the RGA3 addition. The RK3588 SoC features two equal RGA3 cores. This allows scheduling of the work between both cores, which is not yet implemented. Until it is implemented avoid exposing both cores as independent video devices to prevent an ABI breakage when multi-core support is added. Signed-off-by: Sven P=C3=BCschel Reviewed-by: Nicolas Dufresne --- drivers/media/platform/rockchip/rga/rga.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/plat= form/rockchip/rga/rga.c index 3958e71b8987d..65686228b7300 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -660,6 +660,30 @@ static int rga_parse_dt(struct rockchip_rga *rga) return 0; } =20 +static int rga_disable_multicore(struct device *dev) +{ + const char *compatible; + struct device_node *node; + int ret; + + /* Intentionally ignores the fallback strings */ + ret =3D of_property_read_string(dev->of_node, "compatible", &compatible); + if (ret) + return ret; + + /* first compatible node found from the root node is considered the main = core */ + node =3D of_find_compatible_node(NULL, NULL, compatible); + if (!node) + return -EINVAL; /* broken DT? */ + + if (dev->of_node !=3D node) { + dev_info(dev, "missing multi-core support, ignoring this instance\n"); + return -ENODEV; + } + + return 0; +} + static int rga_probe(struct platform_device *pdev) { struct rockchip_rga *rga; @@ -670,6 +694,10 @@ static int rga_probe(struct platform_device *pdev) if (!pdev->dev.of_node) return -ENODEV; =20 + ret =3D rga_disable_multicore(&pdev->dev); + if (ret) + return ret; + rga =3D devm_kzalloc(&pdev->dev, sizeof(*rga), GFP_KERNEL); if (!rga) return -ENOMEM; --=20 2.52.0