[PATCH 05/48] drm: omapdrm: dss: Set the DMA coherent mask

Sebastian Reichel sebastian.reichel at collabora.co.uk
Sat Oct 14 12:24:05 UTC 2017


Hi,

On Fri, Oct 13, 2017 at 05:59:01PM +0300, Laurent Pinchart wrote:
> 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 <laurent.pinchart at ideasonboard.com>

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>

-- Sebastian

> ---
>  drivers/gpu/drm/omapdrm/dss/dss.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 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 <linux/debugfs.h>
> +#include <linux/dma-mapping.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/io.h>
> @@ -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.
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171014/bf781811/attachment-0001.sig>


More information about the dri-devel mailing list