From: Thierry Reding Date: Fri, 8 Feb 2019 12:10:41 +0000 (+0100) Subject: drm/tegra: vic: Inherit DMA mask from host1x X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d5ad0e3dfe74f465a218bde84efb25c72b3e51c4;p=linux.git drm/tegra: vic: Inherit DMA mask from host1x VIC, just like all other host1x clients, has the same addressing range as its parent host1x device. Inherit the DMA mask to reflect that. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index 748798f2cdc82..d60e479cde92c 100644 --- a/drivers/gpu/drm/tegra/vic.c +++ b/drivers/gpu/drm/tegra/vic.c @@ -385,6 +385,13 @@ static int vic_probe(struct platform_device *pdev) struct vic *vic; int err; + /* inherit DMA mask from host1x parent */ + err = dma_coerce_mask_and_coherent(dev, *dev->parent->dma_mask); + if (err < 0) { + dev_err(&pdev->dev, "failed to set DMA mask: %d\n", err); + return err; + } + vic = devm_kzalloc(dev, sizeof(*vic), GFP_KERNEL); if (!vic) return -ENOMEM;