local = &sd->entity.pads[RKISP1_ISP_PAD_SINK_VIDEO];
remote = media_entity_remote_pad(local);
- if (!remote) {
- dev_warn(sd->dev, "No link between isp and sensor\n");
+ if (!remote)
return NULL;
- }
sensor_me = remote->entity;
return media_entity_to_v4l2_subdev(sensor_me);
static int rkisp1_mipi_csi2_start(struct rkisp1_isp *isp,
struct rkisp1_sensor_async *sensor)
{
+ struct rkisp1_device *rkisp1 =
+ container_of(isp->sd.v4l2_dev, struct rkisp1_device, v4l2_dev);
union phy_configure_opts opts;
struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
s64 pixel_clock;
if (!sensor->pixel_rate_ctrl) {
- dev_warn(sensor->sd->dev, "No pixel rate control in subdev\n");
+ dev_warn(rkisp1->dev, "No pixel rate control in sensor subdev\n");
return -EPIPE;
}
pixel_clock = v4l2_ctrl_g_ctrl_int64(sensor->pixel_rate_ctrl);
if (!pixel_clock) {
- dev_err(sensor->sd->dev, "Invalid pixel rate value\n");
+ dev_err(rkisp1->dev, "Invalid pixel rate value\n");
return -EINVAL;
}
}
sensor_sd = rkisp1_get_remote_sensor(sd);
- if (!sensor_sd)
+ if (!sensor_sd) {
+ dev_warn(rkisp1->dev, "No link between isp and sensor\n");
return -ENODEV;
+ }
+
rkisp1->active_sensor = container_of(sensor_sd->asd,
struct rkisp1_sensor_async, asd);
ret = v4l2_device_register_subdev(v4l2_dev, sd);
if (ret) {
- dev_err(sd->dev, "Failed to register isp subdev\n");
+ dev_err(rkisp1->dev, "Failed to register isp subdev\n");
goto err_cleanup_media_entity;
}
if (sel->target != V4L2_SEL_TGT_CROP || sel->pad == RKISP1_RSZ_PAD_SRC)
return -EINVAL;
- dev_dbg(sd->dev, "%s: pad: %d sel(%d,%d)/%dx%d\n", __func__,
+ dev_dbg(rsz->rkisp1->dev, "%s: pad: %d sel(%d,%d)/%dx%d\n", __func__,
sel->pad, sel->r.left, sel->r.top, sel->r.width, sel->r.height);
mutex_lock(&rsz->ops_lock);