Lines Matching +full:page +full:- +full:offset
2 * SPDX-License-Identifier: MIT
22 #define obj_to_i915(obj__) to_i915((obj__)->base.dev)
28 if (overflows_type(size, obj->base.size)) in i915_gem_object_size_2big()
87 * i915_gem_object_lookup_rcu - look up a temporary GEM object from its handle
102 return idr_find(&file->object_idr, handle); in i915_gem_object_lookup_rcu()
108 if (obj && !kref_get_unless_zero(&obj->base.refcount)) in i915_gem_object_get_rcu()
135 drm_gem_object_get(&obj->base); in i915_gem_object_get()
143 __drm_gem_object_put(&obj->base); in i915_gem_object_put()
146 #define assert_object_held(obj) dma_resv_assert_held((obj)->base.resv)
158 kref_read(&obj->base.refcount) > 0) in assert_object_held_shared()
169 ret = dma_resv_lock_interruptible(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
171 ret = dma_resv_lock(obj->base.resv, ww ? &ww->ctx : NULL); in __i915_gem_object_lock()
175 list_add_tail(&obj->obj_link, &ww->obj_list); in __i915_gem_object_lock()
177 if (ret == -EALREADY) in __i915_gem_object_lock()
180 if (ret == -EDEADLK) { in __i915_gem_object_lock()
182 ww->contended = obj; in __i915_gem_object_lock()
191 return __i915_gem_object_lock(obj, ww, ww && ww->intr); in i915_gem_object_lock()
197 WARN_ON(ww && !ww->intr); in i915_gem_object_lock_interruptible()
205 return dma_resv_trylock(obj->base.resv); in i915_gem_object_trylock()
207 return ww_mutex_trylock(&obj->base.resv->lock, &ww->ctx); in i915_gem_object_trylock()
212 if (obj->ops->adjust_lru) in i915_gem_object_unlock()
213 obj->ops->adjust_lru(obj); in i915_gem_object_unlock()
215 dma_resv_unlock(obj->base.resv); in i915_gem_object_unlock()
221 obj->flags |= I915_BO_READONLY; in i915_gem_object_set_readonly()
227 return obj->flags & I915_BO_READONLY; in i915_gem_object_is_readonly()
233 return obj->flags & I915_BO_ALLOC_CONTIGUOUS; in i915_gem_object_is_contiguous()
239 return obj->flags & I915_BO_ALLOC_VOLATILE; in i915_gem_object_is_volatile()
245 obj->flags |= I915_BO_ALLOC_VOLATILE; in i915_gem_object_set_volatile()
251 return test_bit(I915_TILING_QUIRK_BIT, &obj->flags); in i915_gem_object_has_tiling_quirk()
257 set_bit(I915_TILING_QUIRK_BIT, &obj->flags); in i915_gem_object_set_tiling_quirk()
263 clear_bit(I915_TILING_QUIRK_BIT, &obj->flags); in i915_gem_object_clear_tiling_quirk()
269 return obj->flags & I915_BO_PROTECTED; in i915_gem_object_is_protected()
276 return obj->ops->flags & flags; in i915_gem_object_type_has()
288 !obj->is_dpt; in i915_gem_object_is_shrinkable()
312 return READ_ONCE(obj->frontbuffer) || obj->is_dpt; in i915_gem_object_is_framebuffer()
318 return obj->tiling_and_stride & TILING_MASK; in i915_gem_object_get_tiling()
330 return obj->tiling_and_stride & STRIDE_MASK; in i915_gem_object_get_stride()
357 * __i915_gem_object_page_iter_get_sg - helper to find the target scatterlist
358 * pointer and the target page position using pgoff_t n input argument and
361 * @iter: i915 GEM buffer object page iterator
362 * @n: page offset
363 * @offset: searched physical offset,
364 * it will be used for returning physical page offset value
371 * The target scatterlist pointer and the target page position.
379 unsigned int *offset);
382 * i915_gem_object_page_iter_get_sg - wrapper macro for
385 * @it: i915 GEM buffer object page iterator
386 * @n: page offset
387 * @offset: searched physical offset,
388 * it will be used for returning physical page offset value
395 * The target scatterlist pointer and the target page position.
397 * In order to avoid the truncation of the input parameter, it checks the page
398 * offset n's type from the input parameter before calling
401 #define i915_gem_object_page_iter_get_sg(obj, it, n, offset) ({ \ argument
403 __i915_gem_object_page_iter_get_sg(obj, it, n, offset); \
407 * __i915_gem_object_get_sg - helper to find the target scatterlist
408 * pointer and the target page position using pgoff_t n input argument and
411 * @n: page offset
412 * @offset: searched physical offset,
413 * it will be used for returning physical page offset value
419 * The target scatterlist pointer and the target page position.
426 unsigned int *offset) in __i915_gem_object_get_sg() argument
428 return __i915_gem_object_page_iter_get_sg(obj, &obj->mm.get_page, n, offset); in __i915_gem_object_get_sg()
432 * i915_gem_object_get_sg - wrapper macro for __i915_gem_object_get_sg()
434 * @n: page offset
435 * @offset: searched physical offset,
436 * it will be used for returning physical page offset value
439 * The target scatterlist pointer and the target page position.
441 * In order to avoid the truncation of the input parameter, it checks the page
442 * offset n's type from the input parameter before calling
446 #define i915_gem_object_get_sg(obj, n, offset) ({ \ argument
448 __i915_gem_object_get_sg(obj, n, offset); \
452 * __i915_gem_object_get_sg_dma - helper to find the target scatterlist
453 * pointer and the target page position using pgoff_t n input argument and
456 * @n: page offset
457 * @offset: searched physical offset,
458 * it will be used for returning physical page offset value
464 * The target scatterlist pointer and the target page position.
471 unsigned int *offset) in __i915_gem_object_get_sg_dma() argument
473 return __i915_gem_object_page_iter_get_sg(obj, &obj->mm.get_dma_page, n, offset); in __i915_gem_object_get_sg_dma()
477 * i915_gem_object_get_sg_dma - wrapper macro for __i915_gem_object_get_sg_dma()
479 * @n: page offset
480 * @offset: searched physical offset,
481 * it will be used for returning physical page offset value
484 * The target scatterlist pointer and the target page position.
486 * In order to avoid the truncation of the input parameter, it checks the page
487 * offset n's type from the input parameter before calling
491 #define i915_gem_object_get_sg_dma(obj, n, offset) ({ \ argument
493 __i915_gem_object_get_sg_dma(obj, n, offset); \
497 * __i915_gem_object_get_page - helper to find the target page with a page offset
499 * @n: page offset
506 * The target page pointer.
511 struct page *
515 * i915_gem_object_get_page - wrapper macro for __i915_gem_object_get_page
517 * @n: page offset
520 * The target page pointer.
522 * In order to avoid the truncation of the input parameter, it checks the page
523 * offset n's type from the input parameter before calling
533 * __i915_gem_object_get_dirty_page - helper to find the target page with a page
534 * offset
536 * @n: page offset
538 * It works like i915_gem_object_get_page(), but it marks the returned page dirty.
541 * The target page pointer.
546 struct page *
550 * i915_gem_object_get_dirty_page - wrapper macro for __i915_gem_object_get_dirty_page
552 * @n: page offset
555 * The target page pointer.
557 * In order to avoid the truncation of the input parameter, it checks the page
558 * offset n's type from the input parameter before calling
568 * __i915_gem_object_get_dma_address_len - helper to get bus addresses of
571 * @n: page offset
585 * i915_gem_object_get_dma_address_len - wrapper macro for
588 * @n: page offset
594 * In order to avoid the truncation of the input parameter, it checks the page
595 * offset n's type from the input parameter before calling
606 * __i915_gem_object_get_dma_address - helper to get bus addresses of
609 * @n: page offset
621 * i915_gem_object_get_dma_address - wrapper macro for
624 * @n: page offset
629 * In order to avoid the truncation of the input parameter, it checks the page
630 * offset n's type from the input parameter before calling
651 if (atomic_inc_not_zero(&obj->mm.pages_pin_count)) in i915_gem_object_pin_pages()
662 return !IS_ERR_OR_NULL(READ_ONCE(obj->mm.pages)); in i915_gem_object_has_pages()
670 atomic_inc(&obj->mm.pages_pin_count); in __i915_gem_object_pin_pages()
676 return atomic_read(&obj->mm.pages_pin_count); in i915_gem_object_has_pinned_pages()
685 atomic_dec(&obj->mm.pages_pin_count); in __i915_gem_object_unpin_pages()
698 * i915_gem_object_pin_map - return a contiguous mapping of the entire object
720 unsigned long offset,
724 __i915_gem_object_flush_map(obj, 0, obj->base.size); in i915_gem_object_flush_map()
728 * i915_gem_object_unpin_map - releases an earlier mapping
793 obj->read_domains = I915_GEM_DOMAIN_CPU; in __start_cpu_write()
794 obj->write_domain = I915_GEM_DOMAIN_CPU; in __start_cpu_write()
796 obj->cache_dirty = true; in __start_cpu_write()
809 int i915_gem_object_read_from_page(struct drm_i915_gem_object *obj, u64 offset, void *dst, int size…
854 return obj->userptr.notifier.mm; in i915_gem_object_is_userptr()
863 …_gem_object_userptr_submit_init(struct drm_i915_gem_object *obj) { GEM_BUG_ON(1); return -ENODEV; } in i915_gem_object_userptr_submit_init()
864 …_gem_object_userptr_submit_done(struct drm_i915_gem_object *obj) { GEM_BUG_ON(1); return -ENODEV; } in i915_gem_object_userptr_submit_done()
865 …915_gem_object_userptr_validate(struct drm_i915_gem_object *obj) { GEM_BUG_ON(1); return -ENODEV; } in i915_gem_object_userptr_validate()