if (!HAS_DISPLAY(display))
return;
+ spin_lock_init(&display->fb_tracking.frontbuffer_lock);
spin_lock_init(&display->fb_tracking.lock);
mutex_init(&display->backlight.lock);
mutex_init(&display->audio.mutex);
}
static void frontbuffer_release(struct kref *ref)
- __releases(&to_intel_display(front->obj->dev)->fb_tracking.lock)
+ __releases(&to_intel_display(front->obj->dev)->fb_tracking.frontbuffer_lock)
{
struct intel_frontbuffer *ret, *front =
container_of(ref, typeof(*front), ref);
ret = intel_bo_set_frontbuffer(obj, NULL);
drm_WARN_ON(display->drm, ret);
- spin_unlock(&display->fb_tracking.lock);
+ spin_unlock(&display->fb_tracking.frontbuffer_lock);
i915_active_fini(&front->write);
I915_ACTIVE_RETIRE_SLEEPS);
INIT_WORK(&front->flush_work, intel_frontbuffer_flush_work);
- spin_lock(&display->fb_tracking.lock);
+ spin_lock(&display->fb_tracking.frontbuffer_lock);
cur = intel_bo_set_frontbuffer(obj, front);
- spin_unlock(&display->fb_tracking.lock);
+ spin_unlock(&display->fb_tracking.frontbuffer_lock);
if (cur != front) {
drm_gem_object_put(obj);
{
kref_put_lock(&front->ref,
frontbuffer_release,
- &to_intel_display(front->obj->dev)->fb_tracking.lock);
+ &to_intel_display(front->obj->dev)->fb_tracking.frontbuffer_lock);
}
/**
* Set object's frontbuffer pointer. If frontbuffer is already set for the
* object keep it and return it's pointer to the caller. Please note that RCU
* mechanism is used to handle e.g. ongoing removal of frontbuffer pointer. This
- * function is protected by i915->display->fb_tracking.lock
+ * function is protected by i915->display->fb_tracking.frontbuffer_lock
*
* Return: pointer to frontbuffer which was set.
*/