From: Jonas Karlman <jonas@kwiboo.se>
To: Detlev Casanova <detlev.casanova@collabora.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Heiko Stuebner <heiko@sntech.de>,
Ricardo Ribalda <ribalda@chromium.org>,
Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <hansg@kernel.org>, Yunke Cao <yunkec@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
James Cowgill <james.cowgill@blaize.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, kernel@collabora.com,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Diederik de Haas <didi.debian@cknow.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 12/15] media: rkvdec: Add H264 support for the VDPU381 variant
Date: Fri, 24 Oct 2025 00:53:20 +0200 [thread overview]
Message-ID: <d28c81b0-3d50-46f7-876e-d634bcab2cd0@kwiboo.se> (raw)
In-Reply-To: <20251023214247.459931-13-detlev.casanova@collabora.com>
Hi Detlev,
On 10/23/2025 11:42 PM, Detlev Casanova wrote:
> This decoder variant is found in Rockchip RK3588 SoC family.
>
> Like for rkvdec on rk3399, it supports the NV12, NV15, NV16 and NV20
> output formats and level up to 5.1.
>
> The maximum width and height have been significantly increased
> supporting up to 65520 pixels for both.
>
> Also make sure to only expose the first core and ignore the other
> until mutli-core is supported.
>
> Fluster score for JVT-AVC_V1 is 129/135.
>
> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock 5B
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
> .../media/platform/rockchip/rkvdec/Makefile | 1 +
> .../rockchip/rkvdec/rkvdec-h264-common.h | 2 +
> .../rockchip/rkvdec/rkvdec-vdpu381-h264.c | 469 ++++++++++++++++++
> .../rockchip/rkvdec/rkvdec-vdpu381-regs.h | 427 ++++++++++++++++
> .../media/platform/rockchip/rkvdec/rkvdec.c | 127 +++++
> .../media/platform/rockchip/rkvdec/rkvdec.h | 4 +
> 6 files changed, 1030 insertions(+)
> create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu381-h264.c
> create mode 100644 drivers/media/platform/rockchip/rkvdec/rkvdec-vdpu381-regs.h
[snip]
> diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec.c b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> index f043b07c8e7d..bc3e35b82a11 100644
> --- a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
[snip]
> +/*
> + * Some SoCs, like RK3588 have multiple identical VDPU cores, but the
> + * kernel is currently missing support for multi-core handling. Exposing
> + * separate devices for each core to userspace is bad, since that does
> + * not allow scheduling tasks properly (and creates ABI). With this workaround
> + * the driver will only probe for the first core and early exit for the other
> + * cores. Once the driver gains multi-core support, the same technique
> + * for detecting the first core can be used to cluster all cores together.
> + */
> +static int rkvdec_disable_multicore(struct rkvdec_dev *rkvdec)
> +{
> + struct device_node *node = NULL;
> + const char *compatible;
> + bool is_first_core;
> + int ret;
> +
> + /* Intentionally ignores the fallback strings */
> + ret = of_property_read_string(rkvdec->dev->of_node, "compatible", &compatible);
> + if (ret)
> + return ret;
> +
> + /* The first compatible and available node found is considered the main core */
> + do {
> + node = of_find_compatible_node(node, NULL, compatible);
> + if (of_device_is_available(node))
> + break;
> + } while (node);
> +
> + if (!node)
> + return -EINVAL;
> +
> + is_first_core = (rkvdec->dev->of_node == node);
> +
> + of_node_put(node);
> +
> + if (!is_first_core) {
> + dev_info(rkvdec->dev, "missing multi-core support, ignoring this instance\n");
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
The addition of rkvdec_disable_multicore should probably be split into a
separate patch.
Please leave some more time for review before sending next version. I
will try to do a more in depth review of this series this weekend, more
feedback will follow.
Regards,
Jonas
[snip]
next prev parent reply other threads:[~2025-10-23 22:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 21:42 [PATCH v5 00/15] media: rkvdec: Add support for VDPU381 and VDPU383 Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 01/15] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2025-10-24 7:55 ` Hans Verkuil
2025-12-16 20:48 ` Detlev Casanova
2025-12-16 22:02 ` Nicolas Dufresne
2025-12-16 22:18 ` Detlev Casanova
2025-12-17 13:34 ` Nicolas Dufresne
2025-10-23 21:42 ` [PATCH v5 02/15] media: v4l2-ctrls: Add hevc_ext_sps_[ls]t_rps controls Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 03/15] media: rkvdec: Switch to using structs instead of writel Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 04/15] media: rkvdec: Move cabac tables to their own source file Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 05/15] media: rkvdec: Use structs to represent the HW RPS Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 06/15] media: rkvdec: Move h264 functions to common file Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 07/15] media: rkvdec: Move hevc " Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 08/15] media: rkvdec: Add variant specific coded formats list Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 09/15] media: rkvdec: Add RCB and SRAM support Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 10/15] media: rkvdec: Support per-variant interrupt handler Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 11/15] media: rkvdec: Enable all clocks without naming them Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 12/15] media: rkvdec: Add H264 support for the VDPU381 variant Detlev Casanova
2025-10-23 22:53 ` Jonas Karlman [this message]
2025-10-23 21:42 ` [PATCH v5 13/15] media: rkvdec: Add H264 support for the VDPU383 variant Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 14/15] media: rkvdec: Add HEVC support for the VDPU381 variant Detlev Casanova
2025-10-23 21:42 ` [PATCH v5 15/15] media: rkvdec: Add HEVC support for the VDPU383 variant Detlev Casanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d28c81b0-3d50-46f7-876e-d634bcab2cd0@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=corbet@lwn.net \
--cc=detlev.casanova@collabora.com \
--cc=didi.debian@cknow.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=hansg@kernel.org \
--cc=heiko@sntech.de \
--cc=hverkuil@kernel.org \
--cc=james.cowgill@blaize.com \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®