drm/i915: Add support for mapping an object page by page
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Jun 2016 08:52:59 +0000 (14:22 +0530)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 13 Jun 2016 09:03:54 +0000 (10:03 +0100)
commitd6473f566417a507b9ea5b0fc44ff26d930d0e5d
tree59ddad85437028331a4496c8df8957f50f11d2e7
parent4e50f79622716b444b5b07d3d1b5870fe1794e24
drm/i915: Add support for mapping an object page by page

Introduced a new vm specfic callback insert_page() to program a single pte in
ggtt or ppgtt. This allows us to map a single page in to the mappable aperture
space. This can be iterated over to access the whole object by using space as
meagre as page size.

v2: Added low level rpm assertions to insert_page routines (Chris)

v3: Added POSTING_READ post register write (Tvrtko)

v4: Rebase (Ankit)

v5: Removed wmb() and FLUSH_CTL from insert_page, caller to take care
of it (Chris)

v6: insert_page not working correctly without FLSH_CNTL write, added the
write again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/char/agp/intel-gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
include/drm/intel-gtt.h