diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-10-24 10:14:41 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:11:20 -0500 |
commit | a5cf68b04b2b8ea716cf6fd8499c1c54d05fdf5e (patch) | |
tree | 87f6007ef18c8d488f590523b90bcd8766537778 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | e419cf0954901bb3a987f8b76cbc9654ca06121c (diff) |
drm/nouveau: Rework tile region handling.
The point is to share more code between the PFB/PGRAPH tile region
hooks, and give the hardware specific functions a chance to allocate
per-region resources.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 099f806f39ed..8d5dd980240d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -46,9 +46,7 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo) | |||
46 | if (unlikely(nvbo->gem)) | 46 | if (unlikely(nvbo->gem)) |
47 | DRM_ERROR("bo %p still attached to GEM object\n", bo); | 47 | DRM_ERROR("bo %p still attached to GEM object\n", bo); |
48 | 48 | ||
49 | if (nvbo->tile) | 49 | nv10_mem_put_tile_region(dev, nvbo->tile, NULL); |
50 | nv10_mem_expire_tiling(dev, nvbo->tile, NULL); | ||
51 | |||
52 | kfree(nvbo); | 50 | kfree(nvbo); |
53 | } | 51 | } |
54 | 52 | ||
@@ -792,7 +790,8 @@ nouveau_bo_vm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem, | |||
792 | 790 | ||
793 | } else if (dev_priv->card_type >= NV_10) { | 791 | } else if (dev_priv->card_type >= NV_10) { |
794 | *new_tile = nv10_mem_set_tiling(dev, offset, new_mem->size, | 792 | *new_tile = nv10_mem_set_tiling(dev, offset, new_mem->size, |
795 | nvbo->tile_mode); | 793 | nvbo->tile_mode, |
794 | nvbo->tile_flags); | ||
796 | } | 795 | } |
797 | 796 | ||
798 | return 0; | 797 | return 0; |
@@ -808,9 +807,7 @@ nouveau_bo_vm_cleanup(struct ttm_buffer_object *bo, | |||
808 | 807 | ||
809 | if (dev_priv->card_type >= NV_10 && | 808 | if (dev_priv->card_type >= NV_10 && |
810 | dev_priv->card_type < NV_50) { | 809 | dev_priv->card_type < NV_50) { |
811 | if (*old_tile) | 810 | nv10_mem_put_tile_region(dev, *old_tile, bo->sync_obj); |
812 | nv10_mem_expire_tiling(dev, *old_tile, bo->sync_obj); | ||
813 | |||
814 | *old_tile = new_tile; | 811 | *old_tile = new_tile; |
815 | } | 812 | } |
816 | } | 813 | } |