[03/10] drm/i915: Use insert_page for pwrite_fast

Submitted by ankitprasad.r.sharma@intel.com on Feb. 4, 2016, 9:30 a.m.

Details

Message ID 1454578211-24823-4-git-send-email-ankitprasad.r.sharma@intel.com
State New
Headers show
Series "Support for creating/using Stolen memory backed objects" ( rev: 9 ) in Intel GFX

Not browsing as part of any series.

Commit Message

ankitprasad.r.sharma@intel.com Feb. 4, 2016, 9:30 a.m.
From: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>

In pwrite_fast, map an object page by page if obj_ggtt_pin fails. First,
we try a nonblocking pin for the whole object (since that is fastest if
reused), then failing that we try to grab one page in the mappable
aperture. It also allows us to handle objects larger than the mappable
aperture (e.g. if we need to pwrite with vGPU restricting the aperture
to a measely 8MiB or something like that).

v2: Pin pages before starting pwrite, Combined duplicate loops (Chris)

v3: Combined loops based on local patch by Chris (Chris)

v4: Added i915 wrapper function for drm_mm_insert_node_in_range (Chris)

v5: Renamed wrapper function for drm_mm_insert_node_in_range (Chris)

v5: Added wrapper for drm_mm_remove_node() (Chris)

v6: Added get_pages call before pinning the pages (Tvrtko)
Added remove_mappable_node() wrapper for drm_mm_remove_node() (Chris)

v7: Added size argument for insert_mappable_node (Tvrtko)

v8: Do not put_pages after pwrite, do memset of node in the wrapper
function (insert_mappable_node) (Chris)

Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 92 +++++++++++++++++++++++++++++++----------
 1 file changed, 70 insertions(+), 22 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a928823..49a03f2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -61,6 +61,24 @@  static bool cpu_write_needs_clflush(struct drm_i915_gem_object *obj)
 	return obj->pin_display;
 }
 
+static int
+insert_mappable_node(struct drm_i915_private *i915,
+                     struct drm_mm_node *node, u32 size)
+{
+	memset(node, 0, sizeof(*node));
+	return drm_mm_insert_node_in_range_generic(&i915->gtt.base.mm, node,
+						   size, 0, 0, 0,
+						   i915->gtt.mappable_end,
+						   DRM_MM_SEARCH_DEFAULT,
+						   DRM_MM_CREATE_DEFAULT);
+}
+
+static void
+remove_mappable_node(struct drm_mm_node *node)
+{
+	drm_mm_remove_node(node);
+}
+
 /* some bookkeeping */
 static void i915_gem_info_add_obj(struct drm_i915_private *dev_priv,
 				  size_t size)
