diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-03-31 10:37:24 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-31 15:32:24 +0200 |
commit | 1c7c4301eeeff9af7e5009785aa721b0da6c9198 (patch) | |
tree | 481e5c7e8670c50f2436e4e53da4408e0a83f43f /drivers/gpu/drm/i915/intel_overlay.c | |
parent | 209c2a5ec1c9b59f1f43ecd882a2b04d8a6b65de (diff) | |
download | op-kernel-dev-1c7c4301eeeff9af7e5009785aa721b0da6c9198.zip op-kernel-dev-1c7c4301eeeff9af7e5009785aa721b0da6c9198.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index fd9ded7..b291f13 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -242,14 +242,14 @@ static int intel_overlay_on(struct intel_overlay *overlay) int ret; WARN_ON(overlay->active); - overlay->active = true; - WARN_ON(IS_I830(dev) && !(dev_priv->quirks & QUIRK_PIPEA_FORCE)); ret = intel_ring_begin(ring, 4); if (ret) return ret; + overlay->active = true; + intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_ON); intel_ring_emit(ring, overlay->flip_addr | OFC_UPDATE); intel_ring_emit(ring, MI_WAIT_FOR_EVENT | MI_WAIT_FOR_OVERLAY_FLIP); |