[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a026dd07133203789e91d0a1662c8b162842fe2.camel@ndufresne.ca>
Date: Wed, 24 Dec 2025 11:02:25 -0500
From: Nicolas Dufresne <nicolas@...fresne.ca>
To: Sven Püschel <s.pueschel@...gutronix.de>, Jacob Chen
<jacob-chen@...wrt.com>, Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Mauro Carvalho Chehab
<mchehab@...nel.org>, Heiko Stuebner <heiko@...ech.de>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>
Cc: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH v2 20/22] media: rockchip: rga: disable multi-core
support
Hi,
Le mercredi 03 décembre 2025 à 16:52 +0100, Sven Püschel a écrit :
> 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.
Please add a Link: and reference to the Hantro patch from which is code is from.
>
> Signed-off-by: Sven Püschel <s.pueschel@...gutronix.de>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> ---
> 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/platform/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;
> }
>
> +static int rga_disable_multicore(struct device *dev)
> +{
> + const char *compatible;
> + struct device_node *node;
> + int ret;
> +
> + /* Intentionally ignores the fallback strings */
> + ret = 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 = of_find_compatible_node(NULL, NULL, compatible);
> + if (!node)
> + return -EINVAL; /* broken DT? */
> +
> + if (dev->of_node != 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;
>
> + ret = rga_disable_multicore(&pdev->dev);
> + if (ret)
> + return ret;
> +
> rga = devm_kzalloc(&pdev->dev, sizeof(*rga), GFP_KERNEL);
> if (!rga)
> return -ENOMEM;
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists