From: Greg Kroah-Hartman Date: Mon, 18 Dec 2017 14:08:48 +0000 (+0100) Subject: drop dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch X-Git-Tag: v3.18.89~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=009ec3fc1b8b49b668e1133ebee6f3adfb693267;p=thirdparty%2Fkernel%2Fstable-queue.git drop dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch --- diff --git a/queue-4.14/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch b/queue-4.14/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch deleted file mode 100644 index 1de75886559..00000000000 --- a/queue-4.14/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch +++ /dev/null @@ -1,68 +0,0 @@ -From foo@baz Mon Dec 18 13:28:59 CET 2017 -From: Hiroyuki Yokoyama -Date: Thu, 19 Oct 2017 01:15:13 +0000 -Subject: dmaengine: rcar-dmac: use TCRB instead of TCR for residue - -From: Hiroyuki Yokoyama - - -[ Upstream commit 847449f23dcbff68234525f90dd53c7c7db18cad ] - -SYS/RT/Audio DMAC includes independent data buffers for reading -and writing. Therefore, the read transfer counter and write transfer -counter have different values. -TCR indicates read counter, and TCRB indicates write counter. -The relationship is like below. - - TCR TCRB -[SOURCE] -> [DMAC] -> [SINK] - -In the MEM_TO_DEV direction, what really matters is how much data has -been written to the device. If the DMA is interrupted between read and -write, then, the data doesn't end up in the destination, so shouldn't -be counted. TCRB is thus the register we should use in this cases. - -In the DEV_TO_MEM direction, the situation is more complex. Both the -read and write side are important. What matters from a data consumer -point of view is how much data has been written to memory. -On the other hand, if the transfer is interrupted between read and -write, we'll end up losing data. It can also be important to report. - -In the MEM_TO_MEM direction, what matters is of course how much data -has been written to memory from data consumer point of view. -Here, because read and write have independent data buffers, it will -take a while for TCR and TCRB to become equal. Thus we should check -TCRB in this case, too. - -Thus, all cases we should check TCRB instead of TCR. - -Without this patch, Sound Capture has noise after PluseAudio support -(= 07b7acb51d2 ("ASoC: rsnd: update pointer more accurate")), because -the recorder will use wrong residue counter which indicates transferred -from sound device, but in reality the data was not yet put to memory -and recorder will record it. - -Signed-off-by: Hiroyuki Yokoyama -[Kuninori: added detail information in log] -Signed-off-by: Kuninori Morimoto -Reviewed-by: Geert Uytterhoeven -Reviewed-by: Laurent Pinchart -Signed-off-by: Vinod Koul - -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/dma/sh/rcar-dmac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/dma/sh/rcar-dmac.c -+++ b/drivers/dma/sh/rcar-dmac.c -@@ -1310,7 +1310,7 @@ static unsigned int rcar_dmac_chan_get_r - } - - /* Add the residue for the current chunk. */ -- residue += rcar_dmac_chan_read(chan, RCAR_DMATCR) << desc->xfer_shift; -+ residue += rcar_dmac_chan_read(chan, RCAR_DMATCRB) << desc->xfer_shift; - - return residue; - } diff --git a/queue-4.14/series b/queue-4.14/series index 609b9e97b7c..469ddb82c9d 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -142,7 +142,6 @@ soc-mediatek-pwrap-fix-compiler-errors.patch ipv4-ipv4_default_advmss-should-use-route-mtu.patch kvm-nvmx-fix-ept-switching-advertising.patch tty-fix-oops-when-rmmod-8250.patch -dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch dev-dax-fix-uninitialized-variable-build-warning.patch pinctrl-adi2-fix-kconfig-build-problem.patch raid5-set-r5_expanded-on-parity-devices-as-well-as-data.patch diff --git a/queue-4.4/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch b/queue-4.4/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch deleted file mode 100644 index 0fb8dc5f46b..00000000000 --- a/queue-4.4/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch +++ /dev/null @@ -1,68 +0,0 @@ -From foo@baz Mon Dec 18 14:47:43 CET 2017 -From: Hiroyuki Yokoyama -Date: Thu, 19 Oct 2017 01:15:13 +0000 -Subject: dmaengine: rcar-dmac: use TCRB instead of TCR for residue - -From: Hiroyuki Yokoyama - - -[ Upstream commit 847449f23dcbff68234525f90dd53c7c7db18cad ] - -SYS/RT/Audio DMAC includes independent data buffers for reading -and writing. Therefore, the read transfer counter and write transfer -counter have different values. -TCR indicates read counter, and TCRB indicates write counter. -The relationship is like below. - - TCR TCRB -[SOURCE] -> [DMAC] -> [SINK] - -In the MEM_TO_DEV direction, what really matters is how much data has -been written to the device. If the DMA is interrupted between read and -write, then, the data doesn't end up in the destination, so shouldn't -be counted. TCRB is thus the register we should use in this cases. - -In the DEV_TO_MEM direction, the situation is more complex. Both the -read and write side are important. What matters from a data consumer -point of view is how much data has been written to memory. -On the other hand, if the transfer is interrupted between read and -write, we'll end up losing data. It can also be important to report. - -In the MEM_TO_MEM direction, what matters is of course how much data -has been written to memory from data consumer point of view. -Here, because read and write have independent data buffers, it will -take a while for TCR and TCRB to become equal. Thus we should check -TCRB in this case, too. - -Thus, all cases we should check TCRB instead of TCR. - -Without this patch, Sound Capture has noise after PluseAudio support -(= 07b7acb51d2 ("ASoC: rsnd: update pointer more accurate")), because -the recorder will use wrong residue counter which indicates transferred -from sound device, but in reality the data was not yet put to memory -and recorder will record it. - -Signed-off-by: Hiroyuki Yokoyama -[Kuninori: added detail information in log] -Signed-off-by: Kuninori Morimoto -Reviewed-by: Geert Uytterhoeven -Reviewed-by: Laurent Pinchart -Signed-off-by: Vinod Koul - -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/dma/sh/rcar-dmac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/dma/sh/rcar-dmac.c -+++ b/drivers/dma/sh/rcar-dmac.c -@@ -1180,7 +1180,7 @@ static unsigned int rcar_dmac_chan_get_r - } - - /* Add the residue for the current chunk. */ -- residue += rcar_dmac_chan_read(chan, RCAR_DMATCR) << desc->xfer_shift; -+ residue += rcar_dmac_chan_read(chan, RCAR_DMATCRB) << desc->xfer_shift; - - return residue; - } diff --git a/queue-4.4/series b/queue-4.4/series index f5c588f0c77..048903b4ae8 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -100,7 +100,6 @@ scsi-hpsa-cleanup-sas_phy-structures-in-sysfs-when-unloading.patch scsi-hpsa-destroy-sas-transport-properties-before-scsi_host.patch powerpc-perf-hv-24x7-fix-incorrect-comparison-in-memord.patch tty-fix-oops-when-rmmod-8250.patch -dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch pinctrl-adi2-fix-kconfig-build-problem.patch raid5-set-r5_expanded-on-parity-devices-as-well-as-data.patch scsi-scsi_devinfo-add-reportlun2-to-emc-symmetrix-blacklist-entry.patch diff --git a/queue-4.9/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch b/queue-4.9/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch deleted file mode 100644 index f1ef3ed21f1..00000000000 --- a/queue-4.9/dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch +++ /dev/null @@ -1,68 +0,0 @@ -From foo@baz Mon Dec 18 14:12:35 CET 2017 -From: Hiroyuki Yokoyama -Date: Thu, 19 Oct 2017 01:15:13 +0000 -Subject: dmaengine: rcar-dmac: use TCRB instead of TCR for residue - -From: Hiroyuki Yokoyama - - -[ Upstream commit 847449f23dcbff68234525f90dd53c7c7db18cad ] - -SYS/RT/Audio DMAC includes independent data buffers for reading -and writing. Therefore, the read transfer counter and write transfer -counter have different values. -TCR indicates read counter, and TCRB indicates write counter. -The relationship is like below. - - TCR TCRB -[SOURCE] -> [DMAC] -> [SINK] - -In the MEM_TO_DEV direction, what really matters is how much data has -been written to the device. If the DMA is interrupted between read and -write, then, the data doesn't end up in the destination, so shouldn't -be counted. TCRB is thus the register we should use in this cases. - -In the DEV_TO_MEM direction, the situation is more complex. Both the -read and write side are important. What matters from a data consumer -point of view is how much data has been written to memory. -On the other hand, if the transfer is interrupted between read and -write, we'll end up losing data. It can also be important to report. - -In the MEM_TO_MEM direction, what matters is of course how much data -has been written to memory from data consumer point of view. -Here, because read and write have independent data buffers, it will -take a while for TCR and TCRB to become equal. Thus we should check -TCRB in this case, too. - -Thus, all cases we should check TCRB instead of TCR. - -Without this patch, Sound Capture has noise after PluseAudio support -(= 07b7acb51d2 ("ASoC: rsnd: update pointer more accurate")), because -the recorder will use wrong residue counter which indicates transferred -from sound device, but in reality the data was not yet put to memory -and recorder will record it. - -Signed-off-by: Hiroyuki Yokoyama -[Kuninori: added detail information in log] -Signed-off-by: Kuninori Morimoto -Reviewed-by: Geert Uytterhoeven -Reviewed-by: Laurent Pinchart -Signed-off-by: Vinod Koul - -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/dma/sh/rcar-dmac.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/dma/sh/rcar-dmac.c -+++ b/drivers/dma/sh/rcar-dmac.c -@@ -1289,7 +1289,7 @@ static unsigned int rcar_dmac_chan_get_r - } - - /* Add the residue for the current chunk. */ -- residue += rcar_dmac_chan_read(chan, RCAR_DMATCR) << desc->xfer_shift; -+ residue += rcar_dmac_chan_read(chan, RCAR_DMATCRB) << desc->xfer_shift; - - return residue; - } diff --git a/queue-4.9/series b/queue-4.9/series index d8529eacb78..0a1e289aa48 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -158,7 +158,6 @@ scsi-hpsa-destroy-sas-transport-properties-before-scsi_host.patch powerpc-perf-hv-24x7-fix-incorrect-comparison-in-memord.patch soc-mediatek-pwrap-fix-compiler-errors.patch tty-fix-oops-when-rmmod-8250.patch -dmaengine-rcar-dmac-use-tcrb-instead-of-tcr-for-residue.patch pinctrl-adi2-fix-kconfig-build-problem.patch raid5-set-r5_expanded-on-parity-devices-as-well-as-data.patch scsi-scsi_devinfo-add-reportlun2-to-emc-symmetrix-blacklist-entry.patch