summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vimc/vimc-sensor.c
diff options
context:
space:
mode:
authorHelen Koike <helen.koike@collabora.com>2019-08-08 21:27:40 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-08-13 11:39:36 -0300
commit10b1aed6dac01d566b6b3c261a191546c82f0157 (patch)
tree45b86b7bd3572b4a7a88a6a6b8e85dc5a8c15323 /drivers/media/platform/vimc/vimc-sensor.c
parent84246ae3fde112c2d3e8215dfffadcc39b1362a6 (diff)
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 <helen.koike@collabora.com> Signed-off-by: Lucas A. M. Magalhaes <lucmaga@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-sensor.c')
-rw-r--r--drivers/media/platform/vimc/vimc-sensor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index 51359472eef2..c47454cc7f70 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -131,7 +131,7 @@ static int vimc_sen_set_fmt(struct v4l2_subdev *sd,
if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
/* Do not change the format while stream is on */
- if (vsen->ved.stream)
+ if (vsen->frame)
return -EBUSY;
mf = &vsen->mbus_format;
@@ -187,6 +187,10 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable)
const struct v4l2_format_info *pix_info;
unsigned int frame_size;
+ if (vsen->kthread_sen)
+ /* tpg is already executing */
+ return 0;
+
/* Calculate the frame size */
pix_info = v4l2_format_info(pixelformat);
frame_size = vsen->mbus_format.width * pix_info->bpp[0] *