gpu: ion: Fix cached and uncached mapping in carveout heap
gpu: ion: Add O_DSYNC flag to generated file

Ion uses the O_DSYNC flag of a file to indicate an uncached mapping.
When generating a file for mmaping, the new file needs to have the
same O_DSYNC flag as the parent (the file of the ioctl open call)
to indicate if the mapping should be cached or uncached.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
gpu: ion: Move initialization earlier

Ion needs to be initialized before most other subsystems.
Move the call to be earlier to ensure drivers that need to
allocate memory at bootup can.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
gpu: ion: Add API to get the buffer flags

Clients may want to know what the existing flags are on a
handle for mapping, cache flushing or other purposes. Add
an API to get those flags.

Change-Id: I2d8c93194d1fc940042529b8851ebecf35d6e3de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
gpu: ion: Add inline stubs for Ion functions

Add inline stubs for in-kernel Ion functions to use when
Ion is not enabled in the kernel config.

Change-Id: Ic0dedbadbe4d7bab8f24763e67dd775c769b06df
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>