diff options
-rw-r--r-- | lib/core/os.h | 2 | ||||
-rw-r--r-- | nvkm/include/core/device.h | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/core/os.h b/lib/core/os.h index fba954229..79462eb2c 100644 --- a/lib/core/os.h +++ b/lib/core/os.h @@ -101,6 +101,8 @@ typedef dma_addr_t resource_size_t; #define __printf(a,b) #define __user +#define IS_ENABLED(x) (0) + static inline int order_base_2(u64 base) { diff --git a/nvkm/include/core/device.h b/nvkm/include/core/device.h index 1d9d89392..0d839e1dd 100644 --- a/nvkm/include/core/device.h +++ b/nvkm/include/core/device.h @@ -158,6 +158,12 @@ nv_device_is_pci(struct nouveau_device *device) return device->pdev != NULL; } +static inline bool +nv_device_is_cpu_coherent(struct nouveau_device *device) +{ + return (!IS_ENABLED(CONFIG_ARM) && nv_device_is_pci(device)); +} + static inline struct device * nv_device_base(struct nouveau_device *device) { |