media: rockchip: vicap fixes logic error of get thundboot_resmem_head

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7e438b054f9d5e43e74bfb76ad45f0ea8995f9d6
This commit is contained in:
Zefa Chen
2023-12-18 20:08:53 +08:00
committed by Tao Huang
parent 5a05693056
commit ccc66b15b4

View File

@@ -10502,7 +10502,7 @@ static void rkcif_get_resmem_head(struct rkcif_device *cif_dev)
int cam_idx = 0;
char cam_idx_str[3] = {0};
if (!cif_dev->is_thunderboot && !cif_dev->is_rtt_suspend)
if (!cif_dev->is_rtt_suspend)
return;
strscpy(cam_idx_str, cif_dev->terminal_sensor.sd->name + 1, 2);
cam_idx_str[2] = '\0';
@@ -10517,6 +10517,8 @@ static void rkcif_get_resmem_head(struct rkcif_device *cif_dev)
size = sizeof(struct rkisp32_thunderboot_resmem_head);
offset = size * cam_idx;
}
/* currently, thunderboot with mcu only run one camera */
offset = 0;
if (size && size < cif_dev->resmem_size) {
dma_sync_single_for_cpu(cif_dev->dev, cif_dev->resmem_addr + offset,