mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
media: synopsys: csi2rx: implement .get_frame_desc() callback
Implement the .get_frame_desc() callback to fetch information from the remote endpoint. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
6fb44d1492
commit
6f4699ae1e
|
|
@ -429,10 +429,31 @@ static int dw_mipi_csi2rx_disable_streams(struct v4l2_subdev *sd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
dw_mipi_csi2rx_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
|
||||
struct v4l2_mbus_frame_desc *fd)
|
||||
{
|
||||
struct dw_mipi_csi2rx_device *csi2 = to_csi2(sd);
|
||||
struct v4l2_subdev *remote_sd;
|
||||
struct media_pad *remote_pad;
|
||||
|
||||
remote_pad = media_pad_remote_pad_unique(&csi2->pads[DW_MIPI_CSI2RX_PAD_SINK]);
|
||||
if (IS_ERR(remote_pad)) {
|
||||
dev_err(csi2->dev, "can't get remote source pad\n");
|
||||
return PTR_ERR(remote_pad);
|
||||
}
|
||||
|
||||
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
|
||||
|
||||
return v4l2_subdev_call(remote_sd, pad, get_frame_desc,
|
||||
remote_pad->index, fd);
|
||||
}
|
||||
|
||||
static const struct v4l2_subdev_pad_ops dw_mipi_csi2rx_pad_ops = {
|
||||
.enum_mbus_code = dw_mipi_csi2rx_enum_mbus_code,
|
||||
.get_fmt = v4l2_subdev_get_fmt,
|
||||
.set_fmt = dw_mipi_csi2rx_set_fmt,
|
||||
.get_frame_desc = dw_mipi_csi2rx_get_frame_desc,
|
||||
.set_routing = dw_mipi_csi2rx_set_routing,
|
||||
.enable_streams = dw_mipi_csi2rx_enable_streams,
|
||||
.disable_streams = dw_mipi_csi2rx_disable_streams,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user