static int 
ge2d_release(struct inode *inode, struct file *file)
{
	ge2d_context_t *context=(ge2d_context_t *)file->private_data;
	
	if(context && (0==destroy_ge2d_work_queue(context)))
	{
		ge2d_device.open_count--;
		return 0;
	}
	amlog_level(LOG_LEVEL_LOW,"release one ge2d device\n");
	return -1;
}
void osd_clone_task_stop(void)
{
	if (!s_osd_clone.inited) {
		printk("osd_clone_task already stopped.\n");
		return;
	}

	printk("osd_clone_task stop.\n");
	if (s_osd_clone.ge2d_context) {
		destroy_ge2d_work_queue(s_osd_clone.ge2d_context);
		s_osd_clone.ge2d_context = NULL;
	}
	s_osd_clone.inited = false;
}
Beispiel #3
0
void osd_antiflicker_task_stop(void)
{
	if (!ge2d_osd_antiflicker.inited) {
		printk("osd_antiflicker_task already stopped.\n");
		return;
	}

	printk("osd_antiflicker_task stop.\n");
#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6
	switch_mod_gate_by_name("ge2d", 0);
#endif
	if (ge2d_osd_antiflicker.ge2d_context) {
		destroy_ge2d_work_queue(ge2d_osd_antiflicker.ge2d_context);
		ge2d_osd_antiflicker.ge2d_context = NULL;
	}
	ge2d_osd_antiflicker.inited = false;
}
int osd_show_progress_bar(u32 percent)
{
	static u32 progress;
	u32 step = 1;
	/* wait_queue_head_t  wait_head; */
	struct osd_fb_dev_s *fb_dev;
	struct ge2d_context_s  *context = progress_bar.ge2d_context;
	struct src_dst_info_s  *op_info = &progress_bar.op_info;

	if (NULL == context) {
		/* osd_init_progress_bar(); */
		pr_debug("context is NULL\n");
		return -1;
	}
	fb_dev = gp_fbdev_list[1];
	if (NULL == fb_dev) {
		pr_debug("fb1 should exit!!!");
		return -EFAULT;
	}

	while (progress < percent) {
		pr_debug("progress is %d, x: [%d], y: [%d], w: [%d], h: [%d]\n",
			progress, op_info->dst_rect.x, op_info->dst_rect.y,
			op_info->dst_rect.w, op_info->dst_rect.h);


		fillrect(context, op_info->dst_rect.x,
			op_info->dst_rect.y,
			op_info->dst_rect.w,
			op_info->dst_rect.h,
			op_info->color);

		/* wait_event_interruptible_timeout(wait_head,0,4); */
		progress += step;
		op_info->dst_rect.x += op_info->dst_rect.w;
		op_info->color -= (0xff*step/100) << 16;
	}

	if (100 == percent) {
		progress = 0;
		osd_blank(1, fb_dev->fb_info);
		destroy_ge2d_work_queue(progress_bar.ge2d_context);
	}

	return 0;
}
void osd_clone_task_stop(void)
{
	if (!s_osd_clone.inited) {
		printk("osd_clone_task already stopped.\n");
		return;
	}

	printk("osd_clone_task stop.\n");
#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6
	//switch_mod_gate_by_name("ge2d", 0);
#endif
	if (s_osd_clone.ge2d_context) {
		destroy_ge2d_work_queue(s_osd_clone.ge2d_context);
		s_osd_clone.ge2d_context = NULL;
	}
	s_osd_clone.inited = false;
}