0544-fb-Use-correct-bus-address-for-dest-of-dma-memcpy.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. From 02baa554c7768e20668a466b35e479e8454d2d61 Mon Sep 17 00:00:00 2001
  2. From: popcornmix <popcornmix@gmail.com>
  3. Date: Wed, 16 Nov 2016 21:17:27 +0000
  4. Subject: [PATCH] fb: Use correct bus address for dest of dma memcpy
  5. ---
  6. drivers/video/fbdev/bcm2708_fb.c | 4 ++--
  7. 1 file changed, 2 insertions(+), 2 deletions(-)
  8. --- a/drivers/video/fbdev/bcm2708_fb.c
  9. +++ b/drivers/video/fbdev/bcm2708_fb.c
  10. @@ -438,7 +438,7 @@ static void dma_memcpy(struct bcm2708_fb
  11. cb->info = BCM2708_DMA_BURST(burst_size) | BCM2708_DMA_S_WIDTH |
  12. BCM2708_DMA_S_INC | BCM2708_DMA_D_WIDTH |
  13. - BCM2708_DMA_D_INC | BCM2708_DMA_TDMODE;
  14. + BCM2708_DMA_D_INC;
  15. cb->dst = dst;
  16. cb->src = src;
  17. cb->length = size;
  18. @@ -521,7 +521,7 @@ static long vc_mem_copy(struct bcm2708_f
  19. size_t s = min(size, remaining);
  20. unsigned char *p = (unsigned char *)ioparam.src + offset;
  21. unsigned char *q = (unsigned char *)ioparam.dst + offset;
  22. - dma_memcpy(fb, (dma_addr_t)buf, INTALIAS_L1L2_NONALLOCATING((dma_addr_t)p), size);
  23. + dma_memcpy(fb, bus_addr, INTALIAS_L1L2_NONALLOCATING((dma_addr_t)p), size);
  24. if (copy_to_user(q, buf, s) != 0) {
  25. pr_err("[%s]: failed to copy-to-user\n",
  26. __func__);