drm/i915: Mark the overlay active only if we got ring space
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 31 Mar 2015 07:37:24 +0000 (10:37 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 31 Mar 2015 13:32:24 +0000 (15:32 +0200)
commit1c7c4301eeeff9af7e5009785aa721b0da6c9198
tree481e5c7e8670c50f2436e4e53da4408e0a83f43f
parent209c2a5ec1c9b59f1f43ecd882a2b04d8a6b65de
drm/i915: Mark the overlay active only if we got ring space

After the GPU has wedged we can't turn on the overlay anymore. Only mark
it as active if we succeed in allocating ring space. This prevents a
WARN (previous;y a BUG) during driver unload if we attempted to use the
overlay after the GPU had already wedged.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_overlay.c