@@ -760,20 +778,33 @@  fast_user_write(struct io_mapping *mapping,
  * user into the GTT, uncached.
  */
 static int
-i915_gem_gtt_pwrite_fast(struct drm_device *dev,
+i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
 			 struct drm_i915_gem_object *obj,
 			 struct drm_i915_gem_pwrite *args,
 			 struct drm_file *file)
 {
-	struct drm_i915_private *dev_priv = dev->dev_private;
-	ssize_t remain;
-	loff_t offset, page_base;
+	struct drm_mm_node node;
+	uint64_t remain, offset;
 	char __user *user_data;
-	int page_offset, page_length, ret;
+	int ret;
 
 	ret = i915_gem_obj_ggtt_pin(obj, 0, PIN_MAPPABLE | PIN_NONBLOCK);
-	if (ret)
-		goto out;
+	if (ret) {
+		ret = insert_mappable_node(i915, &node, PAGE_SIZE);
+		if (ret)
+			goto out;
+
+		ret = i915_gem_object_get_pages(obj);
+		if (ret) {
+			remove_mappable_node(&node);
+			goto out;
+		}
+
+		i915_gem_object_pin_pages(obj);
+	} else {
+		node.start = i915_gem_obj_ggtt_offset(obj);
+		node.allocated = false;
+	}
 
 	ret = i915_gem_object_set_to_gtt_domain(obj, true);
 	if (ret)
@@ -783,31 +814,39 @@  i915_gem_gtt_pwrite_fast(struct drm_device *dev,
 	if (ret)
 		goto out_unpin;
 
-	user_data = to_user_ptr(args->data_ptr);
-	remain = args->size;
-
-	offset = i915_gem_obj_ggtt_offset(obj) + args->offset;
-
 	intel_fb_obj_invalidate(obj, ORIGIN_GTT);
+	obj->dirty = true;
 
-	while (remain > 0) {
+	user_data = to_user_ptr(args->data_ptr);
+	offset = args->offset;
+	remain = args->size;
+	while (remain) {
 		/* Operation in this page
 		 *
 		 * page_base = page offset within aperture
 		 * page_offset = offset within page
 		 * page_length = bytes to copy for this page
 		 */
-		page_base = offset & PAGE_MASK;
-		page_offset = offset_in_page(offset);
-		page_length = remain;
-		if ((page_offset + remain) > PAGE_SIZE)
-			page_length = PAGE_SIZE - page_offset;
-
+		u32 page_base = node.start;
+		unsigned page_offset = offset_in_page(offset);
+		unsigned page_length = PAGE_SIZE - page_offset;
+		page_length = remain < page_length ? remain : page_length;
+		if (node.allocated) {
+			wmb();
+			i915->gtt.base.insert_page(&i915->gtt.base,
+						   i915_gem_object_get_dma_address(obj, offset >> PAGE_SHIFT),
+						   node.start,
+						   I915_CACHE_NONE,
+						   0);
+			wmb();
+		} else {
+			page_base += offset & PAGE_MASK;
+		}
 		/* If we get a fault while copying data, then (presumably) our
 		 * source page isn't available.  Return the error and we'll
 		 * retry in the slow path.
 		 */
-		if (fast_user_write(dev_priv->gtt.mappable, page_base,
+		if (fast_user_write(i915->gtt.mappable, page_base,
 				    page_offset, user_data, page_length)) {
 			ret = -EFAULT;
 			goto out_flush;
@@ -821,7 +860,16 @@  i915_gem_gtt_pwrite_fast(struct drm_device *dev,
 out_flush:
 	intel_fb_obj_flush(obj, false, ORIGIN_GTT);
 out_unpin:
-	i915_gem_object_ggtt_unpin(obj);
+	if (node.allocated) {
+		wmb();
+		i915->gtt.base.clear_range(&i915->gtt.base,
+					   node.start, node.size,
+					   true);
+		i915_gem_object_unpin_pages(obj);
+		remove_mappable_node(&node);
+	} else {
+		i915_gem_object_ggtt_unpin(obj);
+	}
 out:
 	return ret;
 }
@@ -1086,7 +1134,7 @@  i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 	if (obj->tiling_mode == I915_TILING_NONE &&
 	    obj->base.write_domain != I915_GEM_DOMAIN_CPU &&
 	    cpu_write_needs_clflush(obj)) {
-		ret = i915_gem_gtt_pwrite_fast(dev, obj, args, file);
+		ret = i915_gem_gtt_pwrite_fast(dev_priv, obj, args, file);
 		/* Note that the gtt paths might fail with non-page-backed user
 		 * pointers (e.g. gtt mappings when moving data between
 		 * textures). Fallback to the shmem path in that case. */

Comments

Hi Ankitprasad,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.5-rc2 next-20160204]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/ankitprasad-r-sharma-intel-com/Support-for-creating-using-Stolen-memory-backed-objects/20160204-175614
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   include/drm/drm_crtc.h:1533: warning: No description found for parameter 'mutex'
   include/drm/drm_crtc.h:1533: warning: No description found for parameter 'helper_private'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tile_idr'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'delayed_event'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'edid_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'dpms_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'path_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tile_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'plane_type_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'rotation_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_src_x'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_src_y'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_src_w'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_src_h'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_crtc_x'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_crtc_y'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_crtc_w'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_crtc_h'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_fb_id'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_crtc_id'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_active'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'prop_mode_id'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'dvi_i_subconnector_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'dvi_i_select_subconnector_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_subconnector_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_select_subconnector_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_mode_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_left_margin_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_right_margin_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_top_margin_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_bottom_margin_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_brightness_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_contrast_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_flicker_reduction_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_overscan_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_saturation_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'tv_hue_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'scaling_mode_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'aspect_ratio_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'dirty_info_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'suggested_x_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'suggested_y_property'
   include/drm/drm_crtc.h:2142: warning: No description found for parameter 'allow_fb_modifiers'
   include/drm/drm_dp_helper.h:749: warning: No description found for parameter 'i2c_nack_count'
   include/drm/drm_dp_helper.h:749: warning: No description found for parameter 'i2c_defer_count'
   drivers/gpu/drm/drm_dp_mst_topology.c:2305: warning: No description found for parameter 'connector'
   include/drm/drm_dp_mst_helper.h:98: warning: No description found for parameter 'cached_edid'
   include/drm/drm_dp_mst_helper.h:98: warning: No description found for parameter 'has_audio'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'max_dpcd_transaction_bytes'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'sink_count'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'total_slots'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'avail_slots'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'total_pbn'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'qlock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_msg_downq'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_down_in_progress'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payload_lock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'proposed_vcpis'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payloads'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'payload_mask'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'vcpi_mask'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_waitq'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'work'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'tx_work'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_list'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_lock'
   include/drm/drm_dp_mst_helper.h:471: warning: No description found for parameter 'destroy_connector_work'
   drivers/gpu/drm/drm_dp_mst_topology.c:2305: warning: No description found for parameter 'connector'
   drivers/gpu/drm/drm_irq.c:176: warning: No description found for parameter 'flags'
   include/drm/drmP.h:168: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:184: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:202: warning: No description found for parameter 'fmt'
   include/drm/drmP.h:247: warning: No description found for parameter 'dev'
   include/drm/drmP.h:247: warning: No description found for parameter 'data'
   include/drm/drmP.h:247: warning: No description found for parameter 'file_priv'
   include/drm/drmP.h:280: warning: No description found for parameter 'ioctl'
   include/drm/drmP.h:280: warning: No description found for parameter '_func'
   include/drm/drmP.h:280: warning: No description found for parameter '_flags'
   include/drm/drmP.h:360: warning: cannot understand function prototype: 'struct drm_lock_data '
   include/drm/drmP.h:413: warning: cannot understand function prototype: 'struct drm_driver '
   include/drm/drmP.h:670: warning: cannot understand function prototype: 'struct drm_info_list '
   include/drm/drmP.h:680: warning: cannot understand function prototype: 'struct drm_info_node '
   include/drm/drmP.h:690: warning: cannot understand function prototype: 'struct drm_minor '
   include/drm/drmP.h:738: warning: cannot understand function prototype: 'struct drm_device '
   drivers/gpu/drm/i915/intel_runtime_pm.c:2173: warning: No description found for parameter 'resume'
   drivers/gpu/drm/i915/intel_runtime_pm.c:2173: warning: No description found for parameter 'resume'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'wedged'
   drivers/gpu/drm/i915/i915_irq.c:2659: warning: No description found for parameter 'fmt'
   drivers/gpu/drm/i915/i915_gem.c:439: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:439: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:439: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:704: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:704: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:704: warning: No description found for parameter 'file'
>> drivers/gpu/drm/i915/i915_gem.c:785: warning: No description found for parameter 'i915'
   drivers/gpu/drm/i915/i915_gem.c:785: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:785: warning: No description found for parameter 'args'
   drivers/gpu/drm/i915/i915_gem.c:785: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1077: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1077: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1077: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1293: warning: No description found for parameter 'rps'
   drivers/gpu/drm/i915/i915_gem.c:1509: warning: No description found for parameter 'req'
   drivers/gpu/drm/i915/i915_gem.c:1544: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:1544: warning: No description found for parameter 'readonly'
   drivers/gpu/drm/i915/i915_gem.c:1667: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1667: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1667: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1730: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1730: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1730: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:1775: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:1775: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:1775: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:2063: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:2063: warning: No description found for parameter 'size'
   drivers/gpu/drm/i915/i915_gem.c:2063: warning: No description found for parameter 'tiling_mode'
   drivers/gpu/drm/i915/i915_gem.c:2063: warning: No description found for parameter 'fenced'
   drivers/gpu/drm/i915/i915_gem.c:2063: warning: Excess function parameter 'obj' description in 'i915_gem_get_gtt_alignment'
   drivers/gpu/drm/i915/i915_gem.c:2962: warning: No description found for parameter 'ring'
   drivers/gpu/drm/i915/i915_gem.c:3095: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3145: warning: No description found for parameter 'dev'
   drivers/gpu/drm/i915/i915_gem.c:3145: warning: No description found for parameter 'data'
   drivers/gpu/drm/i915/i915_gem.c:3145: warning: No description found for parameter 'file'
   drivers/gpu/drm/i915/i915_gem.c:3145: warning: Excess function parameter 'DRM_IOCTL_ARGS' description in 'i915_gem_wait_ioctl'
   drivers/gpu/drm/i915/i915_gem.c:3518: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3518: warning: No description found for parameter 'vm'
   drivers/gpu/drm/i915/i915_gem.c:3518: warning: No description found for parameter 'ggtt_view'
   drivers/gpu/drm/i915/i915_gem.c:3518: warning: No description found for parameter 'alignment'
   drivers/gpu/drm/i915/i915_gem.c:3518: warning: No description found for parameter 'flags'
   drivers/gpu/drm/i915/i915_gem.c:3773: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3773: warning: No description found for parameter 'write'
   drivers/gpu/drm/i915/i915_gem.c:3848: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:3848: warning: No description found for parameter 'cache_level'
   drivers/gpu/drm/i915/i915_gem.c:4122: warning: No description found for parameter 'obj'
   drivers/gpu/drm/i915/i915_gem.c:4122: warning: No description found for parameter 'write'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: No description found for parameter 'params'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'dev' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'file' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'ring' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'ctx' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'batch_obj' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'exec_start' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'dispatch_flags' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: No description found for parameter 'params'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'dev' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'file' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'ring' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'ctx' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'batch_obj' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'exec_start' description in 'intel_execlists_submission'
   drivers/gpu/drm/i915/intel_lrc.c:935: warning: Excess function parameter 'dispatch_flags' description in 'intel_execlists_submission'
   Warning: didn't use docs for i915_hotplug_interrupt_update
   Warning: didn't use docs for ilk_update_display_irq
   Warning: didn't use docs for ilk_update_gt_irq
   Warning: didn't use docs for snb_update_pm_irq
   Warning: didn't use docs for bdw_update_port_irq
   Warning: didn't use docs for bdw_update_pipe_irq
   Warning: didn't use docs for ibx_display_interrupt_update
   Warning: didn't use docs for i915_enable_asle_pipestat
   Warning: didn't use docs for ivybridge_parity_work
   Warning: didn't use docs for i915_reset_and_wakeup
   Warning: didn't use docs for i915_handle_error
   Warning: didn't use docs for intel_irq_install
   Warning: didn't use docs for intel_irq_uninstall

vim +/i915 +785 drivers/gpu/drm/i915/i915_gem.c

4f0c7cfb Ben Widawsky       2012-04-16  769  	vaddr = (void __force*)vaddr_atomic + page_offset;
4f0c7cfb Ben Widawsky       2012-04-16  770  	unwritten = __copy_from_user_inatomic_nocache(vaddr,
0839ccb8 Keith Packard      2008-10-30  771  						      user_data, length);
3e4d3af5 Peter Zijlstra     2010-10-26  772  	io_mapping_unmap_atomic(vaddr_atomic);
fbd5a26d Chris Wilson       2010-10-14  773  	return unwritten;
0839ccb8 Keith Packard      2008-10-30  774  }
0839ccb8 Keith Packard      2008-10-30  775  
3de09aa3 Eric Anholt        2009-03-09  776  /**
3de09aa3 Eric Anholt        2009-03-09  777   * This is the fast pwrite path, where we copy the data directly from the
3de09aa3 Eric Anholt        2009-03-09  778   * user into the GTT, uncached.
3de09aa3 Eric Anholt        2009-03-09  779   */
673a394b Eric Anholt        2008-07-30  780  static int
65858e3c Ankitprasad Sharma 2016-02-04  781  i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
05394f39 Chris Wilson       2010-11-08  782  			 struct drm_i915_gem_object *obj,
673a394b Eric Anholt        2008-07-30  783  			 struct drm_i915_gem_pwrite *args,
05394f39 Chris Wilson       2010-11-08  784  			 struct drm_file *file)
673a394b Eric Anholt        2008-07-30 @785  {
65858e3c Ankitprasad Sharma 2016-02-04  786  	struct drm_mm_node node;
65858e3c Ankitprasad Sharma 2016-02-04  787  	uint64_t remain, offset;
673a394b Eric Anholt        2008-07-30  788  	char __user *user_data;
65858e3c Ankitprasad Sharma 2016-02-04  789  	int ret;
935aaa69 Daniel Vetter      2012-03-25  790  
1ec9e26d Daniel Vetter      2014-02-14  791  	ret = i915_gem_obj_ggtt_pin(obj, 0, PIN_MAPPABLE | PIN_NONBLOCK);
65858e3c Ankitprasad Sharma 2016-02-04  792  	if (ret) {
65858e3c Ankitprasad Sharma 2016-02-04  793  		ret = insert_mappable_node(i915, &node, PAGE_SIZE);

:::::: The code at line 785 was first introduced by commit
:::::: 673a394b1e3b69be886ff24abfd6df97c52e8d08 drm: Add GEM ("graphics execution manager") to i915 driver.

:::::: TO: Eric Anholt <eric@anholt.net>
:::::: CC: Dave Airlie <airlied@linux.ie>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation