Skip to contentSkip to conversation

drm/i915: GEM operations need to be done under the big lock

PATCH Julia Lawall 1 participant 1 message Jan 8, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 201601082045.Y5jJGnlE%[email protected]

#1 lore raw

Please check on line 690.

julia

Quoted 74 lines · kbuild test robot

CC: [email protected]
In-Reply-To: <[email protected]>
TO: Tvrtko Ursulin <[email protected]>
CC: [email protected]
CC:

Hi Tvrtko,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20160108]
[cannot apply to v4.4-rc8]
[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/Tvrtko-Ursulin/Misc-cleanups-and-locking-fixes/20160108-193552
base:   git://anongit.freedesktop.org/drm-intel for-linux-next

:::::: branch date: 32 minutes ago
:::::: commit date: 32 minutes ago

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/i915/i915_gem_stolen.c:707:1-7: preceding lock on line 670

git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 5b5dbd46f053c0864640da77cc3ff066a8276d91 vim +707 drivers/gpu/drm/i915/i915_gem_stolen.c

866d12b4 Chris Wilson   2013-02-19  664  	}
866d12b4 Chris Wilson   2013-02-19  665
3727d55e Jesse Barnes   2013-05-08  666  	/* Some objects just need physical mem from stolen space */
190d6cd5 Daniel Vetter  2013-07-04  667  	if (gtt_offset == I915_GTT_OFFSET_NONE)
3727d55e Jesse Barnes   2013-05-08  668  		return obj;
3727d55e Jesse Barnes   2013-05-08  669
5b5dbd46 Tvrtko Ursulin 2016-01-08 @670  	mutex_lock(&dev->struct_mutex);
5b5dbd46 Tvrtko Ursulin 2016-01-08  671
e656a6cb Daniel Vetter  2013-08-14  672  	vma = i915_gem_obj_lookup_or_create_vma(obj, ggtt);
db473b36 Dan Carpenter  2013-07-19  673  	if (IS_ERR(vma)) {
db473b36 Dan Carpenter  2013-07-19  674  		ret = PTR_ERR(vma);
5b5dbd46 Tvrtko Ursulin 2016-01-08  675  		mutex_unlock(&dev->struct_mutex);
7c4a7d60 Chris Wilson   2015-09-24  676  		goto err;
2f633156 Ben Widawsky   2013-07-17  677  	}
2f633156 Ben Widawsky   2013-07-17  678
866d12b4 Chris Wilson   2013-02-19  679  	/* To simplify the initialisation sequence between KMS and GTT,
866d12b4 Chris Wilson   2013-02-19  680  	 * we allow construction of the stolen object prior to
866d12b4 Chris Wilson   2013-02-19  681  	 * setting up the GTT space. The actual reservation will occur
866d12b4 Chris Wilson   2013-02-19  682  	 * later.
866d12b4 Chris Wilson   2013-02-19  683  	 */
2f633156 Ben Widawsky   2013-07-17  684  	vma->node.start = gtt_offset;
2f633156 Ben Widawsky   2013-07-17  685  	vma->node.size = size;
40d74980 Ben Widawsky   2013-07-31  686  	if (drm_mm_initialized(&ggtt->mm)) {
40d74980 Ben Widawsky   2013-07-31  687  		ret = drm_mm_reserve_node(&ggtt->mm, &vma->node);
b3a070cc Ben Widawsky   2013-07-05  688  		if (ret) {
866d12b4 Chris Wilson   2013-02-19  689  			DRM_DEBUG_KMS("failed to allocate stolen GTT space\n");
7c4a7d60 Chris Wilson   2015-09-24  690  			goto err;
866d12b4 Chris Wilson   2013-02-19  691  		}
866d12b4 Chris Wilson   2013-02-19  692
aff43766 Tvrtko Ursulin 2014-10-24  693  		vma->bound |= GLOBAL_BIND;
d0710abb Chris Wilson   2015-11-20  694  		__i915_vma_set_map_and_fenceable(vma);
7c4a7d60 Chris Wilson   2015-09-24  695  		list_add_tail(&vma->mm_list, &ggtt->inactive_list);
7c4a7d60 Chris Wilson   2015-09-24  696  	}
866d12b4 Chris Wilson   2013-02-19  697
35c20a60 Ben Widawsky   2013-05-31  698  	list_add_tail(&obj->global_list, &dev_priv->mm.bound_list);
d8ccba86 Daniel Vetter  2013-12-17  699  	i915_gem_object_pin_pages(obj);
866d12b4 Chris Wilson   2013-02-19  700
5b5dbd46 Tvrtko Ursulin 2016-01-08  701  	mutex_unlock(&dev->struct_mutex);
5b5dbd46 Tvrtko Ursulin 2016-01-08  702
866d12b4 Chris Wilson   2013-02-19  703  	return obj;
b3a070cc Ben Widawsky   2013-07-05  704
7c4a7d60 Chris Wilson   2015-09-24  705  err:
b3a070cc Ben Widawsky   2013-07-05  706  	drm_gem_object_unreference(&obj->base);
b3a070cc Ben Widawsky   2013-07-05 @707  	return NULL;
866d12b4 Chris Wilson   2013-02-19  708  }

:::::: The code at line 707 was first introduced by commit
:::::: b3a070cccb9135f8bec63d9f194ddaa422136fb0 drm: pre allocate node for create_block

Quoted 7 lines

:::::: TO: Ben Widawsky <[email protected]>
:::::: CC: Daniel Vetter <[email protected]>

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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx