[PATCH 0/2] media: verisilicon: Fix Hantro G2 handling of invalid DPB index

Nicolas Dufresne posted 2 patches 1 week, 2 days ago
drivers/media/platform/verisilicon/hantro_g2.c     | 88 +++++++++++++++++-----
.../platform/verisilicon/hantro_g2_hevc_dec.c      | 17 ++++-
.../media/platform/verisilicon/hantro_g2_regs.h    | 13 ++++
.../media/platform/verisilicon/hantro_g2_vp9_dec.c |  2 -
drivers/media/platform/verisilicon/hantro_hw.h     |  1 +
drivers/media/platform/verisilicon/imx8m_vpu_hw.c  |  2 +
6 files changed, 98 insertions(+), 25 deletions(-)
[PATCH 0/2] media: verisilicon: Fix Hantro G2 handling of invalid DPB index
Posted by Nicolas Dufresne 1 week, 2 days ago
First patch hardens the IRQ handler so the driver can resume after
hitting bus errors (presumably AXI errors). This will reduce the
risk of having to reboot the system in order to recover.

The second patch actually fix the issue, ensuring the decoder won't be
instructed to use address 0x0 as a reference anymore.

The issues was discovered using GStreamer. A bug in the userspace lead
to skippable (RASL) frames not being skipped if its past reference are
missing. This will happen when seeking inside a video that makes use of
this GOP configuration. The probably could also have been hit in lossy
streaming use cases, such as WebRTC. The JCT-VC-HEVC_V1 ITU tests still
results in 141/147 with two concurrent decoders.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
Nicolas Dufresne (2):
      media: verisilicon: Fix CPU stalls on G2 bus error
      media: verisilicon: Protect G2 HEVC decoder against invalid DPB index

 drivers/media/platform/verisilicon/hantro_g2.c     | 88 +++++++++++++++++-----
 .../platform/verisilicon/hantro_g2_hevc_dec.c      | 17 ++++-
 .../media/platform/verisilicon/hantro_g2_regs.h    | 13 ++++
 .../media/platform/verisilicon/hantro_g2_vp9_dec.c |  2 -
 drivers/media/platform/verisilicon/hantro_hw.h     |  1 +
 drivers/media/platform/verisilicon/imx8m_vpu_hw.c  |  2 +
 6 files changed, 98 insertions(+), 25 deletions(-)
---
base-commit: 40b7a19f321e65789612ebaca966472055dab48c
change-id: 20250919-imx8mq-hantro-g2-hang-cb04dcd07a84

Best regards,
-- 
Nicolas Dufresne <nicolas.dufresne@collabora.com>