[PATCH v4 0/3] Fix concurrency issues between G1 and G2 on

ming.qian@oss.nxp.com posted 3 patches 2 months ago
drivers/media/platform/verisilicon/hantro.h   |  2 +
.../media/platform/verisilicon/hantro_drv.c   | 42 +++++++++++++++++--
.../media/platform/verisilicon/imx8m_vpu_hw.c |  8 ++++
drivers/media/v4l2-core/v4l2-mem2mem.c        | 23 ++++++++++
drivers/pmdomain/imx/imx8m-blk-ctrl.c         | 11 +++--
include/media/v4l2-mem2mem.h                  | 21 ++++++++++
6 files changed, 100 insertions(+), 7 deletions(-)
[PATCH v4 0/3] Fix concurrency issues between G1 and G2 on
Posted by ming.qian@oss.nxp.com 2 months ago
From: Ming Qian <ming.qian@oss.nxp.com>

On the i.MX8MQ, we encountered some concurrency issues with H264 and HEVC
decoding.

There are two main reasons:
1. The vpu blk-ctrl don't have separate reset and clock enable bits.
2. The g1 VPU and g2 VPU cannot decode simultaneously.

We attempted to make corresponding fix to address these two issues.

Ming Qian (2):
  pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu
  media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC

Nicolas Dufresne (1):
  media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure

 drivers/media/platform/verisilicon/hantro.h   |  2 +
 .../media/platform/verisilicon/hantro_drv.c   | 42 +++++++++++++++++--
 .../media/platform/verisilicon/imx8m_vpu_hw.c |  8 ++++
 drivers/media/v4l2-core/v4l2-mem2mem.c        | 23 ++++++++++
 drivers/pmdomain/imx/imx8m-blk-ctrl.c         | 11 +++--
 include/media/v4l2-mem2mem.h                  | 21 ++++++++++
 6 files changed, 100 insertions(+), 7 deletions(-)

-- 
2.52.0
Re: [PATCH v4 0/3] Fix concurrency issues between G1 and G2 on
Posted by Ulf Hansson 1 month, 1 week ago
On Fri, 5 Dec 2025 at 02:55, <ming.qian@oss.nxp.com> wrote:
>
> From: Ming Qian <ming.qian@oss.nxp.com>
>
> On the i.MX8MQ, we encountered some concurrency issues with H264 and HEVC
> decoding.
>
> There are two main reasons:
> 1. The vpu blk-ctrl don't have separate reset and clock enable bits.
> 2. The g1 VPU and g2 VPU cannot decode simultaneously.
>
> We attempted to make corresponding fix to address these two issues.
>
> Ming Qian (2):
>   pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu
>   media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
>
> Nicolas Dufresne (1):
>   media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure
>
>  drivers/media/platform/verisilicon/hantro.h   |  2 +
>  .../media/platform/verisilicon/hantro_drv.c   | 42 +++++++++++++++++--
>  .../media/platform/verisilicon/imx8m_vpu_hw.c |  8 ++++
>  drivers/media/v4l2-core/v4l2-mem2mem.c        | 23 ++++++++++
>  drivers/pmdomain/imx/imx8m-blk-ctrl.c         | 11 +++--
>  include/media/v4l2-mem2mem.h                  | 21 ++++++++++
>  6 files changed, 100 insertions(+), 7 deletions(-)
>

Can I pick the pmdomain patch separately from the others? Or does this
need to go together?

Kind regards
Uffe
Re: [PATCH v4 0/3] Fix concurrency issues between G1 and G2 on
Posted by Nicolas Dufresne 1 month ago
Hi,

Le mardi 30 décembre 2025 à 14:42 +0100, Ulf Hansson a écrit :
> On Fri, 5 Dec 2025 at 02:55, <ming.qian@oss.nxp.com> wrote:
> > 
> > From: Ming Qian <ming.qian@oss.nxp.com>
> > 
> > On the i.MX8MQ, we encountered some concurrency issues with H264 and HEVC
> > decoding.
> > 
> > There are two main reasons:
> > 1. The vpu blk-ctrl don't have separate reset and clock enable bits.
> > 2. The g1 VPU and g2 VPU cannot decode simultaneously.
> > 
> > We attempted to make corresponding fix to address these two issues.
> > 
> > Ming Qian (2):
> >   pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu
> >   media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
> > 
> > Nicolas Dufresne (1):
> >   media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure
> > 
> >  drivers/media/platform/verisilicon/hantro.h   |  2 +
> >  .../media/platform/verisilicon/hantro_drv.c   | 42 +++++++++++++++++--
> >  .../media/platform/verisilicon/imx8m_vpu_hw.c |  8 ++++
> >  drivers/media/v4l2-core/v4l2-mem2mem.c        | 23 ++++++++++
> >  drivers/pmdomain/imx/imx8m-blk-ctrl.c         | 11 +++--
> >  include/media/v4l2-mem2mem.h                  | 21 ++++++++++
> >  6 files changed, 100 insertions(+), 7 deletions(-)
> > 
> 
> Can I pick the pmdomain patch separately from the others? Or does this
> need to go together?

I believe you did already, and its perfect, we have picked the rest in the media
tree now.

regards,
Nicolas
Re: [PATCH v4 0/3] Fix concurrency issues between G1 and G2 on
Posted by Ming Qian(OSS) 1 month, 1 week ago
Hi Uffe,

On 12/30/2025 9:42 PM, Ulf Hansson wrote:
> On Fri, 5 Dec 2025 at 02:55, <ming.qian@oss.nxp.com> wrote:
>>
>> From: Ming Qian <ming.qian@oss.nxp.com>
>>
>> On the i.MX8MQ, we encountered some concurrency issues with H264 and HEVC
>> decoding.
>>
>> There are two main reasons:
>> 1. The vpu blk-ctrl don't have separate reset and clock enable bits.
>> 2. The g1 VPU and g2 VPU cannot decode simultaneously.
>>
>> We attempted to make corresponding fix to address these two issues.
>>
>> Ming Qian (2):
>>    pmdomain: imx8m-blk-ctrl: Remove separate rst and clk mask for 8mq vpu
>>    media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
>>
>> Nicolas Dufresne (1):
>>    media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure
>>
>>   drivers/media/platform/verisilicon/hantro.h   |  2 +
>>   .../media/platform/verisilicon/hantro_drv.c   | 42 +++++++++++++++++--
>>   .../media/platform/verisilicon/imx8m_vpu_hw.c |  8 ++++
>>   drivers/media/v4l2-core/v4l2-mem2mem.c        | 23 ++++++++++
>>   drivers/pmdomain/imx/imx8m-blk-ctrl.c         | 11 +++--
>>   include/media/v4l2-mem2mem.h                  | 21 ++++++++++
>>   6 files changed, 100 insertions(+), 7 deletions(-)
>>
> 
> Can I pick the pmdomain patch separately from the others? Or does this
> need to go together?
> 
> Kind regards
> Uffe

I think you can pick the pmdomain patch separately.

Regards,
Ming