diff options
author | Jerome Glisse <jglisse@redhat.com> | 2011-11-09 17:15:26 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-06 05:40:02 -0500 |
commit | 8e7e70522d760c4ccd4cd370ebfa0ba69e006c6e (patch) | |
tree | a2b0f931e513f3aeba174b974bd5e869685fe288 /drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | |
parent | 3230cfc34fca9d17c1628cf0e4ac25199592a69a (diff) |
drm/ttm: isolate dma data from ttm_tt V4
Move dma data to a superset ttm_dma_tt structure which herit
from ttm_tt. This allow driver that don't use dma functionalities
to not have to waste memory for it.
V2 Rebase on top of no memory account changes (where/when is my
delorean when i need it ?)
V3 Make sure page list is initialized empty
V4 typo/syntax fixes
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c index 3986d7468232..1e2c0fb7f786 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | |||
@@ -168,6 +168,7 @@ static void vmw_ttm_destroy(struct ttm_tt *ttm) | |||
168 | { | 168 | { |
169 | struct vmw_ttm_tt *vmw_be = container_of(ttm, struct vmw_ttm_tt, ttm); | 169 | struct vmw_ttm_tt *vmw_be = container_of(ttm, struct vmw_ttm_tt, ttm); |
170 | 170 | ||
171 | ttm_tt_fini(ttm); | ||
171 | kfree(vmw_be); | 172 | kfree(vmw_be); |
172 | } | 173 | } |
173 | 174 | ||
@@ -191,6 +192,7 @@ struct ttm_tt *vmw_ttm_tt_create(struct ttm_bo_device *bdev, | |||
191 | vmw_be->dev_priv = container_of(bdev, struct vmw_private, bdev); | 192 | vmw_be->dev_priv = container_of(bdev, struct vmw_private, bdev); |
192 | 193 | ||
193 | if (ttm_tt_init(&vmw_be->ttm, bdev, size, page_flags, dummy_read_page)) { | 194 | if (ttm_tt_init(&vmw_be->ttm, bdev, size, page_flags, dummy_read_page)) { |
195 | kfree(vmw_be); | ||
194 | return NULL; | 196 | return NULL; |
195 | } | 197 | } |
196 | 198 | ||