Lines Matching refs:front
172 void __intel_fb_invalidate(struct intel_frontbuffer *front, in __intel_fb_invalidate() argument
176 struct intel_display *display = to_intel_display(front->obj->dev); in __intel_fb_invalidate()
193 void __intel_fb_flush(struct intel_frontbuffer *front, in __intel_fb_flush() argument
197 struct intel_display *display = to_intel_display(front->obj->dev); in __intel_fb_flush()
213 struct intel_frontbuffer *front = in intel_frontbuffer_flush_work() local
216 intel_bo_flush_if_display(front->obj); in intel_frontbuffer_flush_work()
217 intel_frontbuffer_flush(front, ORIGIN_DIRTYFB); in intel_frontbuffer_flush_work()
218 intel_frontbuffer_put(front); in intel_frontbuffer_flush_work()
228 void intel_frontbuffer_queue_flush(struct intel_frontbuffer *front) in intel_frontbuffer_queue_flush() argument
230 if (!front) in intel_frontbuffer_queue_flush()
233 kref_get(&front->ref); in intel_frontbuffer_queue_flush()
234 if (!schedule_work(&front->flush_work)) in intel_frontbuffer_queue_flush()
235 intel_frontbuffer_put(front); in intel_frontbuffer_queue_flush()
240 struct intel_frontbuffer *front = in frontbuffer_active() local
241 container_of(ref, typeof(*front), write); in frontbuffer_active()
243 kref_get(&front->ref); in frontbuffer_active()
249 struct intel_frontbuffer *front = in frontbuffer_retire() local
250 container_of(ref, typeof(*front), write); in frontbuffer_retire()
252 intel_frontbuffer_flush(front, ORIGIN_CS); in frontbuffer_retire()
253 intel_frontbuffer_put(front); in frontbuffer_retire()
257 __releases(&to_intel_display(front->obj->dev)->fb_tracking.lock) in frontbuffer_release()
259 struct intel_frontbuffer *ret, *front = in frontbuffer_release() local
260 container_of(ref, typeof(*front), ref); in frontbuffer_release()
261 struct drm_gem_object *obj = front->obj; in frontbuffer_release()
264 drm_WARN_ON(display->drm, atomic_read(&front->bits)); in frontbuffer_release()
272 i915_active_fini(&front->write); in frontbuffer_release()
273 kfree_rcu(front, rcu); in frontbuffer_release()
280 struct intel_frontbuffer *front, *cur; in intel_frontbuffer_get() local
282 front = intel_bo_get_frontbuffer(obj); in intel_frontbuffer_get()
283 if (front) in intel_frontbuffer_get()
284 return front; in intel_frontbuffer_get()
286 front = kmalloc(sizeof(*front), GFP_KERNEL); in intel_frontbuffer_get()
287 if (!front) in intel_frontbuffer_get()
290 front->obj = obj; in intel_frontbuffer_get()
291 kref_init(&front->ref); in intel_frontbuffer_get()
292 atomic_set(&front->bits, 0); in intel_frontbuffer_get()
293 i915_active_init(&front->write, in intel_frontbuffer_get()
297 INIT_WORK(&front->flush_work, intel_frontbuffer_flush_work); in intel_frontbuffer_get()
300 cur = intel_bo_set_frontbuffer(obj, front); in intel_frontbuffer_get()
302 if (cur != front) in intel_frontbuffer_get()
303 kfree(front); in intel_frontbuffer_get()
307 void intel_frontbuffer_put(struct intel_frontbuffer *front) in intel_frontbuffer_put() argument
309 kref_put_lock(&front->ref, in intel_frontbuffer_put()
311 &to_intel_display(front->obj->dev)->fb_tracking.lock); in intel_frontbuffer_put()