RE: [PATCH v2 2/7] media: chips-media: wave5: Improve performance of decoder
From: jackson . lee
Date: Mon Jun 09 2025 - 04:48:11 EST
Hi Nicolas
I will find the way to reduce overhead after receiving the STOP_CMD.
thanks
> -----Original Message-----
> From: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
> Sent: Thursday, June 5, 2025 10:29 PM
> To: jackson.lee <jackson.lee@xxxxxxxxxxxxxxx>; mchehab@xxxxxxxxxx;
> hverkuil-cisco@xxxxxxxxx; bob.beckett@xxxxxxxxxxxxx
> Cc: linux-media@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; lafley.kim
> <lafley.kim@xxxxxxxxxxxxxxx>; b-brnich@xxxxxx; hverkuil@xxxxxxxxx; Nas
> Chung <nas.chung@xxxxxxxxxxxxxxx>
> Subject: Re: [PATCH v2 2/7] media: chips-media: wave5: Improve performance
> of decoder
>
> Hi,
>
> Le jeudi 05 juin 2025 à 04:50 +0000, jackson.lee a écrit :
> > > So my question is, is there a way to know, at CMD_STOP call, that
> > > the HW has gone idle, and that no more events will allow handling the
> EOS case?
> > >
> > > Nicolas
> >
> >
> > Thanks for your reply.
> >
> > Now there is only one thing to know if there is more events or not to
> handle the EOS case.
> > It is that driver sends DEC_PIC command to VPU continuously until
> display index is -2(it means EOS) from VPU.
> > VPU should trigger interrupts to get display index from the
> finish_decode function.
> > So we have to run device_run to send DEC_PIC command.
>
> What don't want to see is a loop where we do:
>
> device_run()
> finish_job()
> device_run()
> finish_job()
> ....
>
> What I see now, is that we simply bang on the trigger until it completes,
> which is very wasteful in power and CPU time. In your next version, make
> sure to find a mitigation to that active loop, and document it please.
>
> Nicolas