Commit edd38a1e authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

Not used, is always NULL.
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190118122020.27596-2-kraxel@redhat.com
parent e4056bbb
...@@ -460,8 +460,7 @@ void qxl_surface_id_dealloc(struct qxl_device *qdev, ...@@ -460,8 +460,7 @@ void qxl_surface_id_dealloc(struct qxl_device *qdev,
} }
int qxl_hw_surface_alloc(struct qxl_device *qdev, int qxl_hw_surface_alloc(struct qxl_device *qdev,
struct qxl_bo *surf, struct qxl_bo *surf)
struct ttm_mem_reg *new_mem)
{ {
struct qxl_surface_cmd *cmd; struct qxl_surface_cmd *cmd;
struct qxl_release *release; struct qxl_release *release;
...@@ -487,16 +486,7 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev, ...@@ -487,16 +486,7 @@ int qxl_hw_surface_alloc(struct qxl_device *qdev,
cmd->u.surface_create.width = surf->surf.width; cmd->u.surface_create.width = surf->surf.width;
cmd->u.surface_create.height = surf->surf.height; cmd->u.surface_create.height = surf->surf.height;
cmd->u.surface_create.stride = surf->surf.stride; cmd->u.surface_create.stride = surf->surf.stride;
if (new_mem) { cmd->u.surface_create.data = qxl_bo_physical_address(qdev, surf, 0);
int slot_id = surf->type == QXL_GEM_DOMAIN_VRAM ? qdev->main_mem_slot : qdev->surfaces_mem_slot;
struct qxl_memslot *slot = &(qdev->mem_slots[slot_id]);
/* TODO - need to hold one of the locks to read tbo.offset */
cmd->u.surface_create.data = slot->high_bits;
cmd->u.surface_create.data |= (new_mem->start << PAGE_SHIFT) + surf->tbo.bdev->man[new_mem->mem_type].gpu_offset;
} else
cmd->u.surface_create.data = qxl_bo_physical_address(qdev, surf, 0);
cmd->surface_id = surf->surface_id; cmd->surface_id = surf->surface_id;
qxl_release_unmap(qdev, release, &cmd->release_info); qxl_release_unmap(qdev, release, &cmd->release_info);
......
...@@ -497,8 +497,7 @@ int qxl_surface_id_alloc(struct qxl_device *qdev, ...@@ -497,8 +497,7 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
void qxl_surface_id_dealloc(struct qxl_device *qdev, void qxl_surface_id_dealloc(struct qxl_device *qdev,
uint32_t surface_id); uint32_t surface_id);
int qxl_hw_surface_alloc(struct qxl_device *qdev, int qxl_hw_surface_alloc(struct qxl_device *qdev,
struct qxl_bo *surf, struct qxl_bo *surf);
struct ttm_mem_reg *mem);
int qxl_hw_surface_dealloc(struct qxl_device *qdev, int qxl_hw_surface_dealloc(struct qxl_device *qdev,
struct qxl_bo *surf); struct qxl_bo *surf);
......
...@@ -332,7 +332,7 @@ int qxl_bo_check_id(struct qxl_device *qdev, struct qxl_bo *bo) ...@@ -332,7 +332,7 @@ int qxl_bo_check_id(struct qxl_device *qdev, struct qxl_bo *bo)
if (ret) if (ret)
return ret; return ret;
ret = qxl_hw_surface_alloc(qdev, bo, NULL); ret = qxl_hw_surface_alloc(qdev, bo);
if (ret) if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment