diff options
| author | Christian König <christian.koenig@amd.com> | 2017-04-12 08:24:39 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:48:01 -0500 |
| commit | 19be5570107108fba772bc2e3a1eb22ec32fb021 (patch) | |
| tree | 86b971706ea8fce92b58cac4ea73e8799564a6ef /drivers/gpu/drm/qxl/qxl_ioctl.c | |
| parent | 750a25037cac56afeb48ab807ce80fa2cd518b8d (diff) | |
drm/ttm: add operation ctx to ttm_bo_validate v2
Give moving a BO into place an operation context to work with.
v2: rebased
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ioctl.c')
| -rw-r--r-- | drivers/gpu/drm/qxl/qxl_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c index 31effed4a3c8..e8c0b1037230 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c | |||
| @@ -309,6 +309,7 @@ static int qxl_update_area_ioctl(struct drm_device *dev, void *data, | |||
| 309 | int ret; | 309 | int ret; |
| 310 | struct drm_gem_object *gobj = NULL; | 310 | struct drm_gem_object *gobj = NULL; |
| 311 | struct qxl_bo *qobj = NULL; | 311 | struct qxl_bo *qobj = NULL; |
| 312 | struct ttm_operation_ctx ctx = { true, false }; | ||
| 312 | 313 | ||
| 313 | if (update_area->left >= update_area->right || | 314 | if (update_area->left >= update_area->right || |
| 314 | update_area->top >= update_area->bottom) | 315 | update_area->top >= update_area->bottom) |
| @@ -326,8 +327,7 @@ static int qxl_update_area_ioctl(struct drm_device *dev, void *data, | |||
| 326 | 327 | ||
| 327 | if (!qobj->pin_count) { | 328 | if (!qobj->pin_count) { |
| 328 | qxl_ttm_placement_from_domain(qobj, qobj->type, false); | 329 | qxl_ttm_placement_from_domain(qobj, qobj->type, false); |
| 329 | ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, | 330 | ret = ttm_bo_validate(&qobj->tbo, &qobj->placement, &ctx); |
| 330 | true, false); | ||
| 331 | if (unlikely(ret)) | 331 | if (unlikely(ret)) |
| 332 | goto out; | 332 | goto out; |
| 333 | } | 333 | } |
