aicolor: checkout if aicolor is done before pq. [1/1]

PD#SWPL-146859

Problem:
kernel panic in ai_color_proc function.

Solution:
checkout if aicolor is done before access ai_color value.

Verify:
T3X

Change-Id: I08d563697861ba4b9fe3af53f94146daa9be3cfd
Signed-off-by: zhenteng.tian <zhenteng.tian@amlogic.com>
This commit is contained in:
zhenteng.tian
2023-11-27 15:22:26 +08:00
committed by gerrit autosubmit
parent 18ccf9769d
commit 4666dadb2a
2 changed files with 4 additions and 1 deletions
@@ -327,7 +327,8 @@ void ai_color_proc(struct vframe_s *vf)
sa_adj_parm.reg_sat_l_gain_en == 0)
return;
if (!vf->vc_private->aicolor_info) {
if (!vf->vc_private->aicolor_info ||
(vf->vc_private->flag & VC_FLAG_AI_COLOR) == 0) {
if (ai_clr_dbg) {
pr_info("no aicolor_info\n");
ai_clr_dbg--;
@@ -1018,6 +1018,7 @@ void vc_private_q_init(struct composer_dev *dev)
dev->vc_private[i].srout_data = NULL;
dev->vc_private[i].src_vf = NULL;
dev->vc_private[i].vsync_index = 0;
dev->vc_private[i].aicolor_info = NULL;
if (!kfifo_put(&dev->vc_private_q, &dev->vc_private[i]))
vc_print(dev->index, PRINT_ERROR,
"q_init: vc_private_q is full!\n");
@@ -1049,6 +1050,7 @@ struct video_composer_private *vc_private_q_pop(struct composer_dev *dev)
vc_private->flag = 0;
vc_private->srout_data = NULL;
vc_private->src_vf = NULL;
vc_private->aicolor_info = NULL;
}
return vc_private;