[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 44/48] bcm2835_dma: Re-initialize xlen in TD mode
From: |
Peter Maydell |
Subject: |
[PULL 44/48] bcm2835_dma: Re-initialize xlen in TD mode |
Date: |
Fri, 7 Feb 2020 14:33:39 +0000 |
From: Rene Stange <address@hidden>
TD (two dimensions) DMA mode did not work, because the xlen variable
has not been re-initialized before each additional ylen run through
in bcm2835_dma_update(). Fix it.
Signed-off-by: Rene Stange <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
hw/dma/bcm2835_dma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c
index 667d951a6f7..ccff5ed55b2 100644
--- a/hw/dma/bcm2835_dma.c
+++ b/hw/dma/bcm2835_dma.c
@@ -54,7 +54,7 @@
static void bcm2835_dma_update(BCM2835DMAState *s, unsigned c)
{
BCM2835DMAChan *ch = &s->chan[c];
- uint32_t data, xlen, ylen;
+ uint32_t data, xlen, xlen_td, ylen;
int16_t dst_stride, src_stride;
if (!(s->enable & (1 << c))) {
@@ -82,6 +82,7 @@ static void bcm2835_dma_update(BCM2835DMAState *s, unsigned c)
dst_stride = 0;
src_stride = 0;
}
+ xlen_td = xlen;
while (ylen != 0) {
/* Normal transfer mode */
@@ -117,6 +118,7 @@ static void bcm2835_dma_update(BCM2835DMAState *s, unsigned
c)
if (--ylen != 0) {
ch->source_ad += src_stride;
ch->dest_ad += dst_stride;
+ xlen = xlen_td;
}
}
ch->cs |= BCM2708_DMA_END;
--
2.20.1
- [PULL 34/48] target/arm: Update {fp,sve}_exception_el for VHE, (continued)
- [PULL 34/48] target/arm: Update {fp,sve}_exception_el for VHE, Peter Maydell, 2020/02/07
- [PULL 35/48] target/arm: check TGE and E2H flags for EL0 pauth traps, Peter Maydell, 2020/02/07
- [PULL 36/48] target/arm: Update get_a64_user_mem_index for VHE, Peter Maydell, 2020/02/07
- [PULL 38/48] target/arm: Enable ARMv8.1-VHE in -cpu max, Peter Maydell, 2020/02/07
- [PULL 37/48] target/arm: Update arm_cpu_do_interrupt_aarch64 for VHE, Peter Maydell, 2020/02/07
- [PULL 40/48] target/arm: Pass more cpu state to arm_excp_unmasked, Peter Maydell, 2020/02/07
- [PULL 41/48] target/arm: Use bool for unmasked in arm_excp_unmasked, Peter Maydell, 2020/02/07
- [PULL 43/48] bcm2835_dma: Fix the ylen loop in TD mode, Peter Maydell, 2020/02/07
- [PULL 39/48] target/arm: Move arm_excp_unmasked to cpu.c, Peter Maydell, 2020/02/07
- [PULL 42/48] target/arm: Raise only one interrupt in arm_cpu_exec_interrupt, Peter Maydell, 2020/02/07
- [PULL 44/48] bcm2835_dma: Re-initialize xlen in TD mode,
Peter Maydell <=
- [PULL 45/48] docs/arm-cpu-features: Make kvm-no-adjvtime comment clearer, Peter Maydell, 2020/02/07
- [PULL 46/48] armv7m_systick: delay timer_new to avoid memleaks, Peter Maydell, 2020/02/07
- [PULL 47/48] stm32f2xx_timer: delay timer_new to avoid memleaks, Peter Maydell, 2020/02/07
- [PULL 48/48] stellaris: delay timer_new to avoid memleaks, Peter Maydell, 2020/02/07
- Re: [PULL 00/48] target-arm queue, Peter Maydell, 2020/02/10