aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-08-04 20:48:18 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-10-04 20:01:20 -0400
commitd961db75ce86a84f1f04e91ad1014653ed7d9f46 (patch)
treea827b77524fdc0c37da70936fbb0627ac7e4b492 /drivers/gpu/drm/vmwgfx
parent42311ff90dc8746bd81427b2ed6efda9af791b77 (diff)
drm/ttm: restructure to allow driver to plug in alternate memory manager
Nouveau will need this on GeForce 8 and up to account for the GPU reordering physical VRAM for some memory types. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Thomas Hellström <thellstrom@vmware.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
index c4f5114aee7c..1b3bd8c6c67e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
@@ -147,6 +147,7 @@ int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
147 break; 147 break;
148 case TTM_PL_VRAM: 148 case TTM_PL_VRAM:
149 /* "On-card" video ram */ 149 /* "On-card" video ram */
150 man->func = &ttm_bo_manager_func;
150 man->gpu_offset = 0; 151 man->gpu_offset = 0;
151 man->flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE; 152 man->flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE;
152 man->available_caching = TTM_PL_MASK_CACHING; 153 man->available_caching = TTM_PL_MASK_CACHING;
@@ -203,7 +204,7 @@ static int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg
203 /* System memory */ 204 /* System memory */
204 return 0; 205 return 0;
205 case TTM_PL_VRAM: 206 case TTM_PL_VRAM:
206 mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; 207 mem->bus.offset = mem->start << PAGE_SHIFT;
207 mem->bus.base = dev_priv->vram_start; 208 mem->bus.base = dev_priv->vram_start;
208 mem->bus.is_iomem = true; 209 mem->bus.is_iomem = true;
209 break; 210 break;