Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jianfeng Liu <liujianfeng1994@gmail.com>
To: nicolas.dufresne@collabora.com
Cc: conor+dt@kernel.org, detlev.casanova@collabora.com,
	devicetree@vger.kernel.org, ezequiel@vanguardiasur.com.ar,
	frattaroli.nicolas@gmail.com, heiko@sntech.de,
	kernel@collabora.com, krzk+dt@kernel.org, linkmauve@linkmauve.fr,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-rockchip@lists.infradead.org, liujianfeng1994@gmail.com,
	p.zabel@pengutronix.de, robh@kernel.org,
	sebastian.reichel@collabora.com, sigmaris@gmail.com
Subject: Re: [PATCH v7 6/6] arm64: dts: rockchip: Add VPU121 support for RK3588
Date: Thu, 27 Jun 2024 16:13:10 +0800	[thread overview]
Message-ID: <20240627081310.583427-1-liujianfeng1994@gmail.com> (raw)
In-Reply-To: <f04e25bf3c09c55049775e8f012cb653cb4682ba.camel@collabora.com>

Hi Nicolas,

On Wed, 26 Jun 2024 13:46:03 -0400, Nicolas Dufresne wrote:
>Just to clarify, since you are right that it won't work well with GStreamer. It
>does work with multiple decoders (it exposes them all), it is simply that it
>will randomly pick one when decoding, and it may not pick the best one.

I have tested rkvdec2 and vpu121 with gstreamer 1.24.2 on rk356x to decode
a 4K video, and gstreamer always fall with error:
"v4l2slh264dec0: Failed to configure H264 decoder".
I guess that's because 1080p vpu is at fdea0000 which is always
initialized earlier than rkvdec2 at fdf80200, so gstreamer will always
choose the 1080p decoder.

>In the long term, I'd like to stop having to do "like downstream" and expose
>them all. I believe the fix is fairly straightforward in GStreamer. We need to
>expose in the generated element the width/height ranges, and for H.264 the
>supported profiles and level. With that, we at least won't randomly fail at
>decoding 4K, and it should be good enough.

Not only gstreamer, chromium also has similar issue. Chromium will only
check video resolution globally before starting to use one decoder: if
there is a 4K decoder detected before, it will mark 4K resolution as
supported. But when decoding videos, it will choose the first decoder
supporting profile like H264. So chromium may use a 1080p decoder to
decode a 4K video.

Chromium's code about v4l2 is complicated for me. I may create a bug about
it. But chrome os doesn't support devices with multi v4l2 decoders like
rockchip's socs, I don't know if they have the motion to fix it quickly.

>For RK3588, which is a new SoC, its not a problem to upstream something that
>does not work with existing userspace. It would only be a regression if we where
>to enable VDPU121 on RK3399, as now updating linux would cause bugs with
>existing userspace.

There is an old soc just like RK3399: RK3328, which also has a 1080p
hantro h264 decoder and a 4K rkvdec h264 decoder. I guess less people care
about its mainline decoding with gstreamer/chromium so it still has 1080p
decoder enabled.

>For users, it would be best if we get this sorted out in GStreamer by the time
>we have a second decoder. Note that I have some vacation coming up this month,
>so there might be extra delays. Yet, its logical to merge this (the "worst"
>decoder) first, since then randomly picking a better one won't be a regression.

Happy vacation days! I will also take a look at chromium's code to see if
I can fix it.

Best regards,
Jianfeng

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2024-06-27  8:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 18:18 [PATCH v7 0/6] RK3588 VEPU121/VPU121 support Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 1/6] media: dt-bindings: rk3568-vepu: Add RK3588 VEPU121 Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 2/6] media: dt-bindings: rockchip-vpu: Add RK3588 VPU121 Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 3/6] media: hantro: Disable multicore support Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 4/6] media: hantro: Add RK3588 VEPU121 Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 5/6] arm64: dts: rockchip: Add VEPU121 to RK3588 Sebastian Reichel
2024-06-18 18:18 ` [PATCH v7 6/6] arm64: dts: rockchip: Add VPU121 support for RK3588 Sebastian Reichel
2024-06-21  9:22   ` Jianfeng Liu
2024-06-26 17:46     ` Nicolas Dufresne
2024-06-27  8:13       ` Jianfeng Liu [this message]
2024-06-27 13:53         ` Nicolas Dufresne

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=20240627081310.583427-1-liujianfeng1994@gmail.com \
    --to=liujianfeng1994@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=detlev.casanova@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=frattaroli.nicolas@gmail.com \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linkmauve@linkmauve.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=sigmaris@gmail.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