Commit eb869b7d authored by Robin Gong's avatar Robin Gong Committed by Nitin Garg
Browse files

MLK-11358-5: dma: imx-sdma: add overide cyclic callback for virtual dma



In some high loading case, some BDs done interrupt may not be handled timely
because of high loading, for example:
1).No.1 BD done interrupt pending.
2).No.2 BD done interrupt trigged, and be handled in time.
3).found No.1 and No.2 bds finished, set BD_DONE to prepare for next time.
4).call vchan_cyclic_callback twice to tasklet_schedule(). But unfortunately,
  only one tasklet can be scheduled one time. And SDMA interrupt will never be
  trigged again for No.2 or No.1 BD. That means one callback loss.

To fix the above case, extend override callback in virt dma framework, so that
sdma driver can do some specific job before every callback:
1).No.1 BD done interrupt pending.
2).No.2 BD done interrupt trigged, and be handled in time.
3).call vchan_cyclic_callback to tasklet_schedule().
4) vchan_complete() call overide_callback
5) found No.1 BD done, set BD_DONE  and call desc->vd.tx.callback
6) found No.2 BD done, set BD_DONE  and call desc->vd.tx.callback, no callback
  missed here.

Signed-off-by: default avatarRobin Gong <b38343@freescale.com>
parent 00617993
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment