drm/i915: fix the racy object accounting
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Jul 2013 20:40:23 +0000 (22:40 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 25 Jul 2013 13:30:54 +0000 (15:30 +0200)
commitc20e835586c0e4d08f891362b3c829d45ef45f9d
tree991c9c15408fa756f26ab3aec5d2b6fb38384f74
parented71f1b48e95408d0b3ded014a15fb9d52ac5a86
drm/i915: fix the racy object accounting

Just use a spinlock to protect them.

v2: Rebase onto the new object create refcount fix patch.

v3: Don't kill dev_priv->mm.object_memory as requested by Chris and
hence just use a spinlock instead of atomic_t.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67287
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c