Lines Matching refs:front

172 void __intel_fb_invalidate(struct intel_frontbuffer *front,  in __intel_fb_invalidate()  argument
176 struct drm_i915_private *i915 = intel_bo_to_i915(front->obj); in __intel_fb_invalidate()
194 void __intel_fb_flush(struct intel_frontbuffer *front, in __intel_fb_flush() argument
198 struct drm_i915_private *i915 = intel_bo_to_i915(front->obj); in __intel_fb_flush()
214 struct intel_frontbuffer *front = in intel_frontbuffer_flush_work() local
217 i915_gem_object_flush_if_display(front->obj); in intel_frontbuffer_flush_work()
218 intel_frontbuffer_flush(front, ORIGIN_DIRTYFB); in intel_frontbuffer_flush_work()
219 intel_frontbuffer_put(front); in intel_frontbuffer_flush_work()
229 void intel_frontbuffer_queue_flush(struct intel_frontbuffer *front) in intel_frontbuffer_queue_flush() argument
231 if (!front) in intel_frontbuffer_queue_flush()
234 kref_get(&front->ref); in intel_frontbuffer_queue_flush()
235 if (!schedule_work(&front->flush_work)) in intel_frontbuffer_queue_flush()
236 intel_frontbuffer_put(front); in intel_frontbuffer_queue_flush()
241 struct intel_frontbuffer *front = in frontbuffer_active() local
242 container_of(ref, typeof(*front), write); in frontbuffer_active()
244 kref_get(&front->ref); in frontbuffer_active()
250 struct intel_frontbuffer *front = in frontbuffer_retire() local
251 container_of(ref, typeof(*front), write); in frontbuffer_retire()
253 intel_frontbuffer_flush(front, ORIGIN_CS); in frontbuffer_retire()
254 intel_frontbuffer_put(front); in frontbuffer_retire()
258 __releases(&intel_bo_to_i915(front->obj)->display.fb_tracking.lock) in frontbuffer_release()
260 struct intel_frontbuffer *ret, *front = in frontbuffer_release() local
261 container_of(ref, typeof(*front), ref); in frontbuffer_release()
262 struct drm_i915_gem_object *obj = front->obj; in frontbuffer_release()
264 drm_WARN_ON(&intel_bo_to_i915(obj)->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 = i915_gem_object_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 = i915_gem_object_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 &intel_bo_to_i915(front->obj)->display.fb_tracking.lock); in intel_frontbuffer_put()