xen-devel
[Xen-devel] [PATCH 11/11] radeon/ttm/dma: Enable the TTM DMA pool if the
To: |
linux-kernel@xxxxxxxxxxxxxxx, thellstrom@xxxxxxxxxx, thomas@xxxxxxxxxxxx, airlied@xxxxxxxxxx, jglisse@xxxxxxxxxx, bskeggs@xxxxxxxxxx |
Subject: |
[Xen-devel] [PATCH 11/11] radeon/ttm/dma: Enable the TTM DMA pool if the device can only do 32-bit. |
From: |
Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> |
Date: |
Tue, 1 Nov 2011 14:47:32 -0400 |
Cc: |
Alex Deucher <alexdeucher@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> |
Delivery-date: |
Tue, 01 Nov 2011 12:17:27 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<1320173252-2812-1-git-send-email-konrad.wilk@xxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<1320173252-2812-1-git-send-email-konrad.wilk@xxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
. 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>
Reviewed-by: Jerome Glisse <jglisse@xxxxxxxxxx>
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>
|
- [Xen-devel] [PATCH] TTM DMA pool v2.2 or [GIT PULL] (stable/ttm.dma_pool.v2.3) for 3.3, Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 02/11] nouveau/radeon: Set coherent DMA mask, Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 01/11] swiotlb: Expose swiotlb_nr_tlb function to modules, Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 05/11] ttm: Get rid of temporary scaffolding, Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 03/11] ttm/radeon/nouveau: Check the DMA address from TTM against known value., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 04/11] ttm: Wrap ttm_[put|get]_pages and extract GFP_* and caching states from 'struct ttm_tt', Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 10/11] nouveau/ttm/dma: Enable the TTM DMA pool if device can only do 32-bit DMA., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 09/11] ttm: Add 'no_dma' parameter to turn the TTM DMA pool off during runtime., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 11/11] radeon/ttm/dma: Enable the TTM DMA pool if the device can only do 32-bit.,
Konrad Rzeszutek Wilk <=
- [Xen-devel] [PATCH 07/11] ttm: Do not set the ttm->be to NULL before calling the TTM page pool to free pages., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 06/11] ttm/driver: Expand ttm_backend_func to include two overrides for TTM page pool., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 08/11] ttm: Provide DMA aware TTM page pool code., Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH] TTM DMA pool v2.2 or [GIT PULL] (stable/ttm.dma_pool.v2.3) for 3.3, Jerome Glisse
|
|
|