if (INTEL_INFO(dev)->gen < 7 || !HAS_FBC(dev))
return -ENODEV;
- drm_modeset_lock_all(dev);
*val = dev_priv->fbc.false_color;
- drm_modeset_unlock_all(dev);
return 0;
}
if (INTEL_INFO(dev)->gen < 7 || !HAS_FBC(dev))
return -ENODEV;
- drm_modeset_lock_all(dev);
mutex_lock(&dev_priv->fbc.lock);
reg = I915_READ(ILK_DPFC_CONTROL);
(reg & ~FBC_CTL_FALSE_COLOR));
mutex_unlock(&dev_priv->fbc.lock);
- drm_modeset_unlock_all(dev);
return 0;
}
if (crtc->atomic.update_wm_post)
intel_update_watermarks(&crtc->base);
- if (atomic->update_fbc) {
- mutex_lock(&dev->struct_mutex);
+ if (atomic->update_fbc)
intel_fbc_update(dev);
- mutex_unlock(&dev->struct_mutex);
- }
if (atomic->post_enable_primary)
intel_post_enable_primary(&crtc->base);
if (atomic->wait_for_flips)
intel_crtc_wait_for_pending_flips(&crtc->base);
- if (atomic->disable_fbc) {
- mutex_lock(&dev->struct_mutex);
+ if (atomic->disable_fbc)
intel_fbc_disable_crtc(crtc);
- mutex_unlock(&dev->struct_mutex);
- }
if (crtc->atomic.disable_ips)
hsw_disable_ips(crtc);
i915_gem_track_fb(intel_fb_obj(work->old_fb), obj,
to_intel_plane(primary)->frontbuffer_bit);
+ mutex_unlock(&dev->struct_mutex);
intel_fbc_disable(dev);
- mutex_unlock(&dev->struct_mutex);
intel_frontbuffer_flip_prepare(dev,
to_intel_plane(primary)->frontbuffer_bit);
intel_unregister_dsm_handler();
- mutex_lock(&dev->struct_mutex);
intel_fbc_disable(dev);
- mutex_unlock(&dev->struct_mutex);
/* flush any delayed tasks or pending work */
flush_scheduled_work();
struct drm_device *dev = work->crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- mutex_lock(&dev->struct_mutex);
mutex_lock(&dev_priv->fbc.lock);
if (work == dev_priv->fbc.fbc_work) {
/* Double check that we haven't switched fb without cancelling
dev_priv->fbc.fbc_work = NULL;
}
mutex_unlock(&dev_priv->fbc.lock);
- mutex_unlock(&dev->struct_mutex);
kfree(work);
}