firmware-utils: bump to git HEAD
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0349-drm-v3d-Set-dma_mask-as-well-as-coherent_dma_mask.patch
1 From 159ccf0090f202cf031fa429df22e8b3f775ece8 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 22 Nov 2019 16:23:32 +0000
4 Subject: [PATCH] drm/v3d: Set dma_mask as well as coherent_dma_mask
5
6 Both coherent_dma_mask and dma_mask act as constraints on allocations
7 and bounce buffer usage, so be sure to set dma_mask to the appropriate
8 value otherwise the effective mask could be incorrect.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
11 ---
12 drivers/gpu/drm/v3d/v3d_drv.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 --- a/drivers/gpu/drm/v3d/v3d_drv.c
16 +++ b/drivers/gpu/drm/v3d/v3d_drv.c
17 @@ -259,8 +259,8 @@ static int v3d_platform_drm_probe(struct
18 goto dev_free;
19
20 mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
21 - dev->coherent_dma_mask =
22 - DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
23 + dma_set_mask_and_coherent(dev,
24 + DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH)));
25 v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH);
26
27 ident1 = V3D_READ(V3D_HUB_IDENT1);