Lines Matching refs:ctx
218 copybit_context_t* ctx = (copybit_context_t*)(ptr); in c2d_wait_loop() local
223 while(ctx->stop_thread == false) { in c2d_wait_loop()
224 pthread_mutex_lock(&ctx->wait_cleanup_lock); in c2d_wait_loop()
225 while(ctx->wait_timestamp == false && !ctx->stop_thread) { in c2d_wait_loop()
226 pthread_cond_wait(&(ctx->wait_cleanup_cond), in c2d_wait_loop()
227 &(ctx->wait_cleanup_lock)); in c2d_wait_loop()
229 if(ctx->wait_timestamp) { in c2d_wait_loop()
230 if(LINK_c2dWaitTimestamp(ctx->time_stamp)) { in c2d_wait_loop()
233 ctx->wait_timestamp = false; in c2d_wait_loop()
236 if (ctx->mapped_gpu_addr[i]) { in c2d_wait_loop()
237 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[i]); in c2d_wait_loop()
238 ctx->mapped_gpu_addr[i] = 0; in c2d_wait_loop()
242 ctx->blit_rgb_count = 0; in c2d_wait_loop()
243 ctx->blit_yuv_2_plane_count = 0; in c2d_wait_loop()
244 ctx->blit_yuv_3_plane_count = 0; in c2d_wait_loop()
245 ctx->blit_count = 0; in c2d_wait_loop()
246 ctx->dst_surface_mapped = false; in c2d_wait_loop()
247 ctx->dst_surface_base = 0; in c2d_wait_loop()
249 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in c2d_wait_loop()
250 if(ctx->stop_thread) in c2d_wait_loop()
344 static size_t c2d_get_gpuaddr(copybit_context_t* ctx, in c2d_get_gpuaddr() argument
365 if (ctx->mapped_gpu_addr[freeindex] == 0) { in c2d_get_gpuaddr()
380 ctx->mapped_gpu_addr[freeindex] = (size_t)gpuaddr; in c2d_get_gpuaddr()
387 static void unmap_gpuaddr(copybit_context_t* ctx, int mapped_idx) in unmap_gpuaddr() argument
389 if (!ctx || (mapped_idx == -1)) in unmap_gpuaddr()
392 if (ctx->mapped_gpu_addr[mapped_idx]) { in unmap_gpuaddr()
393 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[mapped_idx]); in unmap_gpuaddr()
394 ctx->mapped_gpu_addr[mapped_idx] = 0; in unmap_gpuaddr()
500 static int set_image(copybit_context_t* ctx, uint32 surfaceId, in set_image() argument
528 gpuaddr = c2d_get_gpuaddr(ctx, handle, mapped_idx); in set_image()
561 unmap_gpuaddr(ctx, mapped_idx); in set_image()
579 unmap_gpuaddr(ctx, mapped_idx); in set_image()
600 unmap_gpuaddr(ctx, mapped_idx); in set_image()
605 unmap_gpuaddr(ctx, mapped_idx); in set_image()
613 static int msm_copybit(struct copybit_context_t *ctx, unsigned int target) in msm_copybit() argument
615 if (ctx->blit_count == 0) { in msm_copybit()
619 for (int i = 0; i < ctx->blit_count; i++) in msm_copybit()
621 ctx->blit_list[i].next = &(ctx->blit_list[i+1]); in msm_copybit()
623 ctx->blit_list[ctx->blit_count-1].next = NULL; in msm_copybit()
624 uint32_t target_transform = ctx->trg_transform; in msm_copybit()
625 if (ctx->c2d_driver_info.capabilities_mask & in msm_copybit()
630 if(LINK_c2dDraw(target, target_transform, 0x0, 0, 0, ctx->blit_list, in msm_copybit()
631 ctx->blit_count)) { in msm_copybit()
642 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in flush_get_fence_copybit() local
644 if (!ctx) in flush_get_fence_copybit()
646 pthread_mutex_lock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
647 status = msm_copybit(ctx, ctx->dst[ctx->dst_surface_type]); in flush_get_fence_copybit()
649 if(LINK_c2dFlush(ctx->dst[ctx->dst_surface_type], &ctx->time_stamp)) { in flush_get_fence_copybit()
652 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
655 if(LINK_c2dCreateFenceFD(ctx->dst[ctx->dst_surface_type], ctx->time_stamp, in flush_get_fence_copybit()
662 ctx->wait_timestamp = true; in flush_get_fence_copybit()
663 pthread_cond_signal(&ctx->wait_cleanup_cond); in flush_get_fence_copybit()
665 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in flush_get_fence_copybit()
671 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in finish_copybit() local
672 if (!ctx) in finish_copybit()
675 int status = msm_copybit(ctx, ctx->dst[ctx->dst_surface_type]); in finish_copybit()
677 if(LINK_c2dFinish(ctx->dst[ctx->dst_surface_type])) { in finish_copybit()
684 if (ctx->mapped_gpu_addr[i]) { in finish_copybit()
685 LINK_c2dUnMapAddr( (void*)ctx->mapped_gpu_addr[i]); in finish_copybit()
686 ctx->mapped_gpu_addr[i] = 0; in finish_copybit()
691 ctx->blit_rgb_count = 0; in finish_copybit()
692 ctx->blit_yuv_2_plane_count = 0; in finish_copybit()
693 ctx->blit_yuv_3_plane_count = 0; in finish_copybit()
694 ctx->blit_count = 0; in finish_copybit()
695 ctx->dst_surface_mapped = false; in finish_copybit()
696 ctx->dst_surface_base = 0; in finish_copybit()
708 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in clear_copybit() local
709 if (ctx->is_dst_ubwc_format) in clear_copybit()
712 pthread_mutex_lock(&ctx->wait_cleanup_lock); in clear_copybit()
713 if(!ctx->dst_surface_mapped) { in clear_copybit()
714 ret = set_image(ctx, ctx->dst[RGB_SURFACE], buf, in clear_copybit()
718 unmap_gpuaddr(ctx, mapped_dst_idx); in clear_copybit()
719 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clear_copybit()
724 ctx->dst_surface_mapped = true; in clear_copybit()
725 ctx->dst_surface_base = buf->base; in clear_copybit()
726 ret = LINK_c2dFillSurface(ctx->dst[RGB_SURFACE], 0x0, &c2drect); in clear_copybit()
728 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clear_copybit()
734 static void set_rects(struct copybit_context_t *ctx, in set_rects() argument
741 if((ctx->trg_transform & C2D_TARGET_ROTATE_90) && in set_rects()
742 (ctx->trg_transform & C2D_TARGET_ROTATE_180)) { in set_rects()
745 c2dObject->target_rect.y = ctx->fb_width? in set_rects()
746 (ALIGN(ctx->fb_width,32)- dst->r):dst->r; in set_rects()
750 } else if(ctx->trg_transform & C2D_TARGET_ROTATE_90) { in set_rects()
751 c2dObject->target_rect.x = ctx->fb_height?(ctx->fb_height - dst->b):dst->b; in set_rects()
756 } else if(ctx->trg_transform & C2D_TARGET_ROTATE_180) { in set_rects()
757 c2dObject->target_rect.y = ctx->fb_height?(ctx->fb_height - dst->b):dst->b; in set_rects()
759 c2dObject->target_rect.x = ctx->fb_width? in set_rects()
760 (ALIGN(ctx->fb_width,32) - dst->r):dst->r; in set_rects()
795 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in set_parameter_copybit() local
797 if (!ctx) { in set_parameter_copybit()
802 pthread_mutex_lock(&ctx->wait_cleanup_lock); in set_parameter_copybit()
809 ctx->src_global_alpha = value; in set_parameter_copybit()
811 ctx->config_mask |= C2D_GLOBAL_ALPHA_BIT; in set_parameter_copybit()
813 ctx->config_mask &= ~C2D_GLOBAL_ALPHA_BIT; in set_parameter_copybit()
819 ctx->config_mask |= C2D_ALPHA_BLEND_NONE; in set_parameter_copybit()
820 ctx->is_premultiplied_alpha = true; in set_parameter_copybit()
822 ctx->is_premultiplied_alpha = true; in set_parameter_copybit()
824 ctx->config_mask &= ~C2D_ALPHA_BLEND_NONE; in set_parameter_copybit()
851 if (ctx->c2d_driver_info.capabilities_mask & in set_parameter_copybit()
853 ctx->config_mask |= config_mask; in set_parameter_copybit()
861 ctx->trg_transform = transform; in set_parameter_copybit()
865 ctx->fb_width = value; in set_parameter_copybit()
868 ctx->fb_height = value; in set_parameter_copybit()
877 ctx->is_src_ubwc_format = (value == COPYBIT_UBWC_COMPRESSED); in set_parameter_copybit()
880 ctx->is_dst_ubwc_format = (value == COPYBIT_UBWC_COMPRESSED); in set_parameter_copybit()
887 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in set_parameter_copybit()
894 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in get() local
897 if (!ctx) { in get()
917 if (ctx->c2d_driver_info.capabilities_mask & C2D_DRIVER_SUPPORTS_UBWC_COMPRESSED_OP) { in get()
1096 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in stretch_copybit_internal() local
1103 if (!ctx) { in stretch_copybit_internal()
1126 if (ctx->is_dst_ubwc_format) in stretch_copybit_internal()
1150 if (ctx->blit_rgb_count == MAX_RGB_SURFACES || in stretch_copybit_internal()
1151 ctx->blit_yuv_2_plane_count == MAX_YUV_2_PLANE_SURFACES || in stretch_copybit_internal()
1152 ctx->blit_yuv_3_plane_count == MAX_YUV_2_PLANE_SURFACES || in stretch_copybit_internal()
1153 ctx->blit_count == MAX_BLIT_OBJECT_COUNT || in stretch_copybit_internal()
1154 ctx->dst_surface_type != dst_surface_type) { in stretch_copybit_internal()
1162 ctx->dst_surface_type = dst_surface_type; in stretch_copybit_internal()
1183 if (get_size(dst_info) != (int) ctx->temp_dst_buffer.size) { in stretch_copybit_internal()
1184 free_temp_buffer(ctx->temp_dst_buffer); in stretch_copybit_internal()
1186 if (COPYBIT_FAILURE == get_temp_buffer(dst_info, ctx->temp_dst_buffer)) { in stretch_copybit_internal()
1192 dst_hnd->fd = ctx->temp_dst_buffer.fd; in stretch_copybit_internal()
1193 dst_hnd->size = ctx->temp_dst_buffer.size; in stretch_copybit_internal()
1194 dst_hnd->flags = ctx->temp_dst_buffer.allocType; in stretch_copybit_internal()
1195 dst_hnd->base = (uintptr_t)(ctx->temp_dst_buffer.base); in stretch_copybit_internal()
1196 dst_hnd->offset = ctx->temp_dst_buffer.offset; in stretch_copybit_internal()
1200 if(!ctx->dst_surface_mapped) { in stretch_copybit_internal()
1202 status = set_image(ctx, ctx->dst[ctx->dst_surface_type], &dst_image, in stretch_copybit_internal()
1207 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1210 ctx->dst_surface_mapped = true; in stretch_copybit_internal()
1211 ctx->dst_surface_base = dst->base; in stretch_copybit_internal()
1212 } else if(ctx->dst_surface_mapped && ctx->dst_surface_base != dst->base) { in stretch_copybit_internal()
1223 src_surface = ctx->blit_rgb_object[ctx->blit_rgb_count]; in stretch_copybit_internal()
1228 src_surface = ctx->blit_yuv_2_plane_object[ctx->blit_yuv_2_plane_count]; in stretch_copybit_internal()
1231 src_surface = ctx->blit_yuv_3_plane_object[ctx->blit_yuv_2_plane_count]; in stretch_copybit_internal()
1236 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1243 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1261 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1265 if (get_size(src_info) != (int) ctx->temp_src_buffer.size) { in stretch_copybit_internal()
1266 free_temp_buffer(ctx->temp_src_buffer); in stretch_copybit_internal()
1269 ctx->temp_src_buffer)) { in stretch_copybit_internal()
1273 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1277 src_hnd->fd = ctx->temp_src_buffer.fd; in stretch_copybit_internal()
1278 src_hnd->size = ctx->temp_src_buffer.size; in stretch_copybit_internal()
1279 src_hnd->flags = ctx->temp_src_buffer.allocType; in stretch_copybit_internal()
1280 src_hnd->base = (uintptr_t)(ctx->temp_src_buffer.base); in stretch_copybit_internal()
1281 src_hnd->offset = ctx->temp_src_buffer.offset; in stretch_copybit_internal()
1292 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1304 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1309 flags |= (ctx->is_premultiplied_alpha) ? FLAGS_PREMULTIPLIED_ALPHA : 0; in stretch_copybit_internal()
1310 flags |= (ctx->dst_surface_type != RGB_SURFACE) ? FLAGS_YUV_DESTINATION : 0; in stretch_copybit_internal()
1311 flags |= (ctx->is_src_ubwc_format) ? FLAGS_UBWC_FORMAT_MODE : 0; in stretch_copybit_internal()
1312 status = set_image(ctx, src_surface.surface_id, &src_image, in stretch_copybit_internal()
1318 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1319 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1323 src_surface.config_mask = C2D_NO_ANTIALIASING_BIT | ctx->config_mask; in stretch_copybit_internal()
1324 src_surface.global_alpha = ctx->src_global_alpha; in stretch_copybit_internal()
1332 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1333 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1342 ctx->blit_rgb_object[ctx->blit_rgb_count] = src_surface; in stretch_copybit_internal()
1343 ctx->blit_rgb_count++; in stretch_copybit_internal()
1345 ctx->blit_yuv_2_plane_object[ctx->blit_yuv_2_plane_count] = src_surface; in stretch_copybit_internal()
1346 ctx->blit_yuv_2_plane_count++; in stretch_copybit_internal()
1348 ctx->blit_yuv_3_plane_object[ctx->blit_yuv_3_plane_count] = src_surface; in stretch_copybit_internal()
1349 ctx->blit_yuv_3_plane_count++; in stretch_copybit_internal()
1354 set_rects(ctx, &(src_surface), dst_rect, src_rect, &clip); in stretch_copybit_internal()
1355 if (ctx->blit_count == MAX_BLIT_OBJECT_COUNT) { in stretch_copybit_internal()
1359 ctx->blit_list[ctx->blit_count] = src_surface; in stretch_copybit_internal()
1360 ctx->blit_count++; in stretch_copybit_internal()
1378 unmap_gpuaddr(ctx, mapped_dst_idx); in stretch_copybit_internal()
1379 unmap_gpuaddr(ctx, mapped_src_idx); in stretch_copybit_internal()
1391 ctx->is_premultiplied_alpha = false; in stretch_copybit_internal()
1392 ctx->fb_width = 0; in stretch_copybit_internal()
1393 ctx->fb_height = 0; in stretch_copybit_internal()
1394 ctx->config_mask = 0; in stretch_copybit_internal()
1415 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in stretch_copybit() local
1417 bool needsBlending = (ctx->src_global_alpha != 0); in stretch_copybit()
1418 pthread_mutex_lock(&ctx->wait_cleanup_lock); in stretch_copybit()
1421 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in stretch_copybit()
1433 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in blit_copybit() local
1436 pthread_mutex_lock(&ctx->wait_cleanup_lock); in blit_copybit()
1438 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in blit_copybit()
1457 static void clean_up(copybit_context_t* ctx) in clean_up() argument
1460 if (!ctx) in clean_up()
1464 pthread_mutex_lock(&ctx->wait_cleanup_lock); in clean_up()
1465 ctx->stop_thread = true; in clean_up()
1467 pthread_cond_signal(&ctx->wait_cleanup_cond); in clean_up()
1468 pthread_mutex_unlock(&ctx->wait_cleanup_lock); in clean_up()
1470 pthread_join(ctx->wait_thread_id, &ret); in clean_up()
1471 pthread_mutex_destroy(&ctx->wait_cleanup_lock); in clean_up()
1472 pthread_cond_destroy (&ctx->wait_cleanup_cond); in clean_up()
1475 if (ctx->dst[i]) in clean_up()
1476 LINK_c2dDestroySurface(ctx->dst[i]); in clean_up()
1480 if (ctx->blit_rgb_object[i].surface_id) in clean_up()
1481 LINK_c2dDestroySurface(ctx->blit_rgb_object[i].surface_id); in clean_up()
1485 if (ctx->blit_yuv_2_plane_object[i].surface_id) in clean_up()
1486 LINK_c2dDestroySurface(ctx->blit_yuv_2_plane_object[i].surface_id); in clean_up()
1490 if (ctx->blit_yuv_3_plane_object[i].surface_id) in clean_up()
1491 LINK_c2dDestroySurface(ctx->blit_yuv_3_plane_object[i].surface_id); in clean_up()
1494 if (ctx->libc2d2) { in clean_up()
1495 ::dlclose(ctx->libc2d2); in clean_up()
1499 free(ctx); in clean_up()
1505 struct copybit_context_t* ctx = (struct copybit_context_t*)dev; in close_copybit() local
1506 if (ctx) { in close_copybit()
1507 free_temp_buffer(ctx->temp_src_buffer); in close_copybit()
1508 free_temp_buffer(ctx->temp_dst_buffer); in close_copybit()
1510 clean_up(ctx); in close_copybit()
1525 struct copybit_context_t *ctx; in open_copybit() local
1527 ctx = (struct copybit_context_t *)malloc(sizeof(struct copybit_context_t)); in open_copybit()
1528 if(!ctx) { in open_copybit()
1534 memset(ctx, 0, sizeof(*ctx)); in open_copybit()
1535 ctx->libc2d2 = ::dlopen("libC2D2.so", RTLD_NOW); in open_copybit()
1536 if (!ctx->libc2d2) { in open_copybit()
1538 clean_up(ctx); in open_copybit()
1543 *(void **)&LINK_c2dCreateSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1545 *(void **)&LINK_c2dUpdateSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1547 *(void **)&LINK_c2dReadSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1549 *(void **)&LINK_c2dDraw = ::dlsym(ctx->libc2d2, "c2dDraw"); in open_copybit()
1550 *(void **)&LINK_c2dFlush = ::dlsym(ctx->libc2d2, "c2dFlush"); in open_copybit()
1551 *(void **)&LINK_c2dFinish = ::dlsym(ctx->libc2d2, "c2dFinish"); in open_copybit()
1552 *(void **)&LINK_c2dWaitTimestamp = ::dlsym(ctx->libc2d2, in open_copybit()
1554 *(void **)&LINK_c2dDestroySurface = ::dlsym(ctx->libc2d2, in open_copybit()
1556 *(void **)&LINK_c2dMapAddr = ::dlsym(ctx->libc2d2, in open_copybit()
1558 *(void **)&LINK_c2dUnMapAddr = ::dlsym(ctx->libc2d2, in open_copybit()
1560 *(void **)&LINK_c2dGetDriverCapabilities = ::dlsym(ctx->libc2d2, in open_copybit()
1562 *(void **)&LINK_c2dCreateFenceFD = ::dlsym(ctx->libc2d2, in open_copybit()
1564 *(void **)&LINK_c2dFillSurface = ::dlsym(ctx->libc2d2, in open_copybit()
1573 clean_up(ctx); in open_copybit()
1579 ctx->device.common.tag = HARDWARE_DEVICE_TAG; in open_copybit()
1580 ctx->device.common.version = 1; in open_copybit()
1581 ctx->device.common.module = (hw_module_t*)(module); in open_copybit()
1582 ctx->device.common.close = close_copybit; in open_copybit()
1583 ctx->device.set_parameter = set_parameter_copybit; in open_copybit()
1584 ctx->device.get = get; in open_copybit()
1585 ctx->device.blit = blit_copybit; in open_copybit()
1586 ctx->device.set_sync = set_sync_copybit; in open_copybit()
1587 ctx->device.stretch = stretch_copybit; in open_copybit()
1588 ctx->device.finish = finish_copybit; in open_copybit()
1589 ctx->device.flush_get_fence = flush_get_fence_copybit; in open_copybit()
1590 ctx->device.clear = clear_copybit; in open_copybit()
1591 ctx->device.fill_color = fill_color; in open_copybit()
1600 if (LINK_c2dCreateSurface(&(ctx->dst[RGB_SURFACE]), C2D_TARGET | C2D_SOURCE, in open_copybit()
1606 ctx->dst[RGB_SURFACE] = 0; in open_copybit()
1607 clean_up(ctx); in open_copybit()
1622 ctx->blit_rgb_object[i].surface_id = 0; in open_copybit()
1626 ctx->blit_rgb_object[i].surface_id = surface_id; in open_copybit()
1628 ctx->blit_rgb_object[i].surface_id); in open_copybit()
1633 clean_up(ctx); in open_copybit()
1650 if (LINK_c2dCreateSurface(&(ctx->dst[YUV_SURFACE_2_PLANES]), in open_copybit()
1657 ctx->dst[YUV_SURFACE_2_PLANES] = 0; in open_copybit()
1658 clean_up(ctx); in open_copybit()
1672 ctx->blit_yuv_2_plane_object[i].surface_id = 0; in open_copybit()
1676 ctx->blit_yuv_2_plane_object[i].surface_id = surface_id; in open_copybit()
1678 ctx->blit_yuv_2_plane_object[i].surface_id); in open_copybit()
1683 clean_up(ctx); in open_copybit()
1695 if (LINK_c2dCreateSurface(&(ctx->dst[YUV_SURFACE_3_PLANES]), in open_copybit()
1702 ctx->dst[YUV_SURFACE_3_PLANES] = 0; in open_copybit()
1703 clean_up(ctx); in open_copybit()
1718 ctx->blit_yuv_3_plane_object[i].surface_id = 0; in open_copybit()
1722 ctx->blit_yuv_3_plane_object[i].surface_id = surface_id; in open_copybit()
1724 ctx->blit_yuv_3_plane_object[i].surface_id); in open_copybit()
1729 clean_up(ctx); in open_copybit()
1735 if (LINK_c2dGetDriverCapabilities(&(ctx->c2d_driver_info))) { in open_copybit()
1737 clean_up(ctx); in open_copybit()
1743 ctx->trg_transform = C2D_TARGET_ROTATE_0; in open_copybit()
1745 ctx->temp_src_buffer.fd = -1; in open_copybit()
1746 ctx->temp_src_buffer.base = 0; in open_copybit()
1747 ctx->temp_src_buffer.size = 0; in open_copybit()
1749 ctx->temp_dst_buffer.fd = -1; in open_copybit()
1750 ctx->temp_dst_buffer.base = 0; in open_copybit()
1751 ctx->temp_dst_buffer.size = 0; in open_copybit()
1753 ctx->fb_width = 0; in open_copybit()
1754 ctx->fb_height = 0; in open_copybit()
1756 ctx->blit_rgb_count = 0; in open_copybit()
1757 ctx->blit_yuv_2_plane_count = 0; in open_copybit()
1758 ctx->blit_yuv_3_plane_count = 0; in open_copybit()
1759 ctx->blit_count = 0; in open_copybit()
1761 ctx->wait_timestamp = false; in open_copybit()
1762 ctx->stop_thread = false; in open_copybit()
1763 pthread_mutex_init(&(ctx->wait_cleanup_lock), NULL); in open_copybit()
1764 pthread_cond_init(&(ctx->wait_cleanup_cond), NULL); in open_copybit()
1770 pthread_create(&ctx->wait_thread_id, &attr, &c2d_wait_loop, in open_copybit()
1771 (void *)ctx); in open_copybit()
1774 *device = &ctx->device.common; in open_copybit()