Lines Matching refs:front

168 void __intel_fb_invalidate(struct intel_frontbuffer *front,
172 struct drm_i915_private *i915 = intel_bo_to_i915(front->obj);
189 void __intel_fb_flush(struct intel_frontbuffer *front,
193 struct drm_i915_private *i915 = intel_bo_to_i915(front->obj);
209 struct intel_frontbuffer *front =
212 i915_gem_object_flush_if_display(front->obj);
213 intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
214 intel_frontbuffer_put(front);
219 * @front: GEM object to flush
224 void intel_frontbuffer_queue_flush(struct intel_frontbuffer *front)
226 if (!front)
229 kref_get(&front->ref);
230 if (!schedule_work(&front->flush_work))
231 intel_frontbuffer_put(front);
236 struct intel_frontbuffer *front =
237 container_of(ref, typeof(*front), write);
239 kref_get(&front->ref);
245 struct intel_frontbuffer *front =
246 container_of(ref, typeof(*front), write);
248 intel_frontbuffer_flush(front, ORIGIN_CS);
249 intel_frontbuffer_put(front);
253 __releases(&intel_bo_to_i915(front->obj)->display.fb_tracking.lock)
255 struct intel_frontbuffer *ret, *front =
256 container_of(ref, typeof(*front), ref);
257 struct drm_i915_gem_object *obj = front->obj;
259 drm_WARN_ON(&intel_bo_to_i915(obj)->drm, atomic_read(&front->bits));
267 i915_active_fini(&front->write);
268 kfree_rcu(front, rcu);
275 struct intel_frontbuffer *front, *cur;
277 front = i915_gem_object_get_frontbuffer(obj);
278 if (front)
279 return front;
281 front = kmalloc(sizeof(*front), GFP_KERNEL);
282 if (!front)
285 front->obj = obj;
286 kref_init(&front->ref);
287 atomic_set(&front->bits, 0);
288 i915_active_init(&front->write,
292 INIT_WORK(&front->flush_work, intel_frontbuffer_flush_work);
295 cur = i915_gem_object_set_frontbuffer(obj, front);
297 if (cur != front)
298 kfree(front);
302 void intel_frontbuffer_put(struct intel_frontbuffer *front)
304 kref_put_lock(&front->ref,
306 &intel_bo_to_i915(front->obj)->display.fb_tracking.lock);