Remove the struct atomisp_sub_device.
This was used for 2 things:
1. In dev_dbg() messages
2. To set the name of the v4l2_subdev for each struct atomisp_sub_device
Now that only 1 subdev is used neither is useful anymore. Remove the _%d
postfix from the v4l2_subdev name and remove the logging of the asd index
from the dev_dbg() messages.
In case of the atomisp_s_input() check to see if an input/sensor has
already been assigned to another subdev the entire check no longer
makes sense, so instead of changing the dev_err() message there just
drop the entire check.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
if (irq_infos & IA_CSS_IRQ_INFO_ISYS_EVENTS_READY) {
while (ia_css_dequeue_isys_event(&eof_event.event) == 0) {
atomisp_eof_event(&isp->asd, eof_event.event.exp_id);
- dev_dbg_ratelimited(isp->dev,
- "%s ISYS event: EOF exp_id %d, asd %d\n",
- __func__, eof_event.event.exp_id,
- isp->asd.index);
+ dev_dbg_ratelimited(isp->dev, "ISYS event: EOF exp_id %d\n",
+ eof_event.event.exp_id);
}
irq_infos &= ~IA_CSS_IRQ_INFO_ISYS_EVENTS_READY;
return -EINVAL;
}
- dev_dbg(asd->isp->dev,
- "%s: set parameter(per_frame_setting %d) for asd%d with isp_config_id %d of %s\n",
- __func__, arg->per_frame_setting, asd->index,
- arg->isp_config_id, vdev->name);
+ dev_dbg(asd->isp->dev, "set parameter(per_frame_setting %d) isp_config_id %d of %s\n",
+ arg->per_frame_setting, arg->isp_config_id, vdev->name);
if (IS_ISP2401) {
if (atomisp_is_vf_pipe(pipe) && arg->per_frame_setting) {
return -EINVAL;
dev_dbg(isp->dev,
- "setting resolution %ux%u on pad %u for asd%d, bytesperline %u\n",
- f->fmt.pix.width, f->fmt.pix.height, source_pad,
- asd->index, f->fmt.pix.bytesperline);
+ "setting resolution %ux%u on pad %u bytesperline %u\n",
+ f->fmt.pix.width, f->fmt.pix.height, source_pad, f->fmt.pix.bytesperline);
v4l2_fh_init(&fh.vfh, vdev);
return -EINVAL;
}
- /*
- * check whether the request camera:
- * 1: already in use
- * 2: if in use, whether it is used by other streams
- */
- if (isp->inputs[input].asd && isp->inputs[input].asd != asd) {
- dev_err(isp->dev,
- "%s, camera is already used by stream: %d\n", __func__,
- isp->inputs[input].asd->index);
- return -EBUSY;
- }
-
camera = isp->inputs[input].camera;
if (!camera) {
dev_err(isp->dev, "%s, no camera\n", __func__);
buf->reserved2 = pipe->frame_config_id[buf->index];
dev_dbg(isp->dev,
- "dqbuf buffer %d (%s) for asd%d with exp_id %d, isp_config_id %d\n",
- buf->index, vdev->name, asd->index, buf->reserved >> 16,
- buf->reserved2);
+ "dqbuf buffer %d (%s) with exp_id %d, isp_config_id %d\n",
+ buf->index, vdev->name, buf->reserved >> 16, buf->reserved2);
return 0;
}
mutex_lock(&isp->mutex);
- dev_dbg(isp->dev, "Start stream on pad %d for asd%d\n",
- atomisp_subdev_source_pad(vdev), asd->index);
+ dev_dbg(isp->dev, "Start stream on pad %d\n", atomisp_subdev_source_pad(vdev));
ret = atomisp_pipe_check(pipe, false);
if (ret)
mutex_lock(&isp->mutex);
- dev_dbg(isp->dev, "Stop stream on pad %d for asd%d\n",
- atomisp_subdev_source_pad(vdev), asd->index);
+ dev_dbg(isp->dev, "Stop stream on pad %d\n", atomisp_subdev_source_pad(vdev));
/*
* There is no guarantee that the buffers queued to / owned by the ISP
int ret;
v4l2_subdev_init(sd, &isp_subdev_v4l2_ops);
- sprintf(sd->name, "ATOMISP_SUBDEV_%d", asd->index);
+ sprintf(sd->name, "ATOMISP_SUBDEV");
v4l2_set_subdevdata(sd, asd);
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
{
int ret;
- isp->asd.index = 0;
isp->asd.isp = isp;
isp_subdev_init_params(&isp->asd);
ret = isp_subdev_init_entities(&isp->asd);
unsigned int streaming;
bool stream_prepared; /* whether css stream is created */
- /* subdev index: will be used to show which subdev is holding the
- * resource, like which camera is used by which subdev
- */
- unsigned int index;
-
unsigned int latest_preview_exp_id; /* CSS ZSL/SDV raw buffer id */
unsigned int mipi_frame_size;