linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: venus: core: Drop local dma_parms
@ 2020-09-03 21:14 Robin Murphy
  2020-09-04 11:36 ` Kieran Bingham
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Robin Murphy @ 2020-09-03 21:14 UTC (permalink / raw)
  To: stanimir.varbanov, mchehab; +Cc: linux-media, linux-arm-msm

Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms
for platform devices"), struct platform_device already provides a
dma_parms structure, so we can save allocating another one.

Also the DMA segment size is simply a size, not a bitmask.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 drivers/media/platform/qcom/venus/core.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 203c6538044f..2fa9275d75ff 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -226,13 +226,7 @@ static int venus_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (!dev->dma_parms) {
-		dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
-					      GFP_KERNEL);
-		if (!dev->dma_parms)
-			return -ENOMEM;
-	}
-	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
+	dma_set_max_seg_size(dev, UINT_MAX);
 
 	INIT_LIST_HEAD(&core->instances);
 	mutex_init(&core->lock);
-- 
2.28.0.dirty


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-14 16:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 21:14 [PATCH] media: venus: core: Drop local dma_parms Robin Murphy
2020-09-04 11:36 ` Kieran Bingham
2020-09-04 20:26 ` Stanimir Varbanov
2020-09-10 14:36   ` Robin Murphy
2020-10-02  8:06 ` Sai Prakash Ranjan
2020-10-02 11:27   ` Stanimir Varbanov
2020-10-02 12:45     ` Sai Prakash Ranjan
2020-10-06  1:02       ` Stephen Boyd
2020-10-06  5:23         ` Sai Prakash Ranjan
2020-10-14 16:09           ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).