diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2013-11-28 13:46:56 +0400 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2013-12-05 00:03:56 +0400 |
commit | 308d17ef9530f236466a31a7855fc3d5176292d4 (patch) | |
tree | bf0ef85f31331efbcffc47b8ae2a7d042af18875 /drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |
parent | d69d51d73f9509dbb727e36a3a7ddac8b003ac6b (diff) | |
download | linux-308d17ef9530f236466a31a7855fc3d5176292d4.tar.xz |
drm/vmwgfx: Fix dma buffer memory size accounting
Also request kernel ttm_buffer objects for buffer objects that obviously
aren't visible to user-space, and save some device address space.
The accounting was broken in a couple of ways:
1) We did not differentiate between user dma buffers and kernel dma buffers.
2) The ttm_bo_acc_size function is broken in that it
a) Doesn't take into account the size of the optional dma address array,
b) Doesn't take into account the fact that drivers typically embed the
ttm_tt structure.
This needs to be fixed in ttm, but meanwhile provide a vmwgfx-specific
function to do the job.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index db85985c7086..20890ad8408b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -615,6 +615,7 @@ extern int vmw_mmap(struct file *filp, struct vm_area_struct *vma); * TTM buffer object driver - vmwgfx_buffer.c */ +extern const size_t vmw_tt_size; extern struct ttm_placement vmw_vram_placement; extern struct ttm_placement vmw_vram_ne_placement; extern struct ttm_placement vmw_vram_sys_placement; |