Merge branch 'stable/ttm.pci-api.v5' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / include / drm / ttm / ttm_bo_driver.h
index 1da8af6..38ff068 100644 (file)
@@ -50,13 +50,15 @@ struct ttm_backend_func {
         * @pages: Array of pointers to ttm pages.
         * @dummy_read_page: Page to be used instead of NULL pages in the
         * array @pages.
+        * @dma_addrs: Array of DMA (bus) address of the ttm pages.
         *
         * Populate the backend with ttm pages. Depending on the backend,
         * it may or may not copy the @pages array.
         */
        int (*populate) (struct ttm_backend *backend,
                         unsigned long num_pages, struct page **pages,
-                        struct page *dummy_read_page);
+                        struct page *dummy_read_page,
+                        dma_addr_t *dma_addrs);
        /**
         * struct ttm_backend_func member clear
         *
@@ -149,6 +151,7 @@ enum ttm_caching_state {
  * @swap_storage: Pointer to shmem struct file for swap storage.
  * @caching_state: The current caching state of the pages.
  * @state: The current binding state of the pages.
+ * @dma_address: The DMA (bus) addresses of the pages (if TTM_PAGE_FLAG_DMA32)
  *
  * This is a structure holding the pages, caching- and aperture binding
  * status for a buffer object that isn't backed by fixed (VRAM / AGP)
@@ -173,6 +176,7 @@ struct ttm_tt {
                tt_unbound,
                tt_unpopulated,
        } state;
+       dma_addr_t *dma_address;
 };
 
 #define TTM_MEMTYPE_FLAG_FIXED         (1 << 0)        /* Fixed (on-card) PCI memory */
@@ -547,6 +551,7 @@ struct ttm_bo_device {
        struct list_head device_list;
        struct ttm_bo_global *glob;
        struct ttm_bo_driver *driver;
+       struct device *dev;
        rwlock_t vm_lock;
        struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
        spinlock_t fence_lock;