drm/i915: Reduce a pin-leak BUG into a WARN
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 15 Sep 2012 08:41:57 +0000 (09:41 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:30:54 +0000 (03:30 +0100)
commit1f2c01dad6a6d1da3c4d19379bbc383e072274d1
treea8aebe1c3f1449cb85f3d3c04d98cacb167a1ab8
parent622bba6d5a6210572325c89a7deb61175a2330a5
drm/i915: Reduce a pin-leak BUG into a WARN

commit 7e81a42e341a4f15d76624b7c02ffb21b085b56f upstream.

Pin-leaks persist and we get the perennial bug reports of machine
lockups to the BUG_ON(pin_count==MAX). If we instead loudly report that
the object cannot be pinned at that time it should prevent the driver from
locking up, and hopefully restore a semblance of working whilst still
leaving us a OOPS to debug.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_gem.c