mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
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:
committed by
gerrit autosubmit
parent
18ccf9769d
commit
4666dadb2a
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user