[PATCH] drm/etnaviv: init DMA ops for virtual master device

Russell King - ARM Linux linux at armlinux.org.uk
Fri Mar 9 11:34:05 UTC 2018


On Fri, Mar 09, 2018 at 12:20:59PM +0100, Lucas Stach wrote:
> All the DRM GEM dma-buf import/export operations are done through the
> virtual DRM master device. As this isn't instanciated from DT anymore
> we need to make sure the DMA ops are set up correctly.
> 
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index ab50090d066c..d7666aed943b 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -655,7 +655,8 @@ static int etnaviv_pdev_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct component_match *match = NULL;
>  
> -	dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
> +	arch_setup_dma_ops(dev, 0, 0x100000000, NULL, false);
> +	dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));

NAK.  dma_coerce_mask_and_coherent() exists for broken devices.  Please
instead ensure that the device is created with the proper default DMA
mask.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up


More information about the etnaviv mailing list