drm/nouveau/bar: add noncached ioremap property
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 27 Jun 2014 10:28:50 +0000 (19:28 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 9 Aug 2014 19:11:10 +0000 (05:11 +1000)
Some BARs (like GK20A's) do not support being ioremapped write-combined.
Add a boolean property to the BAR structure and handle that case in the
Nouveau BO implementation.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/drm/nouveau/core/include/subdev/bar.h
drivers/gpu/drm/nouveau/nouveau_bo.c

index 9faa98e..9002cbb 100644 (file)
@@ -20,6 +20,9 @@ struct nouveau_bar {
                    u32 flags, struct nouveau_vma *);
        void (*unmap)(struct nouveau_bar *, struct nouveau_vma *);
        void (*flush)(struct nouveau_bar *);
+
+       /* whether the BAR supports to be ioremapped WC or should be uncached */
+       bool iomap_uncached;
 };
 
 static inline struct nouveau_bar *
Simple merge