diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8413ffced815..0e207e6e0df8 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1618,7 +1618,7 @@ i915_gem_object_truncate(struct drm_i915_gem_object *obj) | |||
1618 | * To do this we must instruct the shmfs to drop all of its | 1618 | * To do this we must instruct the shmfs to drop all of its |
1619 | * backing pages, *now*. | 1619 | * backing pages, *now*. |
1620 | */ | 1620 | */ |
1621 | inode = obj->base.filp->f_path.dentry->d_inode; | 1621 | inode = file_inode(obj->base.filp); |
1622 | shmem_truncate_range(inode, 0, (loff_t)-1); | 1622 | shmem_truncate_range(inode, 0, (loff_t)-1); |
1623 | 1623 | ||
1624 | obj->madv = __I915_MADV_PURGED; | 1624 | obj->madv = __I915_MADV_PURGED; |
@@ -1783,7 +1783,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj) | |||
1783 | * | 1783 | * |
1784 | * Fail silently without starting the shrinker | 1784 | * Fail silently without starting the shrinker |
1785 | */ | 1785 | */ |
1786 | mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; | 1786 | mapping = file_inode(obj->base.filp)->i_mapping; |
1787 | gfp = mapping_gfp_mask(mapping); | 1787 | gfp = mapping_gfp_mask(mapping); |
1788 | gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD; | 1788 | gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD; |
1789 | gfp &= ~(__GFP_IO | __GFP_WAIT); | 1789 | gfp &= ~(__GFP_IO | __GFP_WAIT); |
@@ -3747,7 +3747,7 @@ struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev, | |||
3747 | mask |= __GFP_DMA32; | 3747 | mask |= __GFP_DMA32; |
3748 | } | 3748 | } |
3749 | 3749 | ||
3750 | mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; | 3750 | mapping = file_inode(obj->base.filp)->i_mapping; |
3751 | mapping_set_gfp_mask(mapping, mask); | 3751 | mapping_set_gfp_mask(mapping, mask); |
3752 | 3752 | ||
3753 | i915_gem_object_init(obj, &i915_gem_object_ops); | 3753 | i915_gem_object_init(obj, &i915_gem_object_ops); |
@@ -4232,7 +4232,7 @@ void i915_gem_free_all_phys_object(struct drm_device *dev) | |||
4232 | void i915_gem_detach_phys_object(struct drm_device *dev, | 4232 | void i915_gem_detach_phys_object(struct drm_device *dev, |
4233 | struct drm_i915_gem_object *obj) | 4233 | struct drm_i915_gem_object *obj) |
4234 | { | 4234 | { |
4235 | struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; | 4235 | struct address_space *mapping = file_inode(obj->base.filp)->i_mapping; |
4236 | char *vaddr; | 4236 | char *vaddr; |
4237 | int i; | 4237 | int i; |
4238 | int page_count; | 4238 | int page_count; |
@@ -4268,7 +4268,7 @@ i915_gem_attach_phys_object(struct drm_device *dev, | |||
4268 | int id, | 4268 | int id, |
4269 | int align) | 4269 | int align) |
4270 | { | 4270 | { |
4271 | struct address_space *mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping; | 4271 | struct address_space *mapping = file_inode(obj->base.filp)->i_mapping; |
4272 | drm_i915_private_t *dev_priv = dev->dev_private; | 4272 | drm_i915_private_t *dev_priv = dev->dev_private; |
4273 | int ret = 0; | 4273 | int ret = 0; |
4274 | int page_count; | 4274 | int page_count; |