Lines Matching refs:src
40 (const _type * dst, const _type * src, size_t size)\
45 if (*dst++ != *src++) \
61 const _type * dst, const _type * src, size_t size) \
64 if (*--dst != *--src) \
110 if (spill && spill == SPILL(src, _type) && \
113 diff_offs = vmw_find_first_diff_u8(dst, src, spill); \
118 src += spill; \
123 if (!spill && !SPILL(src, _type)) { \
127 ((_type *) dst, (_type *) src, to_copy); \
132 src += diff_offs; \
150 static size_t vmw_find_first_diff(const u8 *dst, const u8 *src, size_t size, in vmw_find_first_diff() argument
166 return round_down(offset + vmw_find_first_diff_u8(dst, src, size), in vmw_find_first_diff()
184 if (spill && spill <= size && spill == SPILL(src, _type)) { \
185 diff_offs = vmw_find_last_diff_u8(dst, src, spill); \
192 src -= spill; \
196 if (!spill && !SPILL(src, _type)) { \
200 ((_type *) dst, (_type *) src, to_copy); \
206 src -= to_copy - diff_offs; \
222 static ssize_t vmw_find_last_diff(const u8 *dst, const u8 *src, size_t size, in vmw_find_last_diff() argument
226 src += size; in vmw_find_last_diff()
234 return round_down(vmw_find_last_diff_u8(dst, src, size) - 1, in vmw_find_last_diff()
248 void vmw_memcpy(struct vmw_diff_cpy *diff, u8 *dest, const u8 *src, size_t n) in vmw_memcpy() argument
250 memcpy(dest, src, n); in vmw_memcpy()
290 void vmw_diff_memcpy(struct vmw_diff_cpy *diff, u8 *dest, const u8 *src, in vmw_diff_memcpy() argument
299 csize = vmw_find_first_diff(dest, src, n, diff->cpp); in vmw_diff_memcpy()
310 src += csize; in vmw_diff_memcpy()
312 csize = vmw_find_last_diff(dest, src, n, diff->cpp); in vmw_diff_memcpy()
317 memcpy(dest, src, byte_len); in vmw_diff_memcpy()
457 u32 dst_stride, struct vmw_bo *src, in vmw_external_bo_copy() argument
465 size_t src_size = src->tbo.resource->size; in vmw_external_bo_copy()
473 vsrc = map_external(src, &src_map); in vmw_external_bo_copy()
511 unmap_external(src, &src_map); in vmw_external_bo_copy()
548 struct ttm_buffer_object *src = &vmw_src->tbo; in vmw_bo_cpu_blit() local
559 bool src_external = (src->ttm->page_flags & TTM_TT_FLAG_EXTERNAL) != 0; in vmw_bo_cpu_blit()
562 if (WARN_ON(dst == src)) in vmw_bo_cpu_blit()
568 if (!(src->pin_count)) in vmw_bo_cpu_blit()
569 dma_resv_assert_held(src->base.resv); in vmw_bo_cpu_blit()
577 if (!ttm_tt_is_populated(src->ttm)) { in vmw_bo_cpu_blit()
578 ret = src->bdev->funcs->ttm_tt_populate(src->bdev, src->ttm, &ctx); in vmw_bo_cpu_blit()
588 if (!src->ttm->pages && src->ttm->sg) { in vmw_bo_cpu_blit()
589 src_pages = kvmalloc_array(src->ttm->num_pages, in vmw_bo_cpu_blit()
593 ret = drm_prime_sg_to_page_array(src->ttm->sg, src_pages, in vmw_bo_cpu_blit()
594 src->ttm->num_pages); in vmw_bo_cpu_blit()
616 d.src_pages = src->ttm->pages ? src->ttm->pages : src_pages; in vmw_bo_cpu_blit()
618 d.src_num_pages = PFN_UP(src->resource->size); in vmw_bo_cpu_blit()
620 d.src_prot = ttm_io_prot(src, src->resource, PAGE_KERNEL); in vmw_bo_cpu_blit()