msm: kgsl: Add an option to always enable I/O coherency
Add a Kconfig option to allow the driver to mark all memory buffers
as I/O coherent by default if the target supports I/O coherency.
This is a config option for now because I/O coherency has traditionally
been a little fickle and it represents a paradigm shift to enable it
universally. Eventually the goal is to leave it on by default and invert
the polarity of this option.
In conjunction we can use this option to manage kernel targets that do not
not support fine grained cache operations. Because it is impossible to stop
the user from creating and using cached surfaces the driver has
to either support I/O coherency by default OR have access to fine grained
cache operations. We can take advantage of the new Kconfig option to
make some compile time decisions and compile out the cache code if it isn't
supported.
This isn't 100% foolproof though. If your target doesn't support I/O
coherency and there are no cache operations available you are out of luck,
so as it stands this precludes cached operations on a3xx and a5xx with this
kernel. We will still allow cached surfaces but they will never be
coherent. If this becomes a problem we'll need to figure out a way to
disallow cached surfaces on those targets.
Change-Id: Ic0dedbad7d923b54f64f34cd68a59c3522ca5ee9
Signed-off-by:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment