diff options
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_object.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_object.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index fa5440dc9a19..adaa131d1588 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c | |||
@@ -113,7 +113,7 @@ int qxl_bo_create(struct qxl_device *qdev, | |||
113 | NULL, NULL, &qxl_ttm_bo_destroy); | 113 | NULL, NULL, &qxl_ttm_bo_destroy); |
114 | if (unlikely(r != 0)) { | 114 | if (unlikely(r != 0)) { |
115 | if (r != -ERESTARTSYS) | 115 | if (r != -ERESTARTSYS) |
116 | dev_err(qdev->dev, | 116 | dev_err(qdev->ddev->dev, |
117 | "object_init failed for (%lu, 0x%08X)\n", | 117 | "object_init failed for (%lu, 0x%08X)\n", |
118 | size, domain); | 118 | size, domain); |
119 | return r; | 119 | return r; |
@@ -223,7 +223,7 @@ struct qxl_bo *qxl_bo_ref(struct qxl_bo *bo) | |||
223 | 223 | ||
224 | int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) | 224 | int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) |
225 | { | 225 | { |
226 | struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private; | 226 | struct drm_device *ddev = bo->gem_base.dev; |
227 | int r; | 227 | int r; |
228 | 228 | ||
229 | if (bo->pin_count) { | 229 | if (bo->pin_count) { |
@@ -240,17 +240,17 @@ int qxl_bo_pin(struct qxl_bo *bo, u32 domain, u64 *gpu_addr) | |||
240 | *gpu_addr = qxl_bo_gpu_offset(bo); | 240 | *gpu_addr = qxl_bo_gpu_offset(bo); |
241 | } | 241 | } |
242 | if (unlikely(r != 0)) | 242 | if (unlikely(r != 0)) |
243 | dev_err(qdev->dev, "%p pin failed\n", bo); | 243 | dev_err(ddev->dev, "%p pin failed\n", bo); |
244 | return r; | 244 | return r; |
245 | } | 245 | } |
246 | 246 | ||
247 | int qxl_bo_unpin(struct qxl_bo *bo) | 247 | int qxl_bo_unpin(struct qxl_bo *bo) |
248 | { | 248 | { |
249 | struct qxl_device *qdev = (struct qxl_device *)bo->gem_base.dev->dev_private; | 249 | struct drm_device *ddev = bo->gem_base.dev; |
250 | int r, i; | 250 | int r, i; |
251 | 251 | ||
252 | if (!bo->pin_count) { | 252 | if (!bo->pin_count) { |
253 | dev_warn(qdev->dev, "%p unpin not necessary\n", bo); | 253 | dev_warn(ddev->dev, "%p unpin not necessary\n", bo); |
254 | return 0; | 254 | return 0; |
255 | } | 255 | } |
256 | bo->pin_count--; | 256 | bo->pin_count--; |
@@ -260,7 +260,7 @@ int qxl_bo_unpin(struct qxl_bo *bo) | |||
260 | bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT; | 260 | bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT; |
261 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); | 261 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); |
262 | if (unlikely(r != 0)) | 262 | if (unlikely(r != 0)) |
263 | dev_err(qdev->dev, "%p validate failed for unpin\n", bo); | 263 | dev_err(ddev->dev, "%p validate failed for unpin\n", bo); |
264 | return r; | 264 | return r; |
265 | } | 265 | } |
266 | 266 | ||
@@ -270,9 +270,9 @@ void qxl_bo_force_delete(struct qxl_device *qdev) | |||
270 | 270 | ||
271 | if (list_empty(&qdev->gem.objects)) | 271 | if (list_empty(&qdev->gem.objects)) |
272 | return; | 272 | return; |
273 | dev_err(qdev->dev, "Userspace still has active objects !\n"); | 273 | dev_err(qdev->ddev->dev, "Userspace still has active objects !\n"); |
274 | list_for_each_entry_safe(bo, n, &qdev->gem.objects, list) { | 274 | list_for_each_entry_safe(bo, n, &qdev->gem.objects, list) { |
275 | dev_err(qdev->dev, "%p %p %lu %lu force free\n", | 275 | dev_err(qdev->ddev->dev, "%p %p %lu %lu force free\n", |
276 | &bo->gem_base, bo, (unsigned long)bo->gem_base.size, | 276 | &bo->gem_base, bo, (unsigned long)bo->gem_base.size, |
277 | *((unsigned long *)&bo->gem_base.refcount)); | 277 | *((unsigned long *)&bo->gem_base.refcount)); |
278 | mutex_lock(&qdev->gem.mutex); | 278 | mutex_lock(&qdev->gem.mutex); |