media: rockchip: isp: disable link vir isp when hw working

Change-Id: I1006c9320c30397b8ed106cb75039b10f55fd286
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2022-07-06 10:16:32 +08:00
committed by Tao Huang
parent a8b7cd32f2
commit e09cebac4b
2 changed files with 12 additions and 0 deletions

View File

@@ -99,6 +99,7 @@ struct rkisp_hw_dev {
bool is_shutdown;
bool is_unite;
bool is_multi_overflow;
bool is_runing;
};
int rkisp_register_irq(struct rkisp_hw_dev *dev);

View File

@@ -1975,6 +1975,7 @@ static int rkisp_isp_stop(struct rkisp_device *dev)
rkisp_next_write(dev, CSI2RX_CSI2_RESETN, 0, true);
}
hw->is_runing = false;
dev->hw_dev->is_idle = true;
dev->hw_dev->is_mi_update = false;
end:
@@ -2724,6 +2725,7 @@ static int rkisp_isp_sd_s_stream(struct v4l2_subdev *sd, int on)
return 0;
}
hw_dev->is_runing = true;
tasklet_enable(&isp_dev->rdbk_tasklet);
rkisp_start_3a_run(isp_dev);
memset(&isp_dev->isp_sdev.dbg, 0, sizeof(isp_dev->isp_sdev.dbg));
@@ -2958,6 +2960,15 @@ static int rkisp_subdev_link_setup(struct media_entity *entity,
if (!dev)
return -ENODEV;
if (dev->hw_dev->is_runing &&
(!dev->isp_inp ||
!(dev->isp_inp & ~rawrd) ||
!strcmp(remote->entity->name, CSI_DEV_NAME) ||
strstr(remote->entity->name, "rkcif"))) {
v4l2_err(sd, "no support link for isp hw working\n");
return -EINVAL;
}
if (!strcmp(remote->entity->name, DMA_VDEV_NAME)) {
stream = &dev->dmarx_dev.stream[RKISP_STREAM_DMARX];
if (flags & MEDIA_LNK_FL_ENABLED) {