[PATCH] drm/etnaviv: select CMA and DMA_CMA if available

Lucas Stach l.stach at pengutronix.de
Mon Jul 17 08:49:53 UTC 2017


Am Sonntag, den 16.07.2017, 16:29 +0100 schrieb Russell King - ARM
Linux:
> On Fri, Jul 14, 2017 at 04:38:01PM +0200, Lucas Stach wrote:
> > While this is no build dependency, etnaviv will only work correctly on most
> > systems if CMA and DMA_CMA are enabled. Select both options if available to
> > avoid users ending up with a non-working GPU due to a lacking kernel config.
> 
> How does merely selecting CMA solve this problem?  Does CMA guarantee
> that GPU command buffers will always be allocated in the lower 2G of
> physical address space?

No, but CMA guarantees that commandbuffers will be allocated from the
region and with the default CMA configuration dma_get_required_mask()
will return the correct location of the CMA area, so we can move the
linear memory window accordingly.
There are no guarantees, but at least with a CMA area no larger than 2GB
things will work for the average user, which is a lot better than
leaving them with a non-working GPU due to a simple missing kernel
configuration option.

Regards,
Lucas



More information about the dri-devel mailing list