drm/ttm: move fpfn and lpfn into each placement v2

This allows us to more fine grained specify where to place the buffer object.

v2: rebased on drm-next, add bochs changes as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König
2014-08-27 13:16:04 +02:00
parent 484048db6b
commit f1217ed09f
26 changed files with 352 additions and 259 deletions

View File

@@ -374,10 +374,16 @@ static int vmw_fb_create_bo(struct vmw_private *vmw_priv,
size_t size, struct vmw_dma_buffer **out)
{
struct vmw_dma_buffer *vmw_bo;
struct ttm_placement ne_placement = vmw_vram_ne_placement;
struct ttm_place ne_place = vmw_vram_ne_placement.placement[0];
struct ttm_placement ne_placement;
int ret;
ne_placement.lpfn = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
ne_placement.num_placement = 1;
ne_placement.placement = &ne_place;
ne_placement.num_busy_placement = 1;
ne_placement.busy_placement = &ne_place;
ne_place.lpfn = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
(void) ttm_write_lock(&vmw_priv->reservation_sem, false);