Skip to content

Commit d98914e

Browse files
committed
gpu: host1x: Do not limit DMA segment size
host1x nor any its clients have any limitations on the DMA segment size, so don't pretend that they do. Signed-off-by: Thierry Reding <treding@nvidia.com>
1 parent 004e822 commit d98914e

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/gpu/host1x/bus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static int host1x_device_add(struct host1x *host1x,
445445
of_dma_configure(&device->dev, host1x->dev->of_node, true);
446446

447447
device->dev.dma_parms = &device->dma_parms;
448-
dma_set_max_seg_size(&device->dev, SZ_4M);
448+
dma_set_max_seg_size(&device->dev, UINT_MAX);
449449

450450
err = host1x_device_parse_dt(device, driver);
451451
if (err < 0) {

‎drivers/gpu/host1x/dev.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ static int host1x_probe(struct platform_device *pdev)
237237
return PTR_ERR(host->hv_regs);
238238
}
239239

240+
host->dev->dma_parms = &host->dma_parms;
241+
dma_set_max_seg_size(host->dev, UINT_MAX);
242+
240243
dma_set_mask_and_coherent(host->dev, host->info->dma_mask);
241244

242245
if (host->info->init) {

‎drivers/gpu/host1x/dev.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ struct host1x {
140140
struct list_head devices;
141141

142142
struct list_head list;
143+
144+
struct device_dma_parameters dma_parms;
143145
};
144146

145147
void host1x_hypervisor_writel(struct host1x *host1x, u32 r, u32 v);

0 commit comments

Comments
 (0)