diff options
Diffstat (limited to 'drivers/staging/media/imx/imx-ic-prpencvf.c')
-rw-r--r-- | drivers/staging/media/imx/imx-ic-prpencvf.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 74f5de466d5d..d990553de87b 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -204,7 +204,7 @@ static void prp_vb2_buf_done(struct prp_priv *priv, struct ipuv3_channel *ch) done = priv->active_vb2_buf[priv->ipu_buf_num]; if (done) { - done->vbuf.field = vdev->fmt.fmt.pix.field; + done->vbuf.field = vdev->fmt.field; done->vbuf.sequence = priv->frame_sequence; vb = &done->vbuf.vb2_buf; vb->timestamp = ktime_get_ns(); @@ -229,7 +229,7 @@ static void prp_vb2_buf_done(struct prp_priv *priv, struct ipuv3_channel *ch) ipu_idmac_clear_buffer(ch, priv->ipu_buf_num); if (priv->interweave_swap && ch == priv->out_ch) - phys += vdev->fmt.fmt.pix.bytesperline; + phys += vdev->fmt.bytesperline; ipu_cpmem_set_buffer(ch, priv->ipu_buf_num, phys); } @@ -362,7 +362,7 @@ static int prp_setup_channel(struct prp_priv *priv, ipu_cpmem_zero(channel); memset(&image, 0, sizeof(image)); - image.pix = vdev->fmt.fmt.pix; + image.pix = vdev->fmt; image.rect = vdev->compose; /* @@ -457,7 +457,7 @@ static int prp_setup_rotation(struct prp_priv *priv) int ret; infmt = &priv->format_mbus[PRPENCVF_SINK_PAD]; - outfmt = &vdev->fmt.fmt.pix; + outfmt = &vdev->fmt; incc = priv->cc[PRPENCVF_SINK_PAD]; outcc = vdev->cc; @@ -586,7 +586,7 @@ static int prp_setup_norotation(struct prp_priv *priv) int ret; infmt = &priv->format_mbus[PRPENCVF_SINK_PAD]; - outfmt = &vdev->fmt.fmt.pix; + outfmt = &vdev->fmt; incc = priv->cc[PRPENCVF_SINK_PAD]; outcc = vdev->cc; @@ -665,17 +665,14 @@ static int prp_start(struct prp_priv *priv) { struct imx_ic_priv *ic_priv = priv->ic_priv; struct imx_media_video_dev *vdev = priv->vdev; - struct v4l2_pix_format *outfmt; int ret; ret = prp_get_ipu_resources(priv); if (ret) return ret; - outfmt = &vdev->fmt.fmt.pix; - ret = imx_media_alloc_dma_buf(ic_priv->ipu_dev, &priv->underrun_buf, - outfmt->sizeimage); + vdev->fmt.sizeimage); if (ret) goto out_put_ipu; @@ -1255,8 +1252,9 @@ static int prp_registered(struct v4l2_subdev *sd) for (i = 0; i < PRPENCVF_NUM_PADS; i++) { ret = imx_media_init_mbus_fmt(&priv->format_mbus[i], - 640, 480, code, V4L2_FIELD_NONE, - &priv->cc[i]); + IMX_MEDIA_DEF_PIX_WIDTH, + IMX_MEDIA_DEF_PIX_HEIGHT, code, + V4L2_FIELD_NONE, &priv->cc[i]); if (ret) return ret; } @@ -1267,11 +1265,11 @@ static int prp_registered(struct v4l2_subdev *sd) priv->vdev = imx_media_capture_device_init(ic_priv->ipu_dev, &ic_priv->sd, - PRPENCVF_SRC_PAD); + PRPENCVF_SRC_PAD, true); if (IS_ERR(priv->vdev)) return PTR_ERR(priv->vdev); - ret = imx_media_capture_device_register(priv->vdev); + ret = imx_media_capture_device_register(priv->vdev, 0); if (ret) goto remove_vdev; |