diff options
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c index 1cf2c54aa8b8..7885149440f9 100644 --- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c +++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1770,6 +1770,17 @@ static void msm_cpp_do_timeout_work(struct work_struct *work) goto end; } + for (i = 0; i < queue_len; i++) { + processed_frame[i] = cpp_timer.data.processed_frame[i]; + if (!processed_frame[i]) { + pr_warn("process frame null , queue len %d", queue_len); + msm_cpp_flush_queue_and_release_buffer(cpp_dev, + queue_len); + msm_cpp_set_micro_irq_mask(cpp_dev, 1, 0x8); + goto end; + } + } + atomic_set(&cpp_timer.used, 1); pr_warn("Starting timer to fire in %d ms. (jiffies=%lu)\n", CPP_CMD_TIMEOUT_MS, jiffies); @@ -1778,9 +1789,6 @@ static void msm_cpp_do_timeout_work(struct work_struct *work) msm_cpp_set_micro_irq_mask(cpp_dev, 1, 0x8); - for (i = 0; i < MAX_CPP_PROCESSING_FRAME; i++) - processed_frame[i] = cpp_timer.data.processed_frame[i]; - for (i = 0; i < queue_len; i++) { pr_warn("Rescheduling for identity=0x%x, frame_id=%03d\n", processed_frame[i]->identity, |
