• Home
  • Raw
  • Download

Lines Matching refs:ringbuf

46 		struct intel_ringbuffer *ringbuf = dctx->engine[ring->id].ringbuf;  in intel_ring_initialized()  local
48 return ringbuf->obj; in intel_ring_initialized()
61 void intel_ring_update_space(struct intel_ringbuffer *ringbuf) in intel_ring_update_space() argument
63 if (ringbuf->last_retired_head != -1) { in intel_ring_update_space()
64 ringbuf->head = ringbuf->last_retired_head; in intel_ring_update_space()
65 ringbuf->last_retired_head = -1; in intel_ring_update_space()
68 ringbuf->space = __intel_ring_space(ringbuf->head & HEAD_ADDR, in intel_ring_update_space()
69 ringbuf->tail, ringbuf->size); in intel_ring_update_space()
72 int intel_ring_space(struct intel_ringbuffer *ringbuf) in intel_ring_space() argument
74 intel_ring_update_space(ringbuf); in intel_ring_space()
75 return ringbuf->space; in intel_ring_space()
86 struct intel_ringbuffer *ringbuf = ring->buffer; in __intel_ring_advance() local
87 ringbuf->tail &= ringbuf->size - 1; in __intel_ring_advance()
90 ring->write_tail(ring, ringbuf->tail); in __intel_ring_advance()
577 struct intel_ringbuffer *ringbuf = ring->buffer; in init_ring_common() local
578 struct drm_i915_gem_object *obj = ringbuf->obj; in init_ring_common()
628 ((ringbuf->size - PAGE_SIZE) & RING_NR_PAGES) in init_ring_common()
645 ringbuf->last_retired_head = -1; in init_ring_common()
646 ringbuf->head = I915_READ_HEAD(ring); in init_ring_common()
647 ringbuf->tail = I915_READ_TAIL(ring) & TAIL_ADDR; in init_ring_common()
648 intel_ring_update_space(ringbuf); in init_ring_common()
2018 void intel_unpin_ringbuffer_obj(struct intel_ringbuffer *ringbuf) in intel_unpin_ringbuffer_obj() argument
2020 iounmap(ringbuf->virtual_start); in intel_unpin_ringbuffer_obj()
2021 ringbuf->virtual_start = NULL; in intel_unpin_ringbuffer_obj()
2022 i915_gem_object_ggtt_unpin(ringbuf->obj); in intel_unpin_ringbuffer_obj()
2026 struct intel_ringbuffer *ringbuf) in intel_pin_and_map_ringbuffer_obj() argument
2029 struct drm_i915_gem_object *obj = ringbuf->obj; in intel_pin_and_map_ringbuffer_obj()
2042 ringbuf->virtual_start = ioremap_wc(dev_priv->gtt.mappable_base + in intel_pin_and_map_ringbuffer_obj()
2043 i915_gem_obj_ggtt_offset(obj), ringbuf->size); in intel_pin_and_map_ringbuffer_obj()
2044 if (ringbuf->virtual_start == NULL) { in intel_pin_and_map_ringbuffer_obj()
2052 static void intel_destroy_ringbuffer_obj(struct intel_ringbuffer *ringbuf) in intel_destroy_ringbuffer_obj() argument
2054 drm_gem_object_unreference(&ringbuf->obj->base); in intel_destroy_ringbuffer_obj()
2055 ringbuf->obj = NULL; in intel_destroy_ringbuffer_obj()
2059 struct intel_ringbuffer *ringbuf) in intel_alloc_ringbuffer_obj() argument
2067 obj = i915_gem_object_create_stolen(dev, ringbuf->size); in intel_alloc_ringbuffer_obj()
2069 obj = i915_gem_alloc_object(dev, ringbuf->size); in intel_alloc_ringbuffer_obj()
2080 ringbuf->obj = obj; in intel_alloc_ringbuffer_obj()
2130 struct intel_ringbuffer *ringbuf; in intel_init_ring_buffer() local
2144 ringbuf = intel_engine_create_ringbuffer(ring, 32 * PAGE_SIZE); in intel_init_ring_buffer()
2145 if (IS_ERR(ringbuf)) in intel_init_ring_buffer()
2146 return PTR_ERR(ringbuf); in intel_init_ring_buffer()
2147 ring->buffer = ringbuf; in intel_init_ring_buffer()
2160 ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf); in intel_init_ring_buffer()
2164 intel_destroy_ringbuffer_obj(ringbuf); in intel_init_ring_buffer()
2175 intel_ringbuffer_free(ringbuf); in intel_init_ring_buffer()
2212 struct intel_ringbuffer *ringbuf = ring->buffer; in ring_wait_for_space() local
2217 if (intel_ring_space(ringbuf) >= n) in ring_wait_for_space()
2221 WARN_ON(ringbuf->reserved_in_use); in ring_wait_for_space()
2224 space = __intel_ring_space(request->postfix, ringbuf->tail, in ring_wait_for_space()
2225 ringbuf->size); in ring_wait_for_space()
2237 ringbuf->space = space; in ring_wait_for_space()
2241 static void __wrap_ring_buffer(struct intel_ringbuffer *ringbuf) in __wrap_ring_buffer() argument
2244 int rem = ringbuf->size - ringbuf->tail; in __wrap_ring_buffer()
2246 virt = ringbuf->virtual_start + ringbuf->tail; in __wrap_ring_buffer()
2251 ringbuf->tail = 0; in __wrap_ring_buffer()
2252 intel_ring_update_space(ringbuf); in __wrap_ring_buffer()
2276 request->ringbuf = request->ring->buffer; in intel_ring_alloc_request_extras()
2290 intel_ring_reserved_space_reserve(request->ringbuf, MIN_SPACE_FOR_ADD_REQUEST); in intel_ring_reserve_space()
2295 void intel_ring_reserved_space_reserve(struct intel_ringbuffer *ringbuf, int size) in intel_ring_reserved_space_reserve() argument
2297 WARN_ON(ringbuf->reserved_size); in intel_ring_reserved_space_reserve()
2298 WARN_ON(ringbuf->reserved_in_use); in intel_ring_reserved_space_reserve()
2300 ringbuf->reserved_size = size; in intel_ring_reserved_space_reserve()
2303 void intel_ring_reserved_space_cancel(struct intel_ringbuffer *ringbuf) in intel_ring_reserved_space_cancel() argument
2305 WARN_ON(ringbuf->reserved_in_use); in intel_ring_reserved_space_cancel()
2307 ringbuf->reserved_size = 0; in intel_ring_reserved_space_cancel()
2308 ringbuf->reserved_in_use = false; in intel_ring_reserved_space_cancel()
2311 void intel_ring_reserved_space_use(struct intel_ringbuffer *ringbuf) in intel_ring_reserved_space_use() argument
2313 WARN_ON(ringbuf->reserved_in_use); in intel_ring_reserved_space_use()
2315 ringbuf->reserved_in_use = true; in intel_ring_reserved_space_use()
2316 ringbuf->reserved_tail = ringbuf->tail; in intel_ring_reserved_space_use()
2319 void intel_ring_reserved_space_end(struct intel_ringbuffer *ringbuf) in intel_ring_reserved_space_end() argument
2321 WARN_ON(!ringbuf->reserved_in_use); in intel_ring_reserved_space_end()
2322 if (ringbuf->tail > ringbuf->reserved_tail) { in intel_ring_reserved_space_end()
2323 WARN(ringbuf->tail > ringbuf->reserved_tail + ringbuf->reserved_size, in intel_ring_reserved_space_end()
2325 ringbuf->tail - ringbuf->reserved_tail, ringbuf->reserved_size); in intel_ring_reserved_space_end()
2338 ringbuf->reserved_size = 0; in intel_ring_reserved_space_end()
2339 ringbuf->reserved_in_use = false; in intel_ring_reserved_space_end()
2344 struct intel_ringbuffer *ringbuf = ring->buffer; in __intel_ring_prepare() local
2345 int remain_usable = ringbuf->effective_size - ringbuf->tail; in __intel_ring_prepare()
2346 int remain_actual = ringbuf->size - ringbuf->tail; in __intel_ring_prepare()
2350 if (ringbuf->reserved_in_use) in __intel_ring_prepare()
2353 total_bytes = bytes + ringbuf->reserved_size; in __intel_ring_prepare()
2370 wait_bytes = remain_actual + ringbuf->reserved_size; in __intel_ring_prepare()
2371 } else if (total_bytes > ringbuf->space) { in __intel_ring_prepare()
2383 __wrap_ring_buffer(ringbuf); in __intel_ring_prepare()