mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:17:52 +07:00
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: Christophe Fergeau <cfergeau@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20181120162004.22807-2-cfergeau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
76a57db4a8
commit
545592fb3d
@ -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)
|
||||
return ret;
|
||||
|
||||
@ -1102,7 +1102,7 @@ int qxl_create_monitors_object(struct qxl_device *qdev)
|
||||
}
|
||||
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)
|
||||
return ret;
|
||||
|
||||
|
@ -111,7 +111,7 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev,
|
||||
qbo->surf.stride = mode_cmd->pitches[0];
|
||||
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) {
|
||||
goto out_unref;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ struct qxl_bo *qxl_bo_ref(struct qxl_bo *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 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)
|
||||
|
||||
if (bo->pin_count) {
|
||||
bo->pin_count++;
|
||||
if (gpu_addr)
|
||||
*gpu_addr = qxl_bo_gpu_offset(bo);
|
||||
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);
|
||||
if (likely(r == 0)) {
|
||||
bo->pin_count = 1;
|
||||
if (gpu_addr != NULL)
|
||||
*gpu_addr = qxl_bo_gpu_offset(bo);
|
||||
}
|
||||
if (unlikely(r != 0))
|
||||
dev_err(ddev->dev, "%p pin failed\n", bo);
|
||||
@ -266,7 +262,7 @@ static int __qxl_bo_unpin(struct qxl_bo *bo)
|
||||
* 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;
|
||||
|
||||
@ -274,7 +270,7 @@ int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr)
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = __qxl_bo_pin(bo, bo->type, NULL);
|
||||
r = __qxl_bo_pin(bo);
|
||||
qxl_bo_unreserve(bo);
|
||||
return r;
|
||||
}
|
||||
|
@ -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);
|
||||
extern struct qxl_bo *qxl_bo_ref(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 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);
|
||||
|
Loading…
Reference in New Issue
Block a user