[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241104-rp1-cfe-fixes-seg-size-v2-1-2afd9f6f9fac@ideasonboard.com>
Date: Mon, 04 Nov 2024 09:47:54 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Raspberry Pi Kernel Maintenance <kernel-list@...pberrypi.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Naushir Patuck <naush@...pberrypi.com>, Hans Verkuil <hverkuil@...all.nl>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-media@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Subject: [PATCH v2] media: raspberrypi: cfe: Fix mapping of dmabuf buffers
When using buffers from DRM, DMA-API gives a warning about: "mapping sg
segment longer than device claims to support [len=307200] [max=65536]"
Add a call to vb2_dma_contig_set_max_seg_size() to tell the DMA-API
about the supported segment size (which is UINT_MAX).
Fixes: 6edb685abb2a ("media: raspberrypi: Add support for RP1-CFE")
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
---
Changes in v2:
- Drop the error print, as vb2_dma_contig_set_max_seg_size() already
prints one.
- Link to v1: https://lore.kernel.org/r/20241101-rp1-cfe-fixes-seg-size-v1-1-0aacf2da56e5@ideasonboard.com
---
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
index da9e1a1e4d0d..e808c80cd37c 100644
--- a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
+++ b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
@@ -2341,6 +2341,10 @@ static int cfe_probe(struct platform_device *pdev)
goto err_cfe_put;
}
+ ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, UINT_MAX);
+ if (ret)
+ goto err_cfe_put;
+
/* TODO: Enable clock only when running. */
cfe->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(cfe->clk))
---
base-commit: c7ccf3683ac9746b263b0502255f5ce47f64fe0a
change-id: 20241101-rp1-cfe-fixes-seg-size-b70309da74a2
Best regards,
--
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Powered by blists - more mailing lists