From ba3e7b9198cd399331ce49bf12296155af270fe0 Mon Sep 17 00:00:00 2001 From: Dezhi Kong Date: Wed, 7 Mar 2018 20:06:08 +0800 Subject: [PATCH] di: optimize di buf optimization PD#161171: optimize di buf optimization 1.optimize di buf queue operation 2.add di task semaphone check Change-Id: Ia60d1ebd57d839fb1783b1257d82300469038415 Signed-off-by: Dezhi Kong --- drivers/amlogic/media/deinterlace/deinterlace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media/deinterlace/deinterlace.c b/drivers/amlogic/media/deinterlace/deinterlace.c index a3e2e19c3c51..d6a50277a567 100644 --- a/drivers/amlogic/media/deinterlace/deinterlace.c +++ b/drivers/amlogic/media/deinterlace/deinterlace.c @@ -2031,7 +2031,7 @@ static int di_init_buf(int width, int height, unsigned char prog_flag) di_buf->canvas_config_flag = 2; } di_buf->index = i; - di_buf->vframe = &(vframe_local[i]); + di_buf->vframe = &(vframe_local[i]); di_buf->vframe->private_data = di_buf; di_buf->vframe->canvas0Addr = di_buf->nr_canvas_idx; di_buf->vframe->canvas1Addr = di_buf->nr_canvas_idx; @@ -3550,11 +3550,11 @@ jiffies_to_msecs(jiffies_64 - vframe->ready_jiffies64)); pr_err("DI:no free in_buffer for progressive skip.\n"); return 0; } + queue_out(di_buf_tmp); di_buf_tmp->vframe->private_data = di_buf_tmp; di_buf_tmp->seq = di_pre_stru.in_seq; di_pre_stru.in_seq++; - queue_out(di_buf_tmp); vframe_in[di_buf_tmp->index] = vframe; memcpy( di_buf_tmp->vframe, vframe, @@ -6113,6 +6113,8 @@ static int di_task_handle(void *data) return -1; while (1) { ret = down_interruptible(&di_sema); + if (ret != 0) + continue; if (active_flag) { if ((di_pre_stru.unreg_req_flag || di_pre_stru.force_unreg_req_flag || @@ -7640,9 +7642,9 @@ module_param_named(check_start_drop_prog, check_start_drop_prog, bool, 0664); module_param_named(overturn, overturn, bool, 0664); module_param_named(queue_print_flag, queue_print_flag, int, 0664); module_param_named(full_422_pack, full_422_pack, bool, 0644); +module_param_named(cma_print, cma_print, bool, 0644); #ifdef DEBUG_SUPPORT module_param_named(pulldown_enable, pulldown_enable, bool, 0644); -module_param_named(cma_print, cma_print, bool, 0644); #ifdef RUN_DI_PROCESS_IN_IRQ module_param_named(input2pre, input2pre, uint, 0664); module_param_named(input2pre_buf_miss_count, input2pre_buf_miss_count,