Alexandre Courbot 996f545fbb drm/nouveau/gem: allow user-space to specify an object should be coherent
User-space use mappable BOs notably for fences, and expects that a
value update by the GPU will be immediatly visible through the
user-space mapping.

ARM has a property that may prevent this from happening though: memory
can be mapped multiple times only if the different mappings share the
same caching properties. However all the lowmem memory is already
identity-mapped into the kernel with cache enabled, so when user-space
requests an uncached mapping, we actually get an "undefined caching
policy" one and this has strange side-effects described on Freedesktop
bug 86690.

To prevent this from happening, allow user-space to explicitly specify
which objects should be coherent, and create such objects with the
TTM_PL_FLAG_UNCACHED flag. This will make TTM allocate memory using the
DMA API, which will fix the identify mapping and allow us to safely map
the objects to user-space uncached.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-04-14 17:00:46 +10:00
..
2015-03-24 16:42:54 -07:00
2015-02-17 09:27:54 -08:00
2015-02-15 10:48:44 -08:00
2015-03-24 15:39:26 +01:00
2015-04-01 10:29:05 -07:00
2015-02-03 15:48:51 -08:00
2015-02-03 15:58:39 -08:00
2015-02-04 09:15:18 +01:00
2015-03-12 09:45:46 -07:00
2015-02-18 08:40:29 +01:00
2015-02-17 09:38:59 -08:00
2015-04-01 13:42:58 +02:00
2015-02-15 10:24:55 -08:00
2015-04-02 13:53:53 -07:00
2015-02-03 15:58:39 -08:00