Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357859
b: refs/heads/master
c: a39a680
h: refs/heads/master
i:
  357857: a1fb57d
  357855: bfb6ab8
v: v3
  • Loading branch information
Daniel Vetter committed Nov 29, 2012
1 parent efccd64 commit 413b6c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 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: 62810e5a9df3f47b7261e5d78fc1c33e550f2171
refs/heads/master: a39a68054f63da0ea3b4806e1bfad79670a93d9f
15 changes: 2 additions & 13 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ i915_gem_shmem_pread(struct drm_device *dev,
loff_t offset;
int shmem_page_offset, page_length, ret = 0;
int obj_do_bit17_swizzling, page_do_bit17_swizzling;
int hit_slowpath = 0;
int prefaulted = 0;
int needs_clflush = 0;
struct scatterlist *sg;
Expand Down Expand Up @@ -469,7 +468,6 @@ i915_gem_shmem_pread(struct drm_device *dev,
if (ret == 0)
goto next_page;

hit_slowpath = 1;
mutex_unlock(&dev->struct_mutex);

if (!prefaulted) {
Expand Down Expand Up @@ -502,12 +500,6 @@ i915_gem_shmem_pread(struct drm_device *dev,
out:
i915_gem_object_unpin_pages(obj);

if (hit_slowpath) {
/* Fixup: Kill any reinstated backing storage pages */
if (obj->madv == __I915_MADV_PURGED)
i915_gem_object_truncate(obj);
}

return ret;
}

Expand Down Expand Up @@ -838,11 +830,8 @@ i915_gem_shmem_pwrite(struct drm_device *dev,
i915_gem_object_unpin_pages(obj);

if (hit_slowpath) {
/* Fixup: Kill any reinstated backing storage pages */
if (obj->madv == __I915_MADV_PURGED)
i915_gem_object_truncate(obj);
/* and flush dirty cachelines in case the object isn't in the cpu write
* domain anymore. */
/* Fixup: Flush dirty cachelines in case the object isn't in the
* cpu write domain anymore. */
if (obj->base.write_domain != I915_GEM_DOMAIN_CPU) {
i915_gem_clflush_object(obj);
i915_gem_chipset_flush(dev);
Expand Down

0 comments on commit 413b6c7

Please sign in to comment.