Devicetree
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Nas Chung <nas.chung@chipsnmedia.com>
Cc: mchehab@kernel.org, hverkuil@xs4all.nl, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org,
	jackson.lee@chipsnmedia.com, lafley.kim@chipsnmedia.com,
	marek.vasut@mailbox.org, Ming Qian <ming.qian@oss.nxp.com>
Subject: Re: [PATCH v7 4/9] media: chips-media: wave6: Add v4l2 m2m driver support
Date: Thu, 10 Sep 2026 16:37:25 -0400	[thread overview]
Message-ID: <aqMVBbzCnEsxx54Y@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <235b2de7057182d619a361dffc247f1c1f438a3c.1788496816.git.nas.chung@chipsnmedia.com>

On Fri, Sep 04, 2026 at 03:46:30PM +0900, Nas Chung wrote:
> Add v4l2 m2m stateful driver support for the
> Chips&Media Wave6 video codec IP, including both encoder and decoder.
>
> The following features and formats are supported:
> Encoder (8bit only):
> - Supported codecs: AVC, HEVC
> - Supported input formats:
>   * V4L2_PIX_FMT_YUV420/NV12/NV21
>   * V4L2_PIX_FMT_YUV422P/NV16/NV61
>   * V4L2_PIX_FMT_YUYV
>   * V4L2_PIX_FMT_YUV24/NV24/NV42
>   * V4L2_PIX_FMT_RGB24
>   * V4L2_PIX_FMT_P010
>   * V4L2_PIX_FMT_ARGB32
>   * V4L2_PIX_FMT_RGBA32
>   * V4L2_PIX_FMT_XRGB32
>   * V4L2_PIX_FMT_ARGB2101010
> - Supports multiplanar format
> - Although 10-bit input formats are supported (e.g., P010, ARGB2101010),
>   encoded output is limited to 8-bit streams
> - Supports crop
> - Supports extensive v4l2 encoder control
>
> Decoder (8bit only):
> - Supported codecs: AVC, HEVC (8bit only)
> - Supported output formats: V4L2_PIX_FMT_YUV420/NV12/NV21
> - Supports multiplanar format
> - Supports scale down
> - Supports dynamic resolution change
>
> Note: While other versions of the Wave6 IP may support VP9 decoding and
> AV1 decoding and encoding those formats are not implemented or validated
> in this driver at this time.
>
> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
> Tested-by: Ming Qian <ming.qian@oss.nxp.com>
> Tested-by: Marek Vasut <marek.vasut@mailbox.org>
> ---
...
> +
> +u64 wave6_vpu_cycle_to_ns(struct vpu_core_device *core, u64 cycle)
> +{
> +	unsigned long rate;
> +
> +	if (!core->num_clks || !core->clks)
> +		return 0;
> +
> +	rate = clk_get_rate(core->clks[0].clk);
> +	if (!rate)
> +		return 0;
> +
> +	return (cycle * NSEC_PER_SEC) / rate;

div_u64, otherwise 32bit compiler build failure.

Frank
> +}
> +
> +int wave6_vpu_wait_interrupt(struct vpu_instance *inst, unsigned int timeout)
> +{
> +	int ret;
> +
> +	ret = wait_for_completion_timeout(&inst->irq_done,
> +					  msecs_to_jiffies(timeout));
> +	if (!ret)
> +		return -ETIMEDOUT;
> +
> +	reinit_completion(&inst->irq_done);
> +
> +	return 0;
> +}
> +

  parent reply	other threads:[~2026-09-10 20:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  6:46 [PATCH v7 0/9] Add support for Wave6 video codec driver Nas Chung
2026-09-04  6:46 ` [PATCH v7 1/9] media: v4l2-common: Fix P010 format info Nas Chung
2026-09-04  6:46 ` [PATCH v7 2/9] dt-bindings: media: nxp: Add Wave6 video codec device Nas Chung
2026-09-08  9:50   ` Krzysztof Kozlowski
2026-09-09 16:33   ` Frank Li
2026-09-04  6:46 ` [PATCH v7 3/9] media: chips-media: wave6: Add Wave6 VPU interface Nas Chung
2026-09-04  7:04   ` sashiko-bot
2026-09-09 16:39     ` Frank Li
2026-09-09 23:53       ` Nas Chung
2026-09-09 19:49   ` Frank Li
2026-09-10  8:14     ` Nas Chung
2026-09-10 19:50   ` Frank Li
2026-09-04  6:46 ` [PATCH v7 4/9] media: chips-media: wave6: Add v4l2 m2m driver support Nas Chung
2026-09-04  7:21   ` sashiko-bot
2026-09-10 20:37   ` Frank Li [this message]
2026-09-11  7:12     ` Nas Chung
2026-09-04  6:46 ` [PATCH v7 5/9] media: chips-media: wave6: Add Wave6 core driver Nas Chung
2026-09-04  7:03   ` sashiko-bot
2026-09-10 20:48   ` Frank Li
2026-09-11  8:35     ` Nas Chung
2026-09-04  6:46 ` [PATCH v7 6/9] media: chips-media: wave6: Improve debugging capabilities Nas Chung
2026-09-04  7:02   ` sashiko-bot
2026-09-09 20:40   ` Frank Li
2026-09-10  4:38     ` Nas Chung
2026-09-10 16:16       ` Frank Li
2026-09-11  3:53         ` Nas Chung
2026-09-04  6:46 ` [PATCH v7 7/9] media: chips-media: wave6: Add Wave6 thermal cooling device Nas Chung
2026-09-04  7:00   ` sashiko-bot
2026-09-04  6:46 ` [PATCH v7 8/9] media: chips-media: wave6: Add Wave6 control driver Nas Chung
2026-09-04  7:05   ` sashiko-bot
2026-09-10 21:04   ` Frank Li
2026-09-11  7:07     ` Nas Chung
2026-09-04  6:46 ` [PATCH v7 9/9] arm64: dts: freescale: imx95: Add video codec node Nas Chung
2026-09-10 20:00 ` [PATCH v7 0/9] Add support for Wave6 video codec driver Frank Li
2026-09-11  6:58   ` Nas Chung

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=aqMVBbzCnEsxx54Y@lizhi-Precision-Tower-5810 \
    --to=frank.li@oss.nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=krzk+dt@kernel.org \
    --cc=lafley.kim@chipsnmedia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marek.vasut@mailbox.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@oss.nxp.com \
    --cc=nas.chung@chipsnmedia.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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