diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-08 23:01:37 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2013-05-08 23:01:37 +0000 |
commit | d5b099d14dac33181ffd2cc2d172d3c0599ea180 (patch) | |
tree | 72c5d0cc60315e26cd084d40f6c417265d0b9609 /sys/dev/pci | |
parent | 5b0be084b8b2893ef0427bab291a616bad0cbd25 (diff) |
The "locking" in i915_gem_object_move_to_inactive() makes no sense. Get rid
of it. It's implemented using "simple" locks anyway, which are no-ops.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem.c | 20 |
2 files changed, 4 insertions, 19 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.h b/sys/dev/pci/drm/i915/i915_drv.h index bc938450ca8..7e2e2fe046f 100644 --- a/sys/dev/pci/drm/i915/i915_drv.h +++ b/sys/dev/pci/drm/i915/i915_drv.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.h,v 1.17 2013/05/05 13:55:36 kettenis Exp $ */ +/* $OpenBSD: i915_drv.h,v 1.18 2013/05/08 23:01:36 kettenis Exp $ */ /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- */ /* @@ -1071,7 +1071,6 @@ int i915_gem_idle(struct drm_device *); void i915_gem_object_move_to_active(struct drm_i915_gem_object *, struct intel_ring_buffer *); void i915_gem_object_move_to_inactive(struct drm_i915_gem_object *); -void i915_gem_object_move_to_inactive_locked(struct drm_i915_gem_object *); int i915_add_request(struct intel_ring_buffer *, struct drm_file *, u32 *); int init_pipe_control(struct intel_ring_buffer *); void cleanup_status_page(struct intel_ring_buffer *); diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c index c3c23a5804d..b67f8c9431f 100644 --- a/sys/dev/pci/drm/i915/i915_gem.c +++ b/sys/dev/pci/drm/i915/i915_gem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem.c,v 1.15 2013/05/05 13:55:36 kettenis Exp $ */ +/* $OpenBSD: i915_gem.c,v 1.16 2013/05/08 23:01:36 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -1167,15 +1167,12 @@ i915_gem_object_move_to_active(struct drm_i915_gem_object *obj, } } -/* called locked */ void -i915_gem_object_move_to_inactive_locked(struct drm_i915_gem_object *obj) +i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) { struct drm_device *dev = obj->base.dev; struct inteldrm_softc *dev_priv = dev->dev_private; - DRM_OBJ_ASSERT_LOCKED(&obj->base); - inteldrm_verify_inactive(dev_priv, __FILE__, __LINE__); BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS); BUG_ON(!obj->active); @@ -1197,18 +1194,7 @@ i915_gem_object_move_to_inactive_locked(struct drm_i915_gem_object *obj) obj->active = 0; drm_gem_object_unreference(&obj->base); - inteldrm_verify_inactive(dev_priv, __FILE__, __LINE__); -} - -/* If you call this on an object that you have held, you must have your own - * reference, not just the reference from the active list. - */ -void -i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) -{ - drm_lock_obj(&obj->base); - /* unlocks object lock */ - i915_gem_object_move_to_inactive_locked(obj); + WARN_ON(i915_verify_lists(dev)); } int |