WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 11/11] radeon/ttm/dma: Enable the TTM DMA pool if the

. with the exception that we do not handle the AGP case. We only
deal with PCIe cards such as ATI ES1000 or HD3200 that have been
detected to only do DMA up to 32-bits.

Note: If the ttm.no_dma is set, this operation will not override
the TTM page pool to use the DMA one.

CC: Dave Airlie <airlied@xxxxxxxxxx>
CC: Alex Deucher <alexdeucher@xxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/gpu/drm/radeon/radeon_ttm.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c 
b/drivers/gpu/drm/radeon/radeon_ttm.c
index 60125dd..2e7419f 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -761,6 +761,10 @@ struct ttm_backend *radeon_ttm_backend_create(struct 
radeon_device *rdev)
        gtt->backend.bdev = &rdev->mman.bdev;
        gtt->backend.flags = 0;
        gtt->backend.func = &radeon_backend_func;
+       if (rdev->need_dma32) {
+               if (ttm_dma_override(gtt->backend.func))
+                       gtt->backend.dev = rdev->dev;
+       }
        gtt->rdev = rdev;
        gtt->pages = NULL;
        gtt->num_pages = 0;
@@ -792,8 +796,8 @@ static int radeon_mm_dump_table(struct seq_file *m, void 
*data)
 static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
 {
 #if defined(CONFIG_DEBUG_FS)
-       static struct drm_info_list 
radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES+1];
-       static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES+1][32];
+       static struct drm_info_list 
radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES+2];
+       static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES+2][32];
        unsigned i;
 
        for (i = 0; i < RADEON_DEBUGFS_MEM_TYPES; i++) {
@@ -815,8 +819,15 @@ static int radeon_ttm_debugfs_init(struct radeon_device 
*rdev)
        radeon_mem_types_list[i].name = radeon_mem_types_names[i];
        radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs;
        radeon_mem_types_list[i].driver_features = 0;
-       radeon_mem_types_list[i].data = NULL;
-       return radeon_debugfs_add_files(rdev, radeon_mem_types_list, 
RADEON_DEBUGFS_MEM_TYPES+1);
+       radeon_mem_types_list[i++].data = NULL;
+       if (rdev->need_dma32) {
+               sprintf(radeon_mem_types_names[i], "ttm_dma_page_pool");
+               radeon_mem_types_list[i].name = radeon_mem_types_names[i];
+               radeon_mem_types_list[i].show = &ttm_dma_page_alloc_debugfs;
+               radeon_mem_types_list[i].driver_features = 0;
+               radeon_mem_types_list[i++].data = NULL;
+       }
+       return radeon_debugfs_add_files(rdev, radeon_mem_types_list, i);
 
 #endif
        return 0;
-- 
1.7.6.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>