From: Laurent Pinchart Date: Fri, 13 Oct 2017 14:59:01 +0000 (+0300) Subject: drm: omapdrm: dss: Set the DMA coherent mask X-Git-Tag: v4.16-rc1~31^2~24^2~10 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a921c1a8ed96ecc4257be487cc582440dffe71e1;p=uclinux-h8%2Flinux.git drm: omapdrm: dss: Set the DMA coherent mask When merging the omapdrm and omapdss drivers the omapdrm virtual platform device will disappear, and the omapdss platform device will be used for DMA memory allocation. To prepare for that, set the DMA coherent mask for the device. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index d1755f12236b..6ce26a4b93b3 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -23,6 +23,7 @@ #define DSS_SUBSYS_NAME "DSS" #include +#include #include #include #include @@ -1441,6 +1442,12 @@ static int dss_probe(struct platform_device *pdev) dss.pdev = pdev; + r = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (r) { + dev_err(&pdev->dev, "Failed to set the DMA mask\n"); + return r; + } + /* * The various OMAP3-based SoCs can't be told apart using the compatible * string, use SoC device matching.