summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-01-11 12:52:13 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2021-01-11 12:52:13 +0000
commit6f99d037640ef1651496a37746975640c991d86b (patch)
treef4318eadab68f2883e2f55a24280e97324f2cf5f /drivers/dma-buf
parentdb8f6d3f8923c08de8f7a6c63ecb33c4cdac9b3a (diff)
parentb3f656a592f3ade657d14888fd3dc92a14975890 (diff)
Merge tag 'v5.4.87' into 5.4-2.3.x-imx
This is the 5.4.87 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/dma-resv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index 709002515550..242a9ec295cf 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -161,7 +161,7 @@ int dma_resv_reserve_shared(struct dma_resv *obj, unsigned int num_fences)
max = max(old->shared_count + num_fences,
old->shared_max * 2);
} else {
- max = 4;
+ max = max(4ul, roundup_pow_of_two(num_fences));
}
new = dma_resv_list_alloc(max);