CHROMIUM: drm/i915: Replace pin count BUG_ON with warning
authorSean Paul <seanpaul@chromium.org>
Wed, 16 May 2012 17:25:22 +0000 (13:25 -0400)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Jun 2012 06:48:18 +0000 (23:48 -0700)
commit226576aafeaaa0f7efa845b39594faa85bf92319
tree6f4bf57d56da894e854864c59d754fca3cb78546
parent5b2944bae767a200b88602f3fb47dd0a03271d49
CHROMIUM: drm/i915: Replace pin count BUG_ON with warning

This patch reduces the BUG_ON when pin_count reaches max to a warning.
The reason we want to just warn is because the unpin_work_fn work
function can get starved out during soft lockup. When the unpin worker
is starved, the pin_count rises, and the gem BUG_ON races the soft
lockup crash reporter.

The original intent of this BUG was to catch overflow cases when all of
the small bitfields in drm_i915_gem_object were combined into one
bitfield (commit 778c35444). Since pin leaks aren't an issue in steady
state, it should be fine to downgrade the error.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
BUG=chrome-os-partner:8552,chromium-os:30733
TEST=Tested on lumpy

Change-Id: Ibd7377385f36a722b588cfe4989b3e26d2647bd2
Reviewed-on: https://gerrit.chromium.org/gerrit/22829
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/i915/i915_gem.c