Commit 545592fb authored by Christophe Fergeau's avatar Christophe Fergeau Committed by Gerd Hoffmann

qxl: Remove unused qxl_bo_pin arguments

The 'domain' argument to qxl_bo_pin is redundant with 'bo', and
'gpu_addr' is unused, so we can remove both.
Signed-off-by: default avatarChristophe Fergeau <cfergeau@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-2-cfergeau@redhat.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 76a57db4
...@@ -755,7 +755,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane, ...@@ -755,7 +755,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
} }
} }
ret = qxl_bo_pin(user_bo, QXL_GEM_DOMAIN_CPU, NULL); ret = qxl_bo_pin(user_bo);
if (ret) if (ret)
return ret; return ret;
...@@ -1102,7 +1102,7 @@ int qxl_create_monitors_object(struct qxl_device *qdev) ...@@ -1102,7 +1102,7 @@ int qxl_create_monitors_object(struct qxl_device *qdev)
} }
qdev->monitors_config_bo = gem_to_qxl_bo(gobj); qdev->monitors_config_bo = gem_to_qxl_bo(gobj);
ret = qxl_bo_pin(qdev->monitors_config_bo, QXL_GEM_DOMAIN_VRAM, NULL); ret = qxl_bo_pin(qdev->monitors_config_bo);
if (ret) if (ret)
return ret; return ret;
......
...@@ -111,7 +111,7 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev, ...@@ -111,7 +111,7 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev,
qbo->surf.stride = mode_cmd->pitches[0]; qbo->surf.stride = mode_cmd->pitches[0];
qbo->surf.format = SPICE_SURFACE_FMT_32_xRGB; qbo->surf.format = SPICE_SURFACE_FMT_32_xRGB;
ret = qxl_bo_pin(qbo, QXL_GEM_DOMAIN_SURFACE, NULL); ret = qxl_bo_pin(qbo);
if (ret) { if (ret) {
goto out_unref; goto out_unref;
} }
......
...@@ -216,7 +216,7 @@ struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo) ...@@ -216,7 +216,7 @@ struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo)
return bo; return bo;
} }
static int __qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) static int __qxl_bo_pin(struct qxl_bo *bo)
{ {
struct ttm_operation_ctx ctx = { false, false }; struct ttm_operation_ctx ctx = { false, false };
struct drm_device *ddev = bo->gem_base.dev; struct drm_device *ddev = bo->gem_base.dev;
...@@ -224,16 +224,12 @@ static int __qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) ...@@ -224,16 +224,12 @@ static int __qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr)
if (bo->pin_count) { if (bo->pin_count) {
bo->pin_count++; bo->pin_count++;
if (gpu_addr)
*gpu_addr = qxl_bo_gpu_offset(bo);
return 0; return 0;
} }
qxl_ttm_placement_from_domain(bo, domain, true); qxl_ttm_placement_from_domain(bo, bo->type, true);
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
if (likely(r == 0)) { if (likely(r == 0)) {
bo->pin_count = 1; bo->pin_count = 1;
if (gpu_addr != NULL)
*gpu_addr = qxl_bo_gpu_offset(bo);
} }
if (unlikely(r != 0)) if (unlikely(r != 0))
dev_err(ddev->dev, "%p pin failed\n", bo); dev_err(ddev->dev, "%p pin failed\n", bo);
...@@ -266,7 +262,7 @@ static int __qxl_bo_unpin(struct qxl_bo *bo) ...@@ -266,7 +262,7 @@ static int __qxl_bo_unpin(struct qxl_bo *bo)
* beforehand, use the internal version directly __qxl_bo_pin. * beforehand, use the internal version directly __qxl_bo_pin.
* *
*/ */
int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) int qxl_bo_pin(struct qxl_bo *bo)
{ {
int r; int r;
...@@ -274,7 +270,7 @@ int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) ...@@ -274,7 +270,7 @@ int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr)
if (r) if (r)
return r; return r;
r = __qxl_bo_pin(bo, bo->type, NULL); r = __qxl_bo_pin(bo);
qxl_bo_unreserve(bo); qxl_bo_unreserve(bo);
return r; return r;
} }
......
...@@ -97,7 +97,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, int pa ...@@ -97,7 +97,7 @@ void *qxl_bo_kmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, int pa
void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *map); void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *map);
extern struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo); extern struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo);
extern void qxl_bo_unref(struct qxl_bo **bo); extern void qxl_bo_unref(struct qxl_bo **bo);
extern int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr); extern int qxl_bo_pin(struct qxl_bo *bo);
extern int qxl_bo_unpin(struct qxl_bo *bo); extern int qxl_bo_unpin(struct qxl_bo *bo);
extern void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned); extern void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned);
extern bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo); extern bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo);
......
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