public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Hałasa" <khalasa@piap.pl>
To: Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: i.MX8MP Hantro G2 HEVC decoding problems
Date: Tue, 04 Nov 2025 09:12:59 +0100	[thread overview]
Message-ID: <m3seeunrlg.fsf@t19.piap.pl> (raw)
In-Reply-To: <382e94e1b932938fffd92ead86cf057b4623417c.camel@ndufresne.ca> (Nicolas Dufresne's message of "Mon, 03 Nov 2025 11:26:41 -0500")

Hi Nicolas,

> In queue for the next kernel release, we have a rewrite of the IRQ handler:
>
> https://gitlab.freedesktop.org/linux-media/media-committers/-/commit/19c286b755072a22a063052f530a6b1fac8a1f63
>
> The important take away for this chip is that it does not always stop on errors.
> It can also raise a dry IRQ (I don't have explanation, only happen on IMX8
> boards). The new handler properly check if the hardware is still running, which
> avoid programming over a live IP. The G2 has fancy internal clock gating, so
> doing so can lead to CPU hang if the register you set is hooked to a gated
> portion of the IP. At least this is my mental model of it.

Right. This patch seems to fix the crashes. The (possibly badly
transformed by GStreamer?) HEVC stream isn't displayed correctly yet,
though a direct HEVC 1080p RTP from camera is now ok (certain rate of
packet loss is possible here). Then:

> And there is an important bug fix for missing references, without that, you get
> thousands of error IRQs while the IP is fetch from address 0x0 and its
> surrounding. This large burst of IRQ, combine with multiple memory related
> erratas of IMX8 boards cause random other things to fall appart.
>
> https://gitlab.freedesktop.org/linux-media/media-committers/-/commit/47825b1646a6a9eca0f90baa3d4f98947c2add96

After applying the above, the stream from GStreamer is fixed, too. It
seems it all works fine now.

From time to time I'm getting:
hantro_g2_irq: 0x80100 masked 0x0
hantro-vpu 38310000.video-codec: not all macroblocks were decoded.

But I guess it's due to my network setup.


Thank you very much for your help. You have saved me a lot of work -
a work with an uncertain outcome.
-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa

  reply	other threads:[~2025-11-04  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 13:52 i.MX8MP Hantro G2 HEVC decoding problems Krzysztof Hałasa
2025-11-03 16:26 ` Nicolas Dufresne
2025-11-04  8:12   ` Krzysztof Hałasa [this message]
2025-11-04 16:22     ` Nicolas Dufresne
2025-11-05  5:25       ` Krzysztof Hałasa

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=m3seeunrlg.fsf@t19.piap.pl \
    --to=khalasa@piap.pl \
    --cc=linux-media@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    /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