diff options
| author | Helen Koike <[email protected]> | 2019-08-09 00:27:40 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2019-08-13 14:39:36 +0000 |
| commit | 10b1aed6dac01d566b6b3c261a191546c82f0157 (patch) | |
| tree | 45b86b7bd3572b4a7a88a6a6b8e85dc5a8c15323 /drivers/media/platform/vimc/vimc-scaler.c | |
| parent | media: rcar-vin: Report correct image stride (diff) | |
| download | kernel-10b1aed6dac01d566b6b3c261a191546c82f0157.tar.gz kernel-10b1aed6dac01d566b6b3c261a191546c82f0157.zip | |
media: Revert "media: vimc: Remove or modify stream checks"
This reverts commit 3c1b9ac753e99005d7ee0a883d6e5b577ba32aa9.
Required to Revert "media: vimc: propagate pixel format in the stream"
which introduced the stream object in the vimc_ent_device struct.
Signed-off-by: Helen Koike <[email protected]>
Signed-off-by: Lucas A. M. Magalhaes <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-scaler.c')
| -rw-r--r-- | drivers/media/platform/vimc/vimc-scaler.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c index c7123a45c55b..5f31c1e351a3 100644 --- a/drivers/media/platform/vimc/vimc-scaler.c +++ b/drivers/media/platform/vimc/vimc-scaler.c @@ -148,7 +148,7 @@ static int vimc_sca_set_fmt(struct v4l2_subdev *sd, if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { /* Do not change the format while stream is on */ - if (vsca->ved.stream) + if (vsca->src_frame) return -EBUSY; sink_fmt = &vsca->sink_fmt; @@ -203,6 +203,9 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable) const struct v4l2_format_info *pix_info; unsigned int frame_size; + if (vsca->src_frame) + return 0; + if (!vimc_sca_is_pixfmt_supported(pixelformat)) { dev_err(vsca->dev, "pixfmt (0x%08x) is not supported\n", pixelformat); @@ -324,7 +327,7 @@ static void *vimc_sca_process_frame(struct vimc_ent_device *ved, ved); /* If the stream in this node is not active, just return */ - if (!ved->stream) + if (!vsca->src_frame) return ERR_PTR(-EINVAL); vimc_sca_fill_src_frame(vsca, sink_frame); |
