Commit e5281ccd authored by Chris Wilson's avatar Chris Wilson

drm/i915: Eliminate nested get/put pages

By using read_cache_page() for individual pages during pwrite/pread we
can eliminate an unnecessary large allocation (and immediate free) of
obj->pages. Also this eliminates any potential nesting of get/put pages,
simplifying the code and preparing the path for greater things.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 39a01d1f
...@@ -747,15 +747,6 @@ struct drm_i915_gem_object { ...@@ -747,15 +747,6 @@ struct drm_i915_gem_object {
*/ */
unsigned int madv : 2; unsigned int madv : 2;
/**
* Refcount for the pages array. With the current locking scheme, there
* are at most two concurrent users: Binding a bo to the gtt and
* pwrite/pread using physical addresses. So two bits for a maximum
* of two users are enough.
*/
unsigned int pages_refcount : 2;
#define DRM_I915_GEM_OBJECT_MAX_PAGES_REFCOUNT 0x3
/** /**
* Current tiling mode for the object. * Current tiling mode for the object.
*/ */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment