i2c: qup: use the complete transfer length to choose DMA mode
authorAbhishek Sahu <absahu@codeaurora.org>
Mon, 12 Mar 2018 13:14:57 +0000 (18:44 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 24 Mar 2018 12:20:09 +0000 (13:20 +0100)
commit08f15963bc751bc818294c0f75a9aaca299c4052
treef3aba4bdc2c882b5716c6c5728dce79b7f9bfc3f
parent3f450d3eea14799b14192231840c1753a660f150
i2c: qup: use the complete transfer length to choose DMA mode

Currently each message length in complete transfer is being
checked for determining DMA mode and if any of the message length
is less than FIFO length then non DMA mode is being used which
will increase overhead. DMA can be used for any length and it
should be determined with complete transfer length. Now, this
patch selects DMA mode if the total length is greater than FIFO
length.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Reviewed-by: Austin Christ <austinwc@codeaurora.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-qup.c