mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
media: rockchip: isp1: fix build error for kernel 6.1
Change-Id: I1f373d59ebb8eb736525df2c38383c201f784fde Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -1424,7 +1424,7 @@ static void rkisp1_stop_streaming(struct vb2_queue *queue)
|
||||
|
||||
rkisp1_stream_stop(stream);
|
||||
/* call to the other devices */
|
||||
media_pipeline_stop(&node->vdev.entity);
|
||||
video_device_pipeline_stop(&node->vdev);
|
||||
ret = dev->pipe.set_stream(&dev->pipe, false);
|
||||
if (ret < 0)
|
||||
v4l2_err(v4l2_dev, "pipeline stream-off failed error:%d\n",
|
||||
@@ -1552,7 +1552,7 @@ rkisp1_start_streaming(struct vb2_queue *queue, unsigned int count)
|
||||
if (ret < 0)
|
||||
goto stop_stream;
|
||||
|
||||
ret = media_pipeline_start(&node->vdev.entity, &dev->pipe.pipe);
|
||||
ret = video_device_pipeline_start(&node->vdev, &dev->pipe.pipe);
|
||||
if (ret < 0) {
|
||||
v4l2_err(&dev->v4l2_dev, "start pipeline failed %d\n", ret);
|
||||
goto pipe_stream_off;
|
||||
@@ -2141,7 +2141,7 @@ static int rkisp1_register_stream_vdev(struct rkisp1_stream *stream)
|
||||
break;
|
||||
default:
|
||||
v4l2_err(v4l2_dev, "Invalid stream\n");
|
||||
goto unreg;
|
||||
return -EINVAL;
|
||||
}
|
||||
strlcpy(vdev->name, vdev_name, sizeof(vdev->name));
|
||||
node = vdev_to_node(vdev);
|
||||
|
||||
@@ -516,7 +516,6 @@ static int rkisp1_fwnode_parse(struct device *dev,
|
||||
{
|
||||
struct rkisp1_async_subdev *rk_asd =
|
||||
container_of(asd, struct rkisp1_async_subdev, asd);
|
||||
struct v4l2_mbus_config_parallel *bus = &vep->bus.parallel;
|
||||
|
||||
/*
|
||||
* MIPI sensor is linked with a mipi dphy and its media bus config can
|
||||
@@ -526,7 +525,6 @@ static int rkisp1_fwnode_parse(struct device *dev,
|
||||
vep->bus_type != V4L2_MBUS_PARALLEL)
|
||||
return 0;
|
||||
|
||||
rk_asd->mbus.flags = bus->flags;
|
||||
rk_asd->mbus.type = vep->bus_type;
|
||||
|
||||
return 0;
|
||||
@@ -984,54 +982,32 @@ static int rkisp1_plat_probe(struct platform_device *pdev)
|
||||
|
||||
match_data = match->data;
|
||||
isp_dev->mipi_irq = -1;
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
|
||||
match_data->irqs[0].name);
|
||||
if (res) {
|
||||
/* there are irq names in dts */
|
||||
for (i = 0; i < match_data->num_irqs; i++) {
|
||||
irq = platform_get_irq_byname(pdev,
|
||||
match_data->irqs[i].name);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "no irq %s in dts\n",
|
||||
match_data->irqs[i].name);
|
||||
return irq;
|
||||
}
|
||||
|
||||
if (!strcmp(match_data->irqs[i].name, "mipi_irq"))
|
||||
isp_dev->mipi_irq = irq;
|
||||
|
||||
ret = devm_request_irq(dev, irq,
|
||||
match_data->irqs[i].irq_hdl,
|
||||
IRQF_SHARED,
|
||||
dev_driver_string(dev),
|
||||
dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "request %s failed: %d\n",
|
||||
match_data->irqs[i].name,
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (isp_dev->mipi_irq == irq)
|
||||
disable_irq(isp_dev->mipi_irq);
|
||||
}
|
||||
} else {
|
||||
/* no irq names in dts */
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
/* there are irq names in dts */
|
||||
for (i = 0; i < match_data->num_irqs; i++) {
|
||||
irq = platform_get_irq_byname(pdev, match_data->irqs[i].name);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "no isp irq in dts\n");
|
||||
dev_err(dev, "no irq %s in dts\n",
|
||||
match_data->irqs[i].name);
|
||||
return irq;
|
||||
}
|
||||
|
||||
if (!strcmp(match_data->irqs[i].name, "mipi_irq"))
|
||||
isp_dev->mipi_irq = irq;
|
||||
|
||||
ret = devm_request_irq(dev, irq,
|
||||
rkisp1_irq_handler,
|
||||
match_data->irqs[i].irq_hdl,
|
||||
IRQF_SHARED,
|
||||
dev_driver_string(dev),
|
||||
dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "request irq failed: %d\n", ret);
|
||||
dev_err(dev, "request %s failed: %d\n",
|
||||
match_data->irqs[i].name,
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (isp_dev->mipi_irq == irq)
|
||||
disable_irq(isp_dev->mipi_irq);
|
||||
}
|
||||
|
||||
for (i = 0; i < match_data->num_clks; i++) {
|
||||
|
||||
@@ -350,16 +350,15 @@ static int rkisp1_config_isp(struct rkisp1_device *dev)
|
||||
/* Set up input acquisition properties */
|
||||
if (sensor && (sensor->mbus.type == V4L2_MBUS_BT656 ||
|
||||
sensor->mbus.type == V4L2_MBUS_PARALLEL)) {
|
||||
if (sensor->mbus.flags &
|
||||
V4L2_MBUS_PCLK_SAMPLE_RISING)
|
||||
if (sensor->mbus.bus.parallel.flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
|
||||
signal = CIF_ISP_ACQ_PROP_POS_EDGE;
|
||||
}
|
||||
|
||||
if (sensor && sensor->mbus.type == V4L2_MBUS_PARALLEL) {
|
||||
if (sensor->mbus.flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
|
||||
if (sensor->mbus.bus.parallel.flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
|
||||
signal |= CIF_ISP_ACQ_PROP_VSYNC_LOW;
|
||||
|
||||
if (sensor->mbus.flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
|
||||
if (sensor->mbus.bus.parallel.flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
|
||||
signal |= CIF_ISP_ACQ_PROP_HSYNC_LOW;
|
||||
}
|
||||
|
||||
@@ -451,26 +450,7 @@ static int rkisp1_config_mipi(struct rkisp1_device *dev)
|
||||
u32 emd_vc, emd_dt;
|
||||
int lanes, ret, i;
|
||||
|
||||
/*
|
||||
* sensor->mbus is set in isp or d-phy notifier_bound function
|
||||
*/
|
||||
switch (sensor->mbus.flags & V4L2_MBUS_CSI2_LANES) {
|
||||
case V4L2_MBUS_CSI2_4_LANE:
|
||||
lanes = 4;
|
||||
break;
|
||||
case V4L2_MBUS_CSI2_3_LANE:
|
||||
lanes = 3;
|
||||
break;
|
||||
case V4L2_MBUS_CSI2_2_LANE:
|
||||
lanes = 2;
|
||||
break;
|
||||
case V4L2_MBUS_CSI2_1_LANE:
|
||||
lanes = 1;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
lanes = sensor->mbus.bus.mipi_csi2.num_data_lanes;
|
||||
emd_vc = 0xFF;
|
||||
emd_dt = 0;
|
||||
dev->hdr_sensor = NULL;
|
||||
|
||||
Reference in New Issue
Block a user