Skip to content

Commit

Permalink
drm/i915: drop KM_USER0 argument to k(un)map_atomic
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
Daniel Vetter authored and Keith Packard committed Oct 20, 2011
1 parent 24dd85f commit 130c256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,11 @@ i915_gem_shmem_pwrite_fast(struct drm_device *dev,
if (IS_ERR(page))
return PTR_ERR(page);

vaddr = kmap_atomic(page, KM_USER0);
vaddr = kmap_atomic(page);
ret = __copy_from_user_inatomic(vaddr + page_offset,
user_data,
page_length);
kunmap_atomic(vaddr, KM_USER0);
kunmap_atomic(vaddr);

set_page_dirty(page);
mark_page_accessed(page);
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_gem_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ i915_gem_object_check_coherency(struct drm_i915_gem_object *obj, int handle)
for (page = 0; page < obj->size / PAGE_SIZE; page++) {
int i;

backing_map = kmap_atomic(obj->pages[page], KM_USER0);
backing_map = kmap_atomic(obj->pages[page]);

if (backing_map == NULL) {
DRM_ERROR("failed to map backing page\n");
Expand All @@ -181,13 +181,13 @@ i915_gem_object_check_coherency(struct drm_i915_gem_object *obj, int handle)
}
}
}
kunmap_atomic(backing_map, KM_USER0);
kunmap_atomic(backing_map);
backing_map = NULL;
}

out:
if (backing_map != NULL)
kunmap_atomic(backing_map, KM_USER0);
kunmap_atomic(backing_map);
iounmap(gtt_mapping);

/* give syslog time to catch up */
Expand Down

0 comments on commit 130c256

Please sign in to comment.