@@ -694,6 +694,11 @@ i915_gem_object_unpin_pages(struct drm_i915_gem_object *obj)
int __i915_gem_object_put_pages(struct drm_i915_gem_object *obj);
int i915_gem_object_truncate(struct drm_i915_gem_object *obj);
+void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
+ enum i915_map_type type);
+void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
+ enum i915_map_type type);
+
/**
* i915_gem_object_pin_map - return a contiguous mapping of the entire object
* @obj: the object to map into kernel address space
@@ -268,7 +268,7 @@ int __i915_gem_object_put_pages(struct drm_i915_gem_object *obj)
}
/* The 'mapping' part of i915_gem_object_pin_map() below */
-static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
+void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
enum i915_map_type type)
{
unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i;
@@ -325,7 +325,7 @@ static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
return vaddr ?: ERR_PTR(-ENOMEM);
}
-static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
+void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj,
enum i915_map_type type)
{
resource_size_t iomap = obj->mm.region->iomap.base -
Prepare the work for drm_panic support. They are used to map the current framebuffer, so the CPU can access it, and draws the panic screen. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> --- drivers/gpu/drm/i915/gem/i915_gem_object.h | 5 +++++ drivers/gpu/drm/i915/gem/i915_gem_pages.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)