RE: [PATCH v2 1/2] dmaengine: xilinx: dpdma: Fix race condition in vsync IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Hi Tomi,

> -----Original Message-----
> From: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> Sent: Tuesday, March 12, 2024 1:34 AM
> To: Sagar, Vishal <vishal.sagar@xxxxxxx>;
> laurent.pinchart@xxxxxxxxxxxxxxxx; vkoul@xxxxxxxxxx
> Cc: Simek, Michal <michal.simek@xxxxxxx>; dmaengine@xxxxxxxxxxxxxxx;
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> Allagadapa, Varunkumar <varunkumar.allagadapa@xxxxxxx>
> Subject: Re: [PATCH v2 1/2] dmaengine: xilinx: dpdma: Fix race condition in
> vsync IRQ
>
> Hi,
>
> On 28/02/2024 06:21, Vishal Sagar wrote:
> > From: Neel Gandhi <neel.gandhi@xxxxxxxxxx>
> >
> > The vchan_next_desc() function, called from
> > xilinx_dpdma_chan_queue_transfer(), must be called with
> > virt_dma_chan.lock held. This isn't correctly handled in all code paths,
> > resulting in a race condition between the .device_issue_pending()
> > handler and the IRQ handler which causes DMA to randomly stop. Fix it by
> > taking the lock around xilinx_dpdma_chan_queue_transfer() calls that are
> > missing it.
> >
> > Signed-off-by: Neel Gandhi <neel.gandhi@xxxxxxx>
> > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> > Signed-off-by: Vishal Sagar <vishal.sagar@xxxxxxx>
> >
> > Link: https://lore.kernel.org/all/20220122121407.11467-1-
> neel.gandhi@xxxxxxxxxx
> > ---
> >   drivers/dma/xilinx/xilinx_dpdma.c | 10 ++++++++--
> >   1 file changed, 8 insertions(+), 2 deletions(-)
>
> This fixes a lockdep warning:
>
> WARNING: CPU: 1 PID: 466 at drivers/dma/xilinx/xilinx_dpdma.c:834
>
> Afaics, this issue has been around since the initial commit, in v5.10,
> and the fix applies on top of v5.10. I have tested this on v6.2, which
> is where the DP support was added to the board I have.
>
> So I think you can add:
>
> Fixes: 7cbb0c63de3f ("dmaengine: xilinx: dpdma: Add the Xilinx
> DisplayPort DMA engine driver")
>
>   Tomi
>

<snip>

Thanks for going through the patch.
I will add this to the commit message and resend v3.
I am still waiting for more reviews to happen.

Regards
Vishal Sagar




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux