Lines Matching refs:ctx
216 copybit_context_t* ctx = (copybit_context_t*)(ptr); in c2d_wait_loop() local
221 while(ctx->stop_thread == false) { in c2d_wait_loop()
222 pthread_mutex_lock(&ctx->wait_cleanup_lock); in c2d_wait_loop()
223 while(ctx->wait_timestamp == false && !ctx->stop_thread) { in c2d_wait_loop()
224 pthread_cond_wait(&(ctx->wait_cleanup_cond), in c2d_wait_loop()
225 &(ctx->wait_cleanup_lock)); in c2d_wait_loop()
227 if(ctx->wait_timestamp) { in c2d_wait_loop()
228 if(LINK_c2dWaitTimestamp(ctx->time_stamp)) { in c2d_wait_loop()
231 ctx->wait_timestamp = false; in c2d_wait_loop()
234 if (ctx->mapped_gpu_addr[i]) { in c2d_wait_loop()
235 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[i]); in c2d_wait_loop()
236 ctx->mapped_gpu_addr[i] = 0; in c2d_wait_loop()
240 ctx->blit_rgb_count = 0; in c2d_wait_loop()
241 ctx->blit_yuv_2_plane_count = 0; in c2d_wait_loop()
242 ctx->blit_yuv_3_plane_count = 0; in c2d_wait_loop()
243 ctx->blit_count = 0; in c2d_wait_loop()
244 ctx->dst_surface_mapped = false; in c2d_wait_loop()
245 ctx->dst_surface_base = 0; in c2d_wait_loop()
247 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in c2d_wait_loop()
248 if(ctx->stop_thread) in c2d_wait_loop()
335 static size_t c2d_get_gpuaddr(copybit_context_t* ctx, in c2d_get_gpuaddr() argument
361 if (ctx->mapped_gpu_addr[freeindex] == 0) { in c2d_get_gpuaddr()
376 ctx->mapped_gpu_addr[freeindex] = (size_t)gpuaddr; in c2d_get_gpuaddr()
383 static void unmap_gpuaddr(copybit_context_t* ctx, int mapped_idx) in unmap_gpuaddr() argument
385 if (!ctx || (mapped_idx == -1)) in unmap_gpuaddr()
388 if (ctx->mapped_gpu_addr[mapped_idx]) { in unmap_gpuaddr()
389 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[mapped_idx]); in unmap_gpuaddr()
390 ctx->mapped_gpu_addr[mapped_idx] = 0; in unmap_gpuaddr()
493 static int set_image(copybit_context_t* ctx, uint32 surfaceId, in set_image() argument
521 gpuaddr = c2d_get_gpuaddr(ctx, handle, mapped_idx); in set_image()
550 unmap_gpuaddr(ctx, mapped_idx); in set_image()
568 unmap_gpuaddr(ctx, mapped_idx); in set_image()
589 unmap_gpuaddr(ctx, mapped_idx); in set_image()
594 unmap_gpuaddr(ctx, mapped_idx); in set_image()
602 static int msm_copybit(struct copybit_context_t *ctx, unsigned int target) in msm_copybit() argument
604 if (ctx->blit_count == 0) { in msm_copybit()
608 for (int i = 0; i < ctx->blit_count; i++) in msm_copybit()
610 ctx->blit_list[i].next = &(ctx->blit_list[i+1]); in msm_copybit()
612 ctx->blit_list[ctx->blit_count-1].next = NULL; in msm_copybit()
613 uint32_t target_transform = ctx->trg_transform; in msm_copybit()
614 if (ctx->c2d_driver_info.capabilities_mask & in msm_copybit()
619 if(LINK_c2dDraw(target, target_transform, 0x0, 0, 0, ctx->blit_list, in msm_copybit()
620 ctx->blit_count)) { in msm_copybit()
631 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in flush_get_fence_copybit() local
633 if (!ctx) in flush_get_fence_copybit()
635 pthread_mutex_lock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
636 status = msm_copybit(ctx, ctx->dst[ctx->dst_surface_type]); in flush_get_fence_copybit()
638 if(LINK_c2dFlush(ctx->dst[ctx->dst_surface_type], &ctx->time_stamp)) { in flush_get_fence_copybit()
641 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
644 if(LINK_c2dCreateFenceFD(ctx->dst[ctx->dst_surface_type], ctx->time_stamp, in flush_get_fence_copybit()
651 ctx->wait_timestamp = true; in flush_get_fence_copybit()
652 pthread_cond_signal(&ctx->wait_cleanup_cond); in flush_get_fence_copybit()
654 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
660 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in finish_copybit() local
661 if (!ctx) in finish_copybit()
664 int status = msm_copybit(ctx, ctx->dst[ctx->dst_surface_type]); in finish_copybit()
666 if(LINK_c2dFinish(ctx->dst[ctx->dst_surface_type])) { in finish_copybit()
673 if (ctx->mapped_gpu_addr[i]) { in finish_copybit()
674 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[i]); in finish_copybit()
675 ctx->mapped_gpu_addr[i] = 0; in finish_copybit()
680 ctx->blit_rgb_count = 0; in finish_copybit()
681 ctx->blit_yuv_2_plane_count = 0; in finish_copybit()
682 ctx->blit_yuv_3_plane_count = 0; in finish_copybit()
683 ctx->blit_count = 0; in finish_copybit()
684 ctx->dst_surface_mapped = false; in finish_copybit()
685 ctx->dst_surface_base = 0; in finish_copybit()
697 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in clear_copybit() local
699 pthread_mutex_lock(&ctx->wait_cleanup_lock); in clear_copybit()
700 if(!ctx->dst_surface_mapped) { in clear_copybit()
701 ret = set_image(ctx, ctx->dst[RGB_SURFACE], buf, in clear_copybit()
705 unmap_gpuaddr(ctx, mapped_dst_idx); in clear_copybit()
706 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clear_copybit()
711 ctx->dst_surface_mapped = true; in clear_copybit()
712 ctx->dst_surface_base = buf->base; in clear_copybit()
713 ret = LINK_c2dFillSurface(ctx->dst[RGB_SURFACE], 0x0, &c2drect); in clear_copybit()
715 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clear_copybit()
721 static void set_rects(struct copybit_context_t *ctx, in set_rects() argument
728 if((ctx->trg_transform & C2D_TARGET_ROTATE_90) && in set_rects()
729 (ctx->trg_transform & C2D_TARGET_ROTATE_180)) { in set_rects()
732 c2dObject->target_rect.y = ctx->fb_width? in set_rects()
733 (ALIGN(ctx->fb_width,32)- dst->r):dst->r; in set_rects()
737 } else if(ctx->trg_transform & C2D_TARGET_ROTATE_90) { in set_rects()
738 c2dObject->target_rect.x = ctx->fb_height?(ctx->fb_height - dst->b):dst->b; in set_rects()
743 } else if(ctx->trg_transform & C2D_TARGET_ROTATE_180) { in set_rects()
744 c2dObject->target_rect.y = ctx->fb_height?(ctx->fb_height - dst->b):dst->b; in set_rects()
746 c2dObject->target_rect.x = ctx->fb_width? in set_rects()
747 (ALIGN(ctx->fb_width,32) - dst->r):dst->r; in set_rects()
782 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in set_parameter_copybit() local
784 if (!ctx) { in set_parameter_copybit()
789 pthread_mutex_lock(&ctx->wait_cleanup_lock); in set_parameter_copybit()
796 ctx->src_global_alpha = value; in set_parameter_copybit()
798 ctx->config_mask |= C2D_GLOBAL_ALPHA_BIT; in set_parameter_copybit()
800 ctx->config_mask &= ~C2D_GLOBAL_ALPHA_BIT; in set_parameter_copybit()
806 ctx->config_mask |= C2D_ALPHA_BLEND_NONE; in set_parameter_copybit()
807 ctx->is_premultiplied_alpha = true; in set_parameter_copybit()
809 ctx->is_premultiplied_alpha = true; in set_parameter_copybit()
811 ctx->config_mask &= ~C2D_ALPHA_BLEND_NONE; in set_parameter_copybit()
838 if (ctx->c2d_driver_info.capabilities_mask & in set_parameter_copybit()
840 ctx->config_mask |= config_mask; in set_parameter_copybit()
848 ctx->trg_transform = transform; in set_parameter_copybit()
852 ctx->fb_width = value; in set_parameter_copybit()
855 ctx->fb_height = value; in set_parameter_copybit()
868 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in set_parameter_copybit()
875 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in get() local
878 if (!ctx) { in get()
1092 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in stretch_copybit_internal() local
1099 if (!ctx) { in stretch_copybit_internal()
1143 if (ctx->blit_rgb_count == MAX_RGB_SURFACES || in stretch_copybit_internal()
1144 ctx->blit_yuv_2_plane_count == MAX_YUV_2_PLANE_SURFACES || in stretch_copybit_internal()
1145 ctx->blit_yuv_3_plane_count == MAX_YUV_2_PLANE_SURFACES || in stretch_copybit_internal()
1146 ctx->blit_count == MAX_BLIT_OBJECT_COUNT || in stretch_copybit_internal()
1147 ctx->dst_surface_type != dst_surface_type) { in stretch_copybit_internal()
1155 ctx->dst_surface_type = dst_surface_type; in stretch_copybit_internal()
1176 if (get_size(dst_info) != ctx->temp_dst_buffer.size) { in stretch_copybit_internal()
1177 free_temp_buffer(ctx->temp_dst_buffer); in stretch_copybit_internal()
1179 if (COPYBIT_FAILURE == get_temp_buffer(dst_info, ctx->temp_dst_buffer)) { in stretch_copybit_internal()
1185 dst_hnd->fd = ctx->temp_dst_buffer.fd; in stretch_copybit_internal()
1186 dst_hnd->size = ctx->temp_dst_buffer.size; in stretch_copybit_internal()
1187 dst_hnd->flags = ctx->temp_dst_buffer.allocType; in stretch_copybit_internal()
1188 dst_hnd->base = (uintptr_t)(ctx->temp_dst_buffer.base); in stretch_copybit_internal()
1189 dst_hnd->offset = ctx->temp_dst_buffer.offset; in stretch_copybit_internal()
1193 if(!ctx->dst_surface_mapped) { in stretch_copybit_internal()
1195 status = set_image(ctx, ctx->dst[ctx->dst_surface_type], &dst_image, in stretch_copybit_internal()
1200 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1203 ctx->dst_surface_mapped = true; in stretch_copybit_internal()
1204 ctx->dst_surface_base = dst->base; in stretch_copybit_internal()
1205 } else if(ctx->dst_surface_mapped && ctx->dst_surface_base != dst->base) { in stretch_copybit_internal()
1216 src_surface = ctx->blit_rgb_object[ctx->blit_rgb_count]; in stretch_copybit_internal()
1221 src_surface = ctx->blit_yuv_2_plane_object[ctx->blit_yuv_2_plane_count]; in stretch_copybit_internal()
1224 src_surface = ctx->blit_yuv_3_plane_object[ctx->blit_yuv_2_plane_count]; in stretch_copybit_internal()
1229 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1236 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1254 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1258 if (get_size(src_info) != ctx->temp_src_buffer.size) { in stretch_copybit_internal()
1259 free_temp_buffer(ctx->temp_src_buffer); in stretch_copybit_internal()
1262 ctx->temp_src_buffer)) { in stretch_copybit_internal()
1266 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1270 src_hnd->fd = ctx->temp_src_buffer.fd; in stretch_copybit_internal()
1271 src_hnd->size = ctx->temp_src_buffer.size; in stretch_copybit_internal()
1272 src_hnd->flags = ctx->temp_src_buffer.allocType; in stretch_copybit_internal()
1273 src_hnd->base = (uintptr_t)(ctx->temp_src_buffer.base); in stretch_copybit_internal()
1274 src_hnd->offset = ctx->temp_src_buffer.offset; in stretch_copybit_internal()
1285 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1297 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1302 flags |= (ctx->is_premultiplied_alpha) ? FLAGS_PREMULTIPLIED_ALPHA : 0; in stretch_copybit_internal()
1303 flags |= (ctx->dst_surface_type != RGB_SURFACE) ? FLAGS_YUV_DESTINATION : 0; in stretch_copybit_internal()
1304 status = set_image(ctx, src_surface.surface_id, &src_image, in stretch_copybit_internal()
1310 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1311 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1315 src_surface.config_mask = C2D_NO_ANTIALIASING_BIT | ctx->config_mask; in stretch_copybit_internal()
1316 src_surface.global_alpha = ctx->src_global_alpha; in stretch_copybit_internal()
1324 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1325 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1334 ctx->blit_rgb_object[ctx->blit_rgb_count] = src_surface; in stretch_copybit_internal()
1335 ctx->blit_rgb_count++; in stretch_copybit_internal()
1337 ctx->blit_yuv_2_plane_object[ctx->blit_yuv_2_plane_count] = src_surface; in stretch_copybit_internal()
1338 ctx->blit_yuv_2_plane_count++; in stretch_copybit_internal()
1340 ctx->blit_yuv_3_plane_object[ctx->blit_yuv_3_plane_count] = src_surface; in stretch_copybit_internal()
1341 ctx->blit_yuv_3_plane_count++; in stretch_copybit_internal()
1346 set_rects(ctx, &(src_surface), dst_rect, src_rect, &clip); in stretch_copybit_internal()
1347 if (ctx->blit_count == MAX_BLIT_OBJECT_COUNT) { in stretch_copybit_internal()
1351 ctx->blit_list[ctx->blit_count] = src_surface; in stretch_copybit_internal()
1352 ctx->blit_count++; in stretch_copybit_internal()
1370 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1371 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1383 ctx->is_premultiplied_alpha = false; in stretch_copybit_internal()
1384 ctx->fb_width = 0; in stretch_copybit_internal()
1385 ctx->fb_height = 0; in stretch_copybit_internal()
1386 ctx->config_mask = 0; in stretch_copybit_internal()
1407 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in stretch_copybit() local
1409 bool needsBlending = (ctx->src_global_alpha != 0); in stretch_copybit()
1410 pthread_mutex_lock(&ctx->wait_cleanup_lock); in stretch_copybit()
1413 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in stretch_copybit()
1425 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in blit_copybit() local
1428 pthread_mutex_lock(&ctx->wait_cleanup_lock); in blit_copybit()
1430 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in blit_copybit()
1449 static void clean_up(copybit_context_t* ctx) in clean_up() argument
1452 if (!ctx) in clean_up()
1456 pthread_mutex_lock(&ctx->wait_cleanup_lock); in clean_up()
1457 ctx->stop_thread = true; in clean_up()
1459 pthread_cond_signal(&ctx->wait_cleanup_cond); in clean_up()
1460 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clean_up()
1462 pthread_join(ctx->wait_thread_id, &ret); in clean_up()
1463 pthread_mutex_destroy(&ctx->wait_cleanup_lock); in clean_up()
1464 pthread_cond_destroy (&ctx->wait_cleanup_cond); in clean_up()
1467 if (ctx->dst[i]) in clean_up()
1468 LINK_c2dDestroySurface(ctx->dst[i]); in clean_up()
1472 if (ctx->blit_rgb_object[i].surface_id) in clean_up()
1473 LINK_c2dDestroySurface(ctx->blit_rgb_object[i].surface_id); in clean_up()
1477 if (ctx->blit_yuv_2_plane_object[i].surface_id) in clean_up()
1478 LINK_c2dDestroySurface(ctx->blit_yuv_2_plane_object[i].surface_id); in clean_up()
1482 if (ctx->blit_yuv_3_plane_object[i].surface_id) in clean_up()
1483 LINK_c2dDestroySurface(ctx->blit_yuv_3_plane_object[i].surface_id); in clean_up()
1486 if (ctx->libc2d2) { in clean_up()
1487 ::dlclose(ctx->libc2d2); in clean_up()
1491 free(ctx); in clean_up()
1497 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in close_copybit() local
1498 if (ctx) { in close_copybit()
1499 free_temp_buffer(ctx->temp_src_buffer); in close_copybit()
1500 free_temp_buffer(ctx->temp_dst_buffer); in close_copybit()
1502 clean_up(ctx); in close_copybit()
1517 struct copybit_context_t *ctx; in open_copybit() local
1519 ctx = (struct copybit_context_t *)malloc(sizeof(struct copybit_context_t)); in open_copybit()
1520 if(!ctx) { in open_copybit()
1526 memset(ctx, 0, sizeof(*ctx)); in open_copybit()
1527 ctx->libc2d2 = ::dlopen("libC2D2.so", RTLD_NOW); in open_copybit()
1528 if (!ctx->libc2d2) { in open_copybit()
1530 clean_up(ctx); in open_copybit()
1535 *(void **)&LINK_c2dCreateSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1537 *(void **)&LINK_c2dUpdateSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1539 *(void **)&LINK_c2dReadSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1541 *(void **)&LINK_c2dDraw = ::dlsym(ctx->libc2d2, "c2dDraw"); in open_copybit()
1542 *(void **)&LINK_c2dFlush = ::dlsym(ctx->libc2d2, "c2dFlush"); in open_copybit()
1543 *(void **)&LINK_c2dFinish = ::dlsym(ctx->libc2d2, "c2dFinish"); in open_copybit()
1544 *(void **)&LINK_c2dWaitTimestamp = ::dlsym(ctx->libc2d2, in open_copybit()
1546 *(void **)&LINK_c2dDestroySurface = ::dlsym(ctx->libc2d2, in open_copybit()
1548 *(void **)&LINK_c2dMapAddr = ::dlsym(ctx->libc2d2, in open_copybit()
1550 *(void **)&LINK_c2dUnMapAddr = ::dlsym(ctx->libc2d2, in open_copybit()
1552 *(void **)&LINK_c2dGetDriverCapabilities = ::dlsym(ctx->libc2d2, in open_copybit()
1554 *(void **)&LINK_c2dCreateFenceFD = ::dlsym(ctx->libc2d2, in open_copybit()
1556 *(void **)&LINK_c2dFillSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1565 clean_up(ctx); in open_copybit()
1571 ctx->device.common.tag = HARDWARE_DEVICE_TAG; in open_copybit()
1572 ctx->device.common.version = 1; in open_copybit()
1573 ctx->device.common.module = (hw_module_t*)(module); in open_copybit()
1574 ctx->device.common.close = close_copybit; in open_copybit()
1575 ctx->device.set_parameter = set_parameter_copybit; in open_copybit()
1576 ctx->device.get = get; in open_copybit()
1577 ctx->device.blit = blit_copybit; in open_copybit()
1578 ctx->device.set_sync = set_sync_copybit; in open_copybit()
1579 ctx->device.stretch = stretch_copybit; in open_copybit()
1580 ctx->device.finish = finish_copybit; in open_copybit()
1581 ctx->device.flush_get_fence = flush_get_fence_copybit; in open_copybit()
1582 ctx->device.clear = clear_copybit; in open_copybit()
1583 ctx->device.fill_color = fill_color; in open_copybit()
1592 if (LINK_c2dCreateSurface(&(ctx->dst[RGB_SURFACE]), C2D_TARGET | C2D_SOURCE, in open_copybit()
1598 ctx->dst[RGB_SURFACE] = 0; in open_copybit()
1599 clean_up(ctx); in open_copybit()
1614 ctx->blit_rgb_object[i].surface_id = 0; in open_copybit()
1618 ctx->blit_rgb_object[i].surface_id = surface_id; in open_copybit()
1620 ctx->blit_rgb_object[i].surface_id); in open_copybit()
1625 clean_up(ctx); in open_copybit()
1642 if (LINK_c2dCreateSurface(&(ctx->dst[YUV_SURFACE_2_PLANES]), in open_copybit()
1649 ctx->dst[YUV_SURFACE_2_PLANES] = 0; in open_copybit()
1650 clean_up(ctx); in open_copybit()
1664 ctx->blit_yuv_2_plane_object[i].surface_id = 0; in open_copybit()
1668 ctx->blit_yuv_2_plane_object[i].surface_id = surface_id; in open_copybit()
1670 ctx->blit_yuv_2_plane_object[i].surface_id); in open_copybit()
1675 clean_up(ctx); in open_copybit()
1687 if (LINK_c2dCreateSurface(&(ctx->dst[YUV_SURFACE_3_PLANES]), in open_copybit()
1694 ctx->dst[YUV_SURFACE_3_PLANES] = 0; in open_copybit()
1695 clean_up(ctx); in open_copybit()
1710 ctx->blit_yuv_3_plane_object[i].surface_id = 0; in open_copybit()
1714 ctx->blit_yuv_3_plane_object[i].surface_id = surface_id; in open_copybit()
1716 ctx->blit_yuv_3_plane_object[i].surface_id); in open_copybit()
1721 clean_up(ctx); in open_copybit()
1727 if (LINK_c2dGetDriverCapabilities(&(ctx->c2d_driver_info))) { in open_copybit()
1729 clean_up(ctx); in open_copybit()
1735 ctx->trg_transform = C2D_TARGET_ROTATE_0; in open_copybit()
1737 ctx->temp_src_buffer.fd = -1; in open_copybit()
1738 ctx->temp_src_buffer.base = 0; in open_copybit()
1739 ctx->temp_src_buffer.size = 0; in open_copybit()
1741 ctx->temp_dst_buffer.fd = -1; in open_copybit()
1742 ctx->temp_dst_buffer.base = 0; in open_copybit()
1743 ctx->temp_dst_buffer.size = 0; in open_copybit()
1745 ctx->fb_width = 0; in open_copybit()
1746 ctx->fb_height = 0; in open_copybit()
1748 ctx->blit_rgb_count = 0; in open_copybit()
1749 ctx->blit_yuv_2_plane_count = 0; in open_copybit()
1750 ctx->blit_yuv_3_plane_count = 0; in open_copybit()
1751 ctx->blit_count = 0; in open_copybit()
1753 ctx->wait_timestamp = false; in open_copybit()
1754 ctx->stop_thread = false; in open_copybit()
1755 pthread_mutex_init(&(ctx->wait_cleanup_lock), NULL); in open_copybit()
1756 pthread_cond_init(&(ctx->wait_cleanup_cond), NULL); in open_copybit()
1762 pthread_create(&ctx->wait_thread_id, &attr, &c2d_wait_loop, in open_copybit()
1763 (void *)ctx); in open_copybit()
1766 *device = &ctx->device.common; in open_copybit()