aipq: obtain the frame_index before processing with GE2D. [1/1]

PD#SWPL-182299

Problem:
kernel panic due to accessing a member variable of vf

Solution:
obtain the frame_index before processing with GE2D

Verify:
T3X

Change-Id: I075c13e4ca158d3b7875945a70966b2ca6f3e56f
Signed-off-by: zhenteng.tian <zhenteng.tian@amlogic.com>
This commit is contained in:
zhenteng.tian
2024-10-23 17:31:21 +08:00
committed by gerrit autosubmit
parent 0a3c6bff80
commit cd58415eea
@@ -804,6 +804,7 @@ int aipq_getinfo(void *arg, char *buf)
return -ENOMEM;
}
}
aipq_info->frame_index = vf->frame_index;
memset(&output, 0, sizeof(struct ge2d_output_t));
output.width = aipq_info->nn_input_frame_width;
output.height = aipq_info->nn_input_frame_height;
@@ -815,7 +816,6 @@ int aipq_getinfo(void *arg, char *buf)
aipq_print(PRINT_ERROR, "ge2d output RGB24 err\n");
return -EINVAL;
}
aipq_info->frame_index = vf->frame_index;
do_gettimeofday(&end_time);
cost_time = (1000000 * (end_time.tv_sec - begin_time.tv_sec)
+ (end_time.tv_usec - begin_time.tv_usec)) / 1000;