devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Detlev Casanova	 <detlev.casanova@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Alex Bee <knaerzche@gmail.com>,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	 devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/7] media: rkvdec: Add HEVC backend
Date: Tue, 12 Aug 2025 14:26:41 -0400	[thread overview]
Message-ID: <25ce30446e8e8d038273fcdfb398c90995c242db.camel@collabora.com> (raw)
In-Reply-To: <efdf8c99-d166-4b78-afc5-d4a6eb5ac046@kwiboo.se>

[-- Attachment #1: Type: text/plain, Size: 2717 bytes --]

Hi Jonas,

Le mardi 12 août 2025 à 19:31 +0200, Jonas Karlman a écrit :
> On 8/12/2025 2:44 PM, Nicolas Dufresne wrote:
> > I forgot, 
> > 
> > Le mardi 12 août 2025 à 08:38 -0400, Nicolas Dufresne a écrit :
> > > > JCT-VC-HEVC_V1 on GStreamer-H.265-V4L2SL-Gst1.0:
> > > > 
> > > > - DBLK_D_VIXS_2 (fail)
> > > > - DSLICE_A_HHI_5 (fail)
> > > > - EXT_A_ericsson_4 (fail)
> > > > - PICSIZE_A_Bossen_1 (error)
> > > > - PICSIZE_B_Bossen_1 (error)
> > > > - PICSIZE_C_Bossen_1 (error)
> > > > - PICSIZE_D_Bossen_1 (error)
> > > > - SAODBLK_A_MainConcept_4 (fail)
> > > > - SAODBLK_B_MainConcept_4 (fail)
> > > > - TSUNEQBD_A_MAIN10_Technicolor_2 (error)
> > 
> > I'me getting the same result if I force a single job in fluster. The test I
> > posted was with 2 jobs. Detlev found that the iommu reset is required in
> > more
> > cases on RK3588/3576, perhaps the HEVC decoder in older hardware needs the
> > same,
> > I will try and report.
> 
> Vendor kernel [1] check following bits from RKVDEC_REG_INTERRUPT reg to
> decide if a full HW reset should be done.
> 
>   err_mask = RKVDEC_BUF_EMPTY_STA
>   	   | RKVDEC_BUS_STA
>   	   | RKVDEC_COLMV_REF_ERR_STA
>   	   | RKVDEC_ERR_STA
>   	   | RKVDEC_TIMEOUT_STA;
> 
> Adding proper reset support can be rather involved and main reason why
> this series does not handle it, better suited for a separate future
> series.
> 
> Proper HW reset will require e.g. dt-bindings, DT updates, pmu idle
> request integration and for rk3328 vendor even moved VPU reset to TF-A.
> 
> Doing the iommu detach/attach dance not only on RKVDEC_SOFTRESET_RDY
> could possible improve some cases, until full reset can be implemented.

Rockchip is following VSI design of "self reset" on error. But since the iommu
is part of the device, it also gets reset, which imply having to reprogram it.
This showed to be very reliable logic, despite RK doing a hard reset.

Since self reset is documented for RKVDEC_BUS_STA, RKVDEC_ERR_STA,
RKVDEC_TIMEOUT_STA, it would seem that RKVDEC_BUF_EMPTY_STA is redundant, unless
its asynchronous operation that need to be polled. Possibly something to
investigate. RKVDEC_BUF_EMPTY_STA and RKVDEC_COLMV_REF_ERR_STA are not
documented a such, so its not quite logical to reprogram the iommu.

I don't immediately trust reference software for these type of things, we should
find what works best and have a rationale for. The hard reset is every
expensive, and hard to upstream.

Nicolas

> 
> [1]
> https://github.com/Kwiboo/linux-rockchip/blob/linux-6.1-stan-rkr6.1/drivers/video/rockchip/mpp/mpp_rkvdec.c#L924-L931
> 
> Regards,
> Jonas
> 
> > 
> > Nicolas

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2025-08-12 18:26 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-10 21:24 [PATCH v2 0/7] media: rkvdec: Add HEVC backend Jonas Karlman
2025-08-10 21:24 ` [PATCH v2 1/7] " Jonas Karlman
2025-08-11 19:12   ` Nicolas Dufresne
2025-08-11 19:46     ` Jonas Karlman
2025-08-11 20:27       ` Nicolas Dufresne
2025-08-11 21:07   ` Nicolas Dufresne
2025-08-12  0:58     ` Jonas Karlman
2025-08-12 13:07       ` Nicolas Dufresne
2025-08-12 19:54         ` Detlev Casanova
2025-08-17 16:39           ` Jonas Karlman
2025-08-18  8:25             ` Detlev Casanova
2025-08-12 20:10   ` Detlev Casanova
2025-08-17 16:46     ` Jonas Karlman
2025-08-29 20:22   ` Nicolas Dufresne
2025-09-03  7:28     ` Jonas Karlman
2025-09-03 13:44       ` Nicolas Dufresne
2025-08-10 21:24 ` [PATCH v2 2/7] media: rkvdec: Add variants support Jonas Karlman
2025-08-11 21:11   ` Nicolas Dufresne
2025-08-10 21:24 ` [PATCH v2 3/7] media: rkvdec: Implement capability filtering Jonas Karlman
2025-08-11 21:17   ` Nicolas Dufresne
2025-08-10 21:24 ` [PATCH v2 4/7] media: rkvdec: Add RK3288 variant Jonas Karlman
2025-08-11 21:17   ` Nicolas Dufresne
2025-08-10 21:24 ` [PATCH v2 5/7] media: rkvdec: Disable QoS for HEVC and VP9 on RK3328 Jonas Karlman
2025-08-11 21:25   ` Nicolas Dufresne
2025-08-11 22:22     ` Jonas Karlman
2025-08-12 12:47       ` Nicolas Dufresne
2025-08-11 23:08     ` Jonas Karlman
2025-08-12 13:00       ` Nicolas Dufresne
2025-08-17 16:18         ` Jonas Karlman
2025-08-10 21:24 ` [PATCH v2 6/7] media: dt-bindings: rockchip,vdec: Add RK3288 compatible Jonas Karlman
2025-08-10 21:24 ` [PATCH v2 7/7] ARM: dts: rockchip: Add vdec node for RK3288 Jonas Karlman
2025-08-11 21:52 ` [PATCH v2 0/7] media: rkvdec: Add HEVC backend Nicolas Dufresne
2025-08-12  0:00   ` Jonas Karlman
2025-08-12 12:38     ` Nicolas Dufresne
2025-08-12 12:44       ` Nicolas Dufresne
2025-08-12 17:31         ` Jonas Karlman
2025-08-12 18:26           ` Nicolas Dufresne [this message]
2025-08-12 18:52             ` Nicolas Dufresne
2025-08-17 16:33             ` Jonas Karlman
2025-08-12 19:57   ` Detlev Casanova
2025-08-12 21:11     ` Nicolas Dufresne
2025-08-12 12:11 ` Diederik de Haas
2025-08-12 12:55   ` Diederik de Haas
2025-08-12 13:27     ` Nicolas Dufresne
2025-08-12 14:09       ` Diederik de Haas
2025-08-14 21:25       ` Alex Bee
2025-08-12 17:11   ` Jonas Karlman
2025-08-12 18:28     ` Diederik de Haas

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=25ce30446e8e8d038273fcdfb398c90995c242db.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=detlev.casanova@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=jonas@kwiboo.se \
    --cc=knaerzche@gmail.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 \
    /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;
as well as URLs for NNTP newsgroup(s).