Re: [PATCH] CMA: Don't return a valid cma for non-cma dev

Michal Nazarewicz
2015-07-31T17:46:37Z

On Fri, Jul 31 2015, Feng Tang wrote:
> Maybe I didn't make my problem clear, for our platform, we do need to
> use cma as we have camera ISP which has no IOMMU, so we cannot set
> "cma=0".

Then specify a CMA region for the camera in platform initialisation code
or device trees or whatever else is the rave nowadays.

I’m assuming that you have a piece of code (or configuration of some
sort) that assigns a CMA region to the device (otherwise ‘dev->cma_area’
would be NULL and your patch would just always get you NULL CMA area).
Simply create a CMA area there and assign it to the device.

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--