gk20a.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. /*
  2. * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. /*
  23. * GK20A does not have dedicated video memory, and to accurately represent this
  24. * fact Nouveau will not create a RAM device for it. Therefore its instmem
  25. * implementation must be done directly on top of system memory, while
  26. * preserving coherency for read and write operations.
  27. *
  28. * Instmem can be allocated through two means:
  29. * 1) If an IOMMU unit has been probed, the IOMMU API is used to make memory
  30. * pages contiguous to the GPU. This is the preferred way.
  31. * 2) If no IOMMU unit is probed, the DMA API is used to allocate physically
  32. * contiguous memory.
  33. *
  34. * In both cases CPU read and writes are performed by creating a write-combined
  35. * mapping. The GPU L2 cache must thus be flushed/invalidated when required. To
  36. * be conservative we do this every time we acquire or release an instobj, but
  37. * ideally L2 management should be handled at a higher level.
  38. *
  39. * To improve performance, CPU mappings are not removed upon instobj release.
  40. * Instead they are placed into a LRU list to be recycled when the mapped space
  41. * goes beyond a certain threshold. At the moment this limit is 1MB.
  42. */
  43. #include "priv.h"
  44. #include <core/memory.h>
  45. #include <core/mm.h>
  46. #include <core/tegra.h>
  47. #include <subdev/fb.h>
  48. #include <subdev/ltc.h>
  49. struct gk20a_instobj {
  50. struct nvkm_memory memory;
  51. struct nvkm_mem mem;
  52. struct gk20a_instmem *imem;
  53. /* CPU mapping */
  54. u32 *vaddr;
  55. };
  56. #define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
  57. /*
  58. * Used for objects allocated using the DMA API
  59. */
  60. struct gk20a_instobj_dma {
  61. struct gk20a_instobj base;
  62. dma_addr_t handle;
  63. struct nvkm_mm_node r;
  64. };
  65. #define gk20a_instobj_dma(p) \
  66. container_of(gk20a_instobj(p), struct gk20a_instobj_dma, base)
  67. /*
  68. * Used for objects flattened using the IOMMU API
  69. */
  70. struct gk20a_instobj_iommu {
  71. struct gk20a_instobj base;
  72. /* to link into gk20a_instmem::vaddr_lru */
  73. struct list_head vaddr_node;
  74. /* how many clients are using vaddr? */
  75. u32 use_cpt;
  76. /* will point to the higher half of pages */
  77. dma_addr_t *dma_addrs;
  78. /* array of base.mem->size pages (+ dma_addr_ts) */
  79. struct page *pages[];
  80. };
  81. #define gk20a_instobj_iommu(p) \
  82. container_of(gk20a_instobj(p), struct gk20a_instobj_iommu, base)
  83. struct gk20a_instmem {
  84. struct nvkm_instmem base;
  85. /* protects vaddr_* and gk20a_instobj::vaddr* */
  86. spinlock_t lock;
  87. /* CPU mappings LRU */
  88. unsigned int vaddr_use;
  89. unsigned int vaddr_max;
  90. struct list_head vaddr_lru;
  91. /* Only used if IOMMU if present */
  92. struct mutex *mm_mutex;
  93. struct nvkm_mm *mm;
  94. struct iommu_domain *domain;
  95. unsigned long iommu_pgshift;
  96. u16 iommu_bit;
  97. /* Only used by DMA API */
  98. unsigned long attrs;
  99. };
  100. #define gk20a_instmem(p) container_of((p), struct gk20a_instmem, base)
  101. static enum nvkm_memory_target
  102. gk20a_instobj_target(struct nvkm_memory *memory)
  103. {
  104. return NVKM_MEM_TARGET_HOST;
  105. }
  106. static u64
  107. gk20a_instobj_addr(struct nvkm_memory *memory)
  108. {
  109. return gk20a_instobj(memory)->mem.offset;
  110. }
  111. static u64
  112. gk20a_instobj_size(struct nvkm_memory *memory)
  113. {
  114. return (u64)gk20a_instobj(memory)->mem.size << 12;
  115. }
  116. /*
  117. * Recycle the vaddr of obj. Must be called with gk20a_instmem::lock held.
  118. */
  119. static void
  120. gk20a_instobj_iommu_recycle_vaddr(struct gk20a_instobj_iommu *obj)
  121. {
  122. struct gk20a_instmem *imem = obj->base.imem;
  123. /* there should not be any user left... */
  124. WARN_ON(obj->use_cpt);
  125. list_del(&obj->vaddr_node);
  126. vunmap(obj->base.vaddr);
  127. obj->base.vaddr = NULL;
  128. imem->vaddr_use -= nvkm_memory_size(&obj->base.memory);
  129. nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", imem->vaddr_use,
  130. imem->vaddr_max);
  131. }
  132. /*
  133. * Must be called while holding gk20a_instmem::lock
  134. */
  135. static void
  136. gk20a_instmem_vaddr_gc(struct gk20a_instmem *imem, const u64 size)
  137. {
  138. while (imem->vaddr_use + size > imem->vaddr_max) {
  139. /* no candidate that can be unmapped, abort... */
  140. if (list_empty(&imem->vaddr_lru))
  141. break;
  142. gk20a_instobj_iommu_recycle_vaddr(
  143. list_first_entry(&imem->vaddr_lru,
  144. struct gk20a_instobj_iommu, vaddr_node));
  145. }
  146. }
  147. static void __iomem *
  148. gk20a_instobj_acquire_dma(struct nvkm_memory *memory)
  149. {
  150. struct gk20a_instobj *node = gk20a_instobj(memory);
  151. struct gk20a_instmem *imem = node->imem;
  152. struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
  153. nvkm_ltc_flush(ltc);
  154. return node->vaddr;
  155. }
  156. static void __iomem *
  157. gk20a_instobj_acquire_iommu(struct nvkm_memory *memory)
  158. {
  159. struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
  160. struct gk20a_instmem *imem = node->base.imem;
  161. struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
  162. const u64 size = nvkm_memory_size(memory);
  163. unsigned long flags;
  164. nvkm_ltc_flush(ltc);
  165. spin_lock_irqsave(&imem->lock, flags);
  166. if (node->base.vaddr) {
  167. if (!node->use_cpt) {
  168. /* remove from LRU list since mapping in use again */
  169. list_del(&node->vaddr_node);
  170. }
  171. goto out;
  172. }
  173. /* try to free some address space if we reached the limit */
  174. gk20a_instmem_vaddr_gc(imem, size);
  175. /* map the pages */
  176. node->base.vaddr = vmap(node->pages, size >> PAGE_SHIFT, VM_MAP,
  177. pgprot_writecombine(PAGE_KERNEL));
  178. if (!node->base.vaddr) {
  179. nvkm_error(&imem->base.subdev, "cannot map instobj - "
  180. "this is not going to end well...\n");
  181. goto out;
  182. }
  183. imem->vaddr_use += size;
  184. nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n",
  185. imem->vaddr_use, imem->vaddr_max);
  186. out:
  187. node->use_cpt++;
  188. spin_unlock_irqrestore(&imem->lock, flags);
  189. return node->base.vaddr;
  190. }
  191. static void
  192. gk20a_instobj_release_dma(struct nvkm_memory *memory)
  193. {
  194. struct gk20a_instobj *node = gk20a_instobj(memory);
  195. struct gk20a_instmem *imem = node->imem;
  196. struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
  197. /* in case we got a write-combined mapping */
  198. wmb();
  199. nvkm_ltc_invalidate(ltc);
  200. }
  201. static void
  202. gk20a_instobj_release_iommu(struct nvkm_memory *memory)
  203. {
  204. struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
  205. struct gk20a_instmem *imem = node->base.imem;
  206. struct nvkm_ltc *ltc = imem->base.subdev.device->ltc;
  207. unsigned long flags;
  208. spin_lock_irqsave(&imem->lock, flags);
  209. /* we should at least have one user to release... */
  210. if (WARN_ON(node->use_cpt == 0))
  211. goto out;
  212. /* add unused objs to the LRU list to recycle their mapping */
  213. if (--node->use_cpt == 0)
  214. list_add_tail(&node->vaddr_node, &imem->vaddr_lru);
  215. out:
  216. spin_unlock_irqrestore(&imem->lock, flags);
  217. wmb();
  218. nvkm_ltc_invalidate(ltc);
  219. }
  220. static u32
  221. gk20a_instobj_rd32(struct nvkm_memory *memory, u64 offset)
  222. {
  223. struct gk20a_instobj *node = gk20a_instobj(memory);
  224. return node->vaddr[offset / 4];
  225. }
  226. static void
  227. gk20a_instobj_wr32(struct nvkm_memory *memory, u64 offset, u32 data)
  228. {
  229. struct gk20a_instobj *node = gk20a_instobj(memory);
  230. node->vaddr[offset / 4] = data;
  231. }
  232. static void
  233. gk20a_instobj_map(struct nvkm_memory *memory, struct nvkm_vma *vma, u64 offset)
  234. {
  235. struct gk20a_instobj *node = gk20a_instobj(memory);
  236. nvkm_vm_map_at(vma, offset, &node->mem);
  237. }
  238. static void *
  239. gk20a_instobj_dtor_dma(struct nvkm_memory *memory)
  240. {
  241. struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory);
  242. struct gk20a_instmem *imem = node->base.imem;
  243. struct device *dev = imem->base.subdev.device->dev;
  244. if (unlikely(!node->base.vaddr))
  245. goto out;
  246. dma_free_attrs(dev, node->base.mem.size << PAGE_SHIFT, node->base.vaddr,
  247. node->handle, imem->attrs);
  248. out:
  249. return node;
  250. }
  251. static void *
  252. gk20a_instobj_dtor_iommu(struct nvkm_memory *memory)
  253. {
  254. struct gk20a_instobj_iommu *node = gk20a_instobj_iommu(memory);
  255. struct gk20a_instmem *imem = node->base.imem;
  256. struct device *dev = imem->base.subdev.device->dev;
  257. struct nvkm_mm_node *r;
  258. unsigned long flags;
  259. int i;
  260. if (unlikely(list_empty(&node->base.mem.regions)))
  261. goto out;
  262. spin_lock_irqsave(&imem->lock, flags);
  263. /* vaddr has already been recycled */
  264. if (node->base.vaddr)
  265. gk20a_instobj_iommu_recycle_vaddr(node);
  266. spin_unlock_irqrestore(&imem->lock, flags);
  267. r = list_first_entry(&node->base.mem.regions, struct nvkm_mm_node,
  268. rl_entry);
  269. /* clear IOMMU bit to unmap pages */
  270. r->offset &= ~BIT(imem->iommu_bit - imem->iommu_pgshift);
  271. /* Unmap pages from GPU address space and free them */
  272. for (i = 0; i < node->base.mem.size; i++) {
  273. iommu_unmap(imem->domain,
  274. (r->offset + i) << imem->iommu_pgshift, PAGE_SIZE);
  275. dma_unmap_page(dev, node->dma_addrs[i], PAGE_SIZE,
  276. DMA_BIDIRECTIONAL);
  277. __free_page(node->pages[i]);
  278. }
  279. /* Release area from GPU address space */
  280. mutex_lock(imem->mm_mutex);
  281. nvkm_mm_free(imem->mm, &r);
  282. mutex_unlock(imem->mm_mutex);
  283. out:
  284. return node;
  285. }
  286. static const struct nvkm_memory_func
  287. gk20a_instobj_func_dma = {
  288. .dtor = gk20a_instobj_dtor_dma,
  289. .target = gk20a_instobj_target,
  290. .addr = gk20a_instobj_addr,
  291. .size = gk20a_instobj_size,
  292. .acquire = gk20a_instobj_acquire_dma,
  293. .release = gk20a_instobj_release_dma,
  294. .rd32 = gk20a_instobj_rd32,
  295. .wr32 = gk20a_instobj_wr32,
  296. .map = gk20a_instobj_map,
  297. };
  298. static const struct nvkm_memory_func
  299. gk20a_instobj_func_iommu = {
  300. .dtor = gk20a_instobj_dtor_iommu,
  301. .target = gk20a_instobj_target,
  302. .addr = gk20a_instobj_addr,
  303. .size = gk20a_instobj_size,
  304. .acquire = gk20a_instobj_acquire_iommu,
  305. .release = gk20a_instobj_release_iommu,
  306. .rd32 = gk20a_instobj_rd32,
  307. .wr32 = gk20a_instobj_wr32,
  308. .map = gk20a_instobj_map,
  309. };
  310. static int
  311. gk20a_instobj_ctor_dma(struct gk20a_instmem *imem, u32 npages, u32 align,
  312. struct gk20a_instobj **_node)
  313. {
  314. struct gk20a_instobj_dma *node;
  315. struct nvkm_subdev *subdev = &imem->base.subdev;
  316. struct device *dev = subdev->device->dev;
  317. if (!(node = kzalloc(sizeof(*node), GFP_KERNEL)))
  318. return -ENOMEM;
  319. *_node = &node->base;
  320. nvkm_memory_ctor(&gk20a_instobj_func_dma, &node->base.memory);
  321. node->base.vaddr = dma_alloc_attrs(dev, npages << PAGE_SHIFT,
  322. &node->handle, GFP_KERNEL,
  323. imem->attrs);
  324. if (!node->base.vaddr) {
  325. nvkm_error(subdev, "cannot allocate DMA memory\n");
  326. return -ENOMEM;
  327. }
  328. /* alignment check */
  329. if (unlikely(node->handle & (align - 1)))
  330. nvkm_warn(subdev,
  331. "memory not aligned as requested: %pad (0x%x)\n",
  332. &node->handle, align);
  333. /* present memory for being mapped using small pages */
  334. node->r.type = 12;
  335. node->r.offset = node->handle >> 12;
  336. node->r.length = (npages << PAGE_SHIFT) >> 12;
  337. node->base.mem.offset = node->handle;
  338. INIT_LIST_HEAD(&node->base.mem.regions);
  339. list_add_tail(&node->r.rl_entry, &node->base.mem.regions);
  340. return 0;
  341. }
  342. static int
  343. gk20a_instobj_ctor_iommu(struct gk20a_instmem *imem, u32 npages, u32 align,
  344. struct gk20a_instobj **_node)
  345. {
  346. struct gk20a_instobj_iommu *node;
  347. struct nvkm_subdev *subdev = &imem->base.subdev;
  348. struct device *dev = subdev->device->dev;
  349. struct nvkm_mm_node *r;
  350. int ret;
  351. int i;
  352. /*
  353. * despite their variable size, instmem allocations are small enough
  354. * (< 1 page) to be handled by kzalloc
  355. */
  356. if (!(node = kzalloc(sizeof(*node) + ((sizeof(node->pages[0]) +
  357. sizeof(*node->dma_addrs)) * npages), GFP_KERNEL)))
  358. return -ENOMEM;
  359. *_node = &node->base;
  360. node->dma_addrs = (void *)(node->pages + npages);
  361. nvkm_memory_ctor(&gk20a_instobj_func_iommu, &node->base.memory);
  362. /* Allocate backing memory */
  363. for (i = 0; i < npages; i++) {
  364. struct page *p = alloc_page(GFP_KERNEL);
  365. dma_addr_t dma_adr;
  366. if (p == NULL) {
  367. ret = -ENOMEM;
  368. goto free_pages;
  369. }
  370. node->pages[i] = p;
  371. dma_adr = dma_map_page(dev, p, 0, PAGE_SIZE, DMA_BIDIRECTIONAL);
  372. if (dma_mapping_error(dev, dma_adr)) {
  373. nvkm_error(subdev, "DMA mapping error!\n");
  374. ret = -ENOMEM;
  375. goto free_pages;
  376. }
  377. node->dma_addrs[i] = dma_adr;
  378. }
  379. mutex_lock(imem->mm_mutex);
  380. /* Reserve area from GPU address space */
  381. ret = nvkm_mm_head(imem->mm, 0, 1, npages, npages,
  382. align >> imem->iommu_pgshift, &r);
  383. mutex_unlock(imem->mm_mutex);
  384. if (ret) {
  385. nvkm_error(subdev, "IOMMU space is full!\n");
  386. goto free_pages;
  387. }
  388. /* Map into GPU address space */
  389. for (i = 0; i < npages; i++) {
  390. u32 offset = (r->offset + i) << imem->iommu_pgshift;
  391. ret = iommu_map(imem->domain, offset, node->dma_addrs[i],
  392. PAGE_SIZE, IOMMU_READ | IOMMU_WRITE);
  393. if (ret < 0) {
  394. nvkm_error(subdev, "IOMMU mapping failure: %d\n", ret);
  395. while (i-- > 0) {
  396. offset -= PAGE_SIZE;
  397. iommu_unmap(imem->domain, offset, PAGE_SIZE);
  398. }
  399. goto release_area;
  400. }
  401. }
  402. /* IOMMU bit tells that an address is to be resolved through the IOMMU */
  403. r->offset |= BIT(imem->iommu_bit - imem->iommu_pgshift);
  404. node->base.mem.offset = ((u64)r->offset) << imem->iommu_pgshift;
  405. INIT_LIST_HEAD(&node->base.mem.regions);
  406. list_add_tail(&r->rl_entry, &node->base.mem.regions);
  407. return 0;
  408. release_area:
  409. mutex_lock(imem->mm_mutex);
  410. nvkm_mm_free(imem->mm, &r);
  411. mutex_unlock(imem->mm_mutex);
  412. free_pages:
  413. for (i = 0; i < npages && node->pages[i] != NULL; i++) {
  414. dma_addr_t dma_addr = node->dma_addrs[i];
  415. if (dma_addr)
  416. dma_unmap_page(dev, dma_addr, PAGE_SIZE,
  417. DMA_BIDIRECTIONAL);
  418. __free_page(node->pages[i]);
  419. }
  420. return ret;
  421. }
  422. static int
  423. gk20a_instobj_new(struct nvkm_instmem *base, u32 size, u32 align, bool zero,
  424. struct nvkm_memory **pmemory)
  425. {
  426. struct gk20a_instmem *imem = gk20a_instmem(base);
  427. struct nvkm_subdev *subdev = &imem->base.subdev;
  428. struct gk20a_instobj *node = NULL;
  429. int ret;
  430. nvkm_debug(subdev, "%s (%s): size: %x align: %x\n", __func__,
  431. imem->domain ? "IOMMU" : "DMA", size, align);
  432. /* Round size and align to page bounds */
  433. size = max(roundup(size, PAGE_SIZE), PAGE_SIZE);
  434. align = max(roundup(align, PAGE_SIZE), PAGE_SIZE);
  435. if (imem->domain)
  436. ret = gk20a_instobj_ctor_iommu(imem, size >> PAGE_SHIFT,
  437. align, &node);
  438. else
  439. ret = gk20a_instobj_ctor_dma(imem, size >> PAGE_SHIFT,
  440. align, &node);
  441. *pmemory = node ? &node->memory : NULL;
  442. if (ret)
  443. return ret;
  444. node->imem = imem;
  445. /* present memory for being mapped using small pages */
  446. node->mem.size = size >> 12;
  447. node->mem.memtype = 0;
  448. node->mem.page_shift = 12;
  449. nvkm_debug(subdev, "alloc size: 0x%x, align: 0x%x, gaddr: 0x%llx\n",
  450. size, align, node->mem.offset);
  451. return 0;
  452. }
  453. static void *
  454. gk20a_instmem_dtor(struct nvkm_instmem *base)
  455. {
  456. struct gk20a_instmem *imem = gk20a_instmem(base);
  457. /* perform some sanity checks... */
  458. if (!list_empty(&imem->vaddr_lru))
  459. nvkm_warn(&base->subdev, "instobj LRU not empty!\n");
  460. if (imem->vaddr_use != 0)
  461. nvkm_warn(&base->subdev, "instobj vmap area not empty! "
  462. "0x%x bytes still mapped\n", imem->vaddr_use);
  463. return imem;
  464. }
  465. static const struct nvkm_instmem_func
  466. gk20a_instmem = {
  467. .dtor = gk20a_instmem_dtor,
  468. .memory_new = gk20a_instobj_new,
  469. .persistent = true,
  470. .zero = false,
  471. };
  472. int
  473. gk20a_instmem_new(struct nvkm_device *device, int index,
  474. struct nvkm_instmem **pimem)
  475. {
  476. struct nvkm_device_tegra *tdev = device->func->tegra(device);
  477. struct gk20a_instmem *imem;
  478. if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
  479. return -ENOMEM;
  480. nvkm_instmem_ctor(&gk20a_instmem, device, index, &imem->base);
  481. spin_lock_init(&imem->lock);
  482. *pimem = &imem->base;
  483. /* do not allow more than 1MB of CPU-mapped instmem */
  484. imem->vaddr_use = 0;
  485. imem->vaddr_max = 0x100000;
  486. INIT_LIST_HEAD(&imem->vaddr_lru);
  487. if (tdev->iommu.domain) {
  488. imem->mm_mutex = &tdev->iommu.mutex;
  489. imem->mm = &tdev->iommu.mm;
  490. imem->domain = tdev->iommu.domain;
  491. imem->iommu_pgshift = tdev->iommu.pgshift;
  492. imem->iommu_bit = tdev->func->iommu_bit;
  493. nvkm_info(&imem->base.subdev, "using IOMMU\n");
  494. } else {
  495. imem->attrs = DMA_ATTR_NON_CONSISTENT |
  496. DMA_ATTR_WEAK_ORDERING |
  497. DMA_ATTR_WRITE_COMBINE;
  498. nvkm_info(&imem->base.subdev, "using DMA API\n");
  499. }
  500. return 0;
  501. }