From cd58415eea2dc2b07a8ecdf3e57975e4391bb525 Mon Sep 17 00:00:00 2001 From: "zhenteng.tian" Date: Wed, 23 Oct 2024 17:31:21 +0800 Subject: [PATCH] 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 --- drivers/media/common/uvm/meson_uvm_aipq_processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/uvm/meson_uvm_aipq_processor.c b/drivers/media/common/uvm/meson_uvm_aipq_processor.c index 706d399c9..a6a0c62d7 100644 --- a/drivers/media/common/uvm/meson_uvm_aipq_processor.c +++ b/drivers/media/common/uvm/meson_uvm_aipq_processor.c @@ -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;