Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357988
b: refs/heads/master
c: 43e28f0
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Jan 17, 2013
1 parent 93b3f6a commit c8e633f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd624afd533bdc87b8c10835515a0c8b2b9868b1
refs/heads/master: 43e28f092b2fa4ebc46bdc210134a80610815785
12 changes: 6 additions & 6 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,6 +1828,11 @@ i915_gem_object_get_pages(struct drm_i915_gem_object *obj)
if (obj->pages)
return 0;

if (obj->madv != I915_MADV_WILLNEED) {
DRM_ERROR("Attempting to obtain a purgeable object\n");
return -EINVAL;
}

BUG_ON(obj->pages_pin_count);

ret = ops->get_pages(obj);
Expand Down Expand Up @@ -2440,7 +2445,7 @@ int
i915_gem_object_unbind(struct drm_i915_gem_object *obj)
{
drm_i915_private_t *dev_priv = obj->base.dev->dev_private;
int ret = 0;
int ret;

if (obj->gtt_space == NULL)
return 0;
Expand Down Expand Up @@ -2880,11 +2885,6 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
bool mappable, fenceable;
int ret;

if (obj->madv != I915_MADV_WILLNEED) {
DRM_ERROR("Attempting to bind a purgeable object\n");
return -EINVAL;
}

fence_size = i915_gem_get_gtt_size(dev,
obj->base.size,
obj->tiling_mode);
Expand Down

0 comments on commit c8e633f

Please sign in to comment